Maple 15 Questions and Posts

These are Posts and Questions associated with the product, Maple 15

I ran into a problem mentioned here before: With lots of code in one execution group, the standard GUI editor becomes very slow at least in older versions of Maple (I have reason to believe that this is mostly fixed in Maple 17 and, presumably, newer). With one of my packages this has become enough of a problem to force me to deal with it (and Modules and Packages have to be all in one execution group). I have some machines that cannot go beyond Maple 15 so I keep my stuff compatible with it (so far not a big sacrifice).

The fix is rather easy: In the GUI, export the code as "Maple Input" which creates a file with extension .mpl. Then, in the GUI have a small file that uses "read" to read-in and execute the code (of the module). In my case, I have the necessary LibTools statement to save as a .mla right after the package code ends so, bingo, I have just updated the package. I edit the .mpl file in Emacs.

So I installed Joe Riel's Emacs mode maplev-mode.el. This works rather well. However, it took not long for it to show its age: it does not recognize the multi-line comments (*...*). This is kind-of bad as this forces me to not use quotes in the comments since they mess-up the keyword highlighting esp. when using single quotes as in "I'll" and so on. Likewise, maplev-indent-buffer messes up the whole buffer as it interprets the multiline comments as code.

So my question is: is someone still working on this and using it?? I guess I can work around some of these things, but it would be nice if this worked.

Incidentally, my version of maplev-mode.el seems to be dated June 2005.

I know Joe is here on occasion, maybe he can chime in. It is not absolutely fatal; I could forgo using maplev, but if I am forced to go this route of readin in the package; using maplev-mode at least gives me something in return. Unfortunately my elisp skills are not quite up to fixing this myself; at least not in a reasonable time.

If it is relevant: I use Emacs 22.1 on Mac OS X. Yes, I could upgrade to at least Emace 23.4, if that were the issue.

Thanks in advance,

Mac Dude

Maple 15

eq:=1/2*x^(1/2) + 1/13*x^(1/3) + 1/26*x^(45/37);

The exponents are still fractions.  I want to have floating point exponents.

0.5*x^0.500000 + 0.07692307692*x^0.333333 + 0.03846153846*x^1.216216216

How do I do this?


Tom Dean

i just need 1 at a11 position of a square matrix. do not need zeros like in complete pivoting. plz help

for i from 0 to 3 do print("rawData[", i, "] = new double[] { ", hello(i+1), ",", data[i+1], "};") end do

wrong format after copy to notepad from the maple 15

do not know why it insert a empty line, and make "};" in another line

and there is unexpected " 


wrong format example:

"rawData[", 0, "] = new double[] { ", 73.25, ",", 0.1510425143,

"rawData[", 1, "] = new double[] { ", 73.15, ",", 0.3974080269,

"rawData[", 2, "] = new double[] { ", 72.85, ",", 0.4661517269,

"rawData[", 3, "] = new double[] { ", 73.25, ",", 0.3974080269,


expected format:
rawData[0] = new double[] { 25.0, 20.0 };
rawData[1] = new double[] { 27.0, 34.0 };

How to solve delay differential equations with Maple?


diff(x(t),t) = 3*x(t)^2 + 0.3*x(x-0.03)

Hey there,

I've a numerical solved system of differential equations, which depend on one argument and one index. I can solve it, but when I try plot it I have this error: Error, (in plot) two lists or Vectors of numerical values expected.

Could anyone help me figure out what I'm doing wrong?


> restart;
> A := 115.1558549; B := .3050464658; n := 3; f0 := 0.5e-4;

> alpha := [0, 1, 2, 3, 4, 5, 6];

Theta := [3*Pi*(1/180), 6*Pi*(1/180), 9*Pi*(1/180), 12*Pi*(1/180), 15*Pi*(1/180), 18*Pi*(1/180), 21*Pi*(1/180), 24*Pi*(1/180), 27*Pi*(1/180), 30*Pi*(1/180), 33*Pi*(1/180), 36*Pi*(1/180), 39*Pi*(1/180), 42*Pi*(1/180), 45*Pi*(1/180), 48*Pi*(1/180), 51*Pi*(1/180), 54*Pi*(1/180), 57*Pi*(1/180), 60*Pi*(1/180)];

>G:= theta->A*sin(theta)*cos(2*arcsin((sin(theta)/n)))/((1+sin(theta)^2/B^2)*cos(arcsin(sin(theta)/n)));

>for j from 1 to 7 do
d1 := diff(Ir(z), z) = -sum(G(Theta[k])*Ir(z)*Is[k](z)/I0,k=1..20)-alpha[j]*Ir(z)-sum(f(Theta[k])*Ir(z),k=1..20):
d2 := diff(Is[1](z), z) = G(Theta[1])*Ir(z)*Is[1](z)/I0-alpha[j]*Is[1](z)+f(Theta[1])*Ir(z):
d3 := diff(Is[2](z), z) = G(Theta[2])*Ir(z)*Is[2](z)/I0-alpha[j]*Is[2](z)+f(Theta[2])*Ir(z):
d4 := diff(Is[3](z), z) = G(Theta[3])*Ir(z)*Is[3](z)/I0-alpha[j]*Is[3](z)+f(Theta[3])*Ir(z):
d5 := diff(Is[4](z), z) = G(Theta[4])*Ir(z)*Is[4](z)/I0-alpha[j]*Is[4](z)+f(Theta[4])*Ir(z):
d6 := diff(Is[5](z), z) = G(Theta[5])*Ir(z)*Is[5](z)/I0-alpha[j]*Is[5](z)+f(Theta[5])*Ir(z):
d7 := diff(Is[6](z), z) = G(Theta[6])*Ir(z)*Is[6](z)/I0-alpha[j]*Is[6](z)+f(Theta[6])*Ir(z):
d8 := diff(Is[7](z), z) = G(Theta[7])*Ir(z)*Is[7](z)/I0-alpha[j]*Is[7](z)+f(Theta[7])*Ir(z):
d9 := diff(Is[8](z), z) = G(Theta[8])*Ir(z)*Is[8](z)/I0-alpha[j]*Is[8](z)+f(Theta[8])*Ir(z):
d10 := diff(Is[9](z), z) = G(Theta[9])*Ir(z)*Is[9](z)/I0-alpha[j]*Is[9](z)+f(Theta[9])*Ir(z):
d11 := diff(Is[10](z), z) = G(Theta[10])*Ir(z)*Is[10](z)/I0-alpha[j]*Is[10](z)+f(Theta[10])*Ir(z):
d12 := diff(Is[11](z), z) = G(Theta[11])*Ir(z)*Is[11](z)/I0-alpha[j]*Is[11](z)+f(Theta[11])*Ir(z):
d13 := diff(Is[12](z), z) = G(Theta[12])*Ir(z)*Is[12](z)/I0-alpha[j]*Is[12](z)+f(Theta[12])*Ir(z):
d14 := diff(Is[13](z), z) = G(Theta[13])*Ir(z)*Is[13](z)/I0-alpha[j]*Is[13](z)+f(Theta[13])*Ir(z):
d15 := diff(Is[14](z), z) = G(Theta[14])*Ir(z)*Is[14](z)/I0-alpha[j]*Is[14](z)+f(Theta[14])*Ir(z):
d16 := diff(Is[15](z), z) = G(Theta[15])*Ir(z)*Is[15](z)/I0-alpha[j]*Is[15](z)+f(Theta[15])*Ir(z):
d17 := diff(Is[16](z), z) = G(Theta[16])*Ir(z)*Is[16](z)/I0-alpha[j]*Is[16](z)+f(Theta[16])*Ir(z):
d18 := diff(Is[17](z), z) = G(Theta[17])*Ir(z)*Is[17](z)/I0-alpha[j]*Is[17](z)+f(Theta[17])*Ir(z):
d19 := diff(Is[18](z), z) = G(Theta[18])*Ir(z)*Is[18](z)/I0-alpha[j]*Is[18](z)+f(Theta[18])*Ir(z):
d20 := diff(Is[19](z), z) = G(Theta[19])*Ir(z)*Is[19](z)/I0-alpha[j]*Is[19](z)+f(Theta[19])*Ir(z):
d21 := diff(Is[20](z), z) = G(Theta[20])*Ir(z)*Is[20](z)/I0-alpha[j]*Is[20](z)+f(Theta[20])*Ir(z):
dsys := {d1, d10, d11, d12, d13, d14, d15, d16, d17, d18, d19, d2, d20, d21, d3, d4, d5, d6, d7, d8, d9}:
dSol[j] := dsolve({op(dsys), Ir(0) = 1, Is[1](0) = 0.1e-1, Is[2](0) = 0.1e-1, Is[3](0) = 0.1e-1, Is[4](0) = 0.1e-1, Is[5](0) = 0.1e-1, Is[6](0) = 0.1e-1, Is[7](0) = 0.1e-1, Is[8](0) = 0.1e-1, Is[9](0) = 0.1e-1, Is[10](0) = 0.1e-1, Is[11](0) = 0.1e-1, Is[12](0) = 0.1e-1, Is[13](0) = 0.1e-1, Is[14](0) = 0.1e-1, Is[15](0) = 0.1e-1, Is[16](0) = 0.1e-1, Is[17](0) = 0.1e-1, Is[18](0) = 0.1e-1, Is[19](0) = 0.1e-1, Is[20](0) = 0.1e-1}, [Ir(z), Is[1](z), Is[2](z), Is[3](z), Is[4](z), Is[5](z), Is[6](z), Is[7](z), Is[8](z), Is[9](z), Is[10](z), Is[11](z), Is[12](z), Is[13](z), Is[14](z), Is[15](z), Is[16](z), Is[17](z), Is[18](z), Is[19](z), Is[20](z)], numeric);
end do:

>for j from 1 to 7 do
for l from 1 to 20 do

Error, (in plot) two lists or Vectors of numerical values expected

How to find the determining equation for a system of fractional differential equation using Maple 15?


I want to write a proc to calculate exponential averages. Each call will add one data point to the averge. To do that, I need to store the previous average. I can do that by handing the previous average back to the proc at the next call, but I'd rather store it in the proc. Is there a way to guarantee that a variable---once set---remains alive keeping the last value upon entering the proc again? Note that I need the variable to be local to each instance of the proc since I will have several of these running in parallel (I intend to create these procs using the module factory scheme outlined in the programming guide). So I cannot store the previous average in a global variable since that would not be unique to a given instance.

Any ideas out there?


Mac Dude


Hello, I am newbie in Maple...

I tried to make a simple iteration, and I would like to get complex results for Z2, Z4 and Z5, as they have complex tag in them.

Would anybody to be so kind, to have a look at my file, and tell me, what's the mistake?

Thank you:


I use Maple 15 to calculate some (nasty) integrals at my university. Because our university also offers a server on which I can run my Maple program, I would like to do that. (instead of occupying a workspace). But at the computer on my workspace the integrals are evaluated fine, but on the server the integrals are just returned with no numerical evaluation.

I constructed a MWE to look where it goes wrong. I set the printlevel to 25 so I could see what was going on. The MWE was suprisingly simple, on both machines (via ssh) I executed within maple:

evalf(Int(1/sqrt(x), x=0..2))

This of course would normally just give 2*sqrt(2). On my workplace-pc it worked fine and it found 2.828427125. The server just returned the integral. After looking at the steps, they where both exactly the same until the following part:


         General_flags := {_NoNAG, _DEFAULT, _NoMultiple}

            NAG_methods := {_d01ajc, _d01akc, _d01amc}

                        Method := _DEFAULT

                          HFDigits := 15

                        HFeps := 0.1 10

                    HFeps := 0.5000000000 10

   oldEvents := overflow = default, division_by_zero = default

                         callNAG := true

                            fcns := {}

                  result := 2.82842712474618807


        General_flags := {_NoNAG, _DEFAULT, _NoMultiple}

           NAG_methods := {_d01ajc, _d01akc, _d01amc}

                       Method := _DEFAULT

                         HFDigits := 15

                       HFeps := 0.1 10

                   HFeps := 0.5000000000 10

   oldEvents := overflow = default, division_by_zero = default

                         callNAG := true

                           fcns := {}

       overflow = exception, division_by_zero = exception

It seems that the server has a problem with the singularity and thus throwing an exception, but I just don't get why. The Maple-versions are both the same.

Does somebody know what this could be?


dy/dt=y(9/4 -y^2)-(x^2)y 

What Maple15 commands will display a Rouleaux tetrahedron or a Meissner tetrahedron?


I got the Real and Imaginary of an expression J1 




J1mod:=simplify((Re(J1))^2+(Im(J1))^2): (I works here this amont is real)


but when I change the expression  for J1 to be



J1mod here is complex(I dont know why? it doesnt separate the real and the im )

Any comments will help


    Intersection of surfaces:

x3-.25*(sin(4*x1)+sin(3*x2+x3)+sin(2*x2))=0;  (1)

(x1-xx1)^4+(x2-xx2)^4+(x3-xx3)^4-1=0;          (2)   

   Surface (1) and a set of surfaces (2). Point (xx1, xx2, xx3) belongs to (1). Moving along the surface (1), we compute its intersection with the surface (2).
   The program is very simple and its algorithm can be used for many other combinations of equations.  

3 4 5 6 7 8 9 Last Page 5 of 41