Items tagged with syntax


I'm trying to calculate the trajectory of a 3-particle system. I defined my parameters. Wrote a do loop. Got the number of iterations I expected. But when I look at the tables of position for each particle after I run the loop, the trajectory only changes for the first iteration, then it stays the same. In other words, it shows that the particle moved slightly after the first increment of time, but thereafter it doesn't move.


for i to N do x[11] := x[1]+tau*vx[1]+(1/2)*tau^2*F[x1]; y[11] := y[1]+tau*vy[1]+(1/2)*tau^2*F[y1]; x[21] := x[2]+tau*vx[2]+(1/2)*tau^2*F[x2]; y[21] := y[2]+tau*vy[2]+(1/2)*tau^2*F[y2]; x[31] := x[3]+tau*vx[3]+(1/2)*tau^2*F[x3]; y[31] := y[3]+tau*vy[3]+(1/2)*tau^2*F[y3]; R[1] := [op(R[1]), [x[11], y[11]]]; R[2] := [op(R[2]), [x[21], y[21]]]; R[3] := [op(R[3]), [x[31], y[31]]]; V[1] := [op(V[1]), [vx[11], vy[11]]]; V[2] := [op(V[2]), [vx[21], vy[21]]]; V[3] := [op(V[3]), [vx[31], vy[31]]] end do:




I am trying to plot some graphs for a differential equations class. I need to plot two equations (soln1a, soln1b1) in one graph, with the two curves overlayed on each other. I am trying to plot them on a graph named "gr1c". The error I get says "Error, (in plots/multiple) empty plot". Clicking on the error results in a webpage saying that "There is no help page available for this error".

When I plot each equation separately, there are no errors. The graphing command that works for soln1a is 



and the graphing command that works for soln1b1 is


My code is as follows. I would greatly appreciate any help ASAP to remove the error. Thank you!



deG:=diff(theta(t),t,t) + mu*diff(theta(t),t)+K*sin(theta(t))= 0;
deL:=diff(theta(t),t,t) + mu*diff(theta(t),t)+K*theta(t)= 0;
Iv:=theta(0)=0.75, D(theta)(0)=2.0;



I am coding a big module to solving my project : analyze function in math, but when I compile my module maple return "Error," but it doesn't tell me what error happened.

I check the maple help and it said:" If no msgString is given, error raises the most recently occurring exception" but I have no exception before. 

This is the pic of that error.

Thank for your help.

Hi, everybody.

I have a problem when I try to plot3d a sub-surface from a surface as follows:


S := proc (u, v) options operator, arrow; Matrix([[40*u], [80*v], [10*u^2*v+20*u*v+15]]) end proc;

proc (u, v) options operator, arrow; Matrix([[40*u], [80*v], [10*u^2*v+20*u*v+15]]) end proc


S(u, v)

Matrix(3, 1, {(1, 1) = 40*u, (2, 1) = 80*v, (3, 1) = 10*u^2*v+20*u*v+15})



p:= proc(u,v) if u<v then S(u,v) else S(u,v)+10 end if end proc:

h:= proc(u) 2*u  end proc:

plot3d(p, 0 .. 1, 0 .. h)

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct







Please help me!


Thanks and have a nice day.



I'm new to maple and I'm trying to write code in worksheet mode with some source code I have, I don't understand some of the syntax though, like the next:

m,  mass
r,  radius

J=m*r^2; Inertia


m and r are variables, so does this syntax mean that after the comma I set a name or label to the variables? because I tried to follow the same logic with 2d input math but it doesn´t work.

In this file you will be able to observe and analyze how the exercises and problems of Kinematics and Dynamics are solved using the commands and operators through a very well-structured syntax; Allowing me to save time and use it in interpretation. I hope you can share and spread to break the traditional and unnecessary myths. Only for Engineering and Science. Share if you like.

In Spanish.

Lenin Araujo Castillo

Ambassador of Maple


I need to calculate the following complex integral:

oint_C { [(z^4exp(2z)+1)/(z+i)^3] - [(z^3+z)/{(z-2i)(z-5)}] + 8*Pi*exp } dz,


Where C is the circumference |z-1| = sqrt(11/2), positively oriented.


Someone can help me, I already researched but I can not integrate.

Dear all,

I use the following statment (without numerical values)

if        IT<20     then        IT:=IT+1            

 if    ZUM<(0.1)^(8);    IT=20;         else;    

for i from 1 to 10   do                               YU[i]:=U[i];                  od;    

for i from 2 to 9 do                           DU1:=YU[i+1]- YU[i-1];        od:      

end if;    


end if;  

the following error occur

where is the problem.

Can't understand what's wrond. This text from my academic books but it doesn't work on practice. Help please


plot3d(polygons([[0, 0, 0], [1, 0, 0], [1, 0, 0], [0, 1, 0]], [[0, 0, 0], [0, 1, 0], [0, 1, 1], [0, 0, 1]], [[1, 0, 0], [1, 1, 0], [1, 1, 1], [1, 0, 1]], [[0, 0, 0], [1, 0, 0], [1, 0, 1], [0, 0, 1]], [[0, 1, 0], [1, 1, 0], [1, 1, 1], [0, 1, 1]], [[0, 0, 1], [1, 0, 1], [1, 1, 1], [0, 1, 1]]), light(0, 0, 0.0, 0.7, 0.0), light(100, 45, 0.7, 0.0, 0.0), light(100, -45, 0.0, 0.0, 0.7), ambientlight(.4, .4, .4), title(cube), style(patch), color(zhue));

Error, (in plot3d) bad range arguments: light(0, 0, 0., .7, 0.), light(100, 45, .7, 0., 0.)

Hi I was wondering if you can help me with some maple commands about using Euler's method. My professor created a tutorial on using some commands to calculate the value via Euler's method. 

Her commands in the tutorial for using Euler's method  for a differential equation- dy/dx= x+y   y(0)=1



f:=(x,y) -> x+y


This next step confuses me the most, my professor uses this syntax to compute the values of approximation via Euler's method. N represents the number of pieces we want to approximate the value with. X0 is initial and XF is final. 

forifrom1tondo k:=f(x,y):y:=y+h*k:x:=x+h:print(x,y):od:

I tried replicating this syntax on the exact same problem, copying the syntax commands word for word. Yet, I keep getting the same error "unable to parce" error, with the "od" being highlighted. But on her tutorial, it gave her an two columns with the intervals (n) and all it's values. She even did the same did for only wanting 1 loop printed 

forifrom1tondo k:=f(x,y):y:=y+h*k:x:=x+h:od:print(x,y):.   And it gave her only 1 loop.

I tried both and still got the error. Please Help, Thanks in advance

 helo my friends,

i try to do this code, please help me to understant what is the problem

מציג את image.png

I am tying to compute the wronskian of a fourth order DE: y=C1e2x+ C2e-x +C3xe-x+ C4x2e-x Here's what I did:


Determinant(Wronskian([e^(2*x), e^(-x), xe^(-x), x^2*e^(-x)], x)):

which gave nothing.
Can anyone please help?

Thanks in advance,


I can't get the Real and Imaginary parts of matrix to seperate out as required. It is an SU(2) matrix. Want to convert is to a 4 Vector (quaternion). I think because Maple doesnt know what psi(t) is being conservative so to speak. Tried assume, assuming...


assume*{psi(t), 'real'}

assume*{real, psi(t)}


V := Matrix(2, 2, {(1, 1) = (1/4)*cos((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))-I*cos((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))-((1/2)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t)), (1, 2) = (1/2)*cos((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))+((1/4)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))-sin((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t)), (2, 1) = ((1/4)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))+sin((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))-(1/2)*cos((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t)), (2, 2) = ((1/2)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))+(1/4)*cos((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))+I*cos((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))})

Matrix(%id = 18446744074495800014)




v := Vector(4, [Re(V[1, 1]), Im(V[1, 2]), Re(V[2, 1]), Im(V[1, 1])])

Vector[column](%id = 18446744074531387982)





Where I made a mistake I got this error in for loop and how to fix it?



Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received shareman


N := 5:

c__1 := Matrix([[c1__11, c1__12, 0], [c1__12, c1__22, 0], [0, 0, c1__66]]):

c__2 := Matrix([[c2__11, c2__12, 0], [c2__12, c2__22, 0], [0, 0, c2__66]]):

c__3 := Matrix([[c3__11, c3__12, 0], [c3__12, c3__22, 0], [0, 0, c3__66]]):

c__4 := Matrix([[c4__11, c4__12, 0], [c4__12, c4__22, 0], [0, 0, c4__66]]):

c__5 := Matrix([[c5__11, c5__12, 0], [c5__12, c5__22, 0], [0, 0, c5__66]]):


Q := Array(1 .. 3, 1 .. 3, 1 .. N):

A := Matrix([[0, 0, 0], [0, 0, 0], [0, 0, 0]]):

Z := Matrix([[h__1], [h__2], [h__3], [h__4], [h__5], [h__6]]):

for ii to 3 do for jj to 3 do Q(ii, jj, 1) := c__1(ii, jj); Q(ii, jj, 2) := c__2(ii, jj); Q(ii, jj, 3) := c__3(ii, jj); Q(ii, jj, 4) := c__4(ii, jj); Q(ii, jj, 5) := c__5(ii, jj) end do end do

"for i from 1  to 3 do for j from 1 to 3 do Ar:=0:for k from 1 to N do  Ar:=(Q (i,j,k)*(Z(k+1)-Z(k)))+Ar: end do A(i,j):=Ar: end do end do"

Error, invalid loop statement termination

"for i from 1  to 3 do for j from 1 to 3 do Ar:=0:for k from 1 to N do Ar:=(Q (i,j,k)*(Z(k+1)-Z(k)))+Ar: end do A(i,j):=Ar: end do end do"






i got this code, but for any n = 2N (par) i get some high errors, my M goes nuts.  anyone knwos wheres my mistake?

With(CurveFitting); Digits; 5; f := proc (x) options operator, arrow; abs(x) end proc; n := 8; h := 2/n; for i from 0 to n do x[i] := h*i-1 end do; for i from 0 to n-1 do L[i] := (product((x-x[j])/(x[i]-x[j]), j = 0 .. i-1))*(product((x-x[k])/(x[i]-x[k]), k = i+1 .. n-1)) end do; lagr := sum(f(x[p])*L[p], p = 0 .. n-1); P := expand(lagr); plot({P, f(x)}, x = -1 .. 1, y = 0 .. 2); M := maximize(abs(abs(x)-P), x = -1 .. 1); M1 := numapprox:-infnorm(abs(abs(x)-P),

x = -1 .. 1)


Thanks in advance

1 2 3 4 5 6 7 Last Page 2 of 10