Maple 18 Questions and Posts

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

Just like the title described, I have encountered an error when I use the command "expand". Actually, I just follow the example, but it doesn't work. Please help me or tell me how can I solve it in other commands.

alias(epsilon = e, omega = w, omega[0] = w0, t[1] = t1, t[2] = t2); e := proc (t1, t2) options operator, arrow; e end proc; w0 := proc (t1, t2) options operator, arrow; w0 end proc; a := proc (t1, t2) options operator, arrow; a end proc; f := proc (t1, t2) options operator, arrow; f end proc; mu := proc (t1, t2) options operator, arrow; mu end proc;
ode := (D@@2)(u)+2*mu*e*D(u)+w0^2*u+e*w0^2*u^3-e*f*cos(omega*t) = 0;
     @@(D, 2)(u) + 2 mu epsilon D(u) + omega[0]  u

                          2  3                             
        + epsilon omega[0]  u  - epsilon f cos(omega t) = 0
e_oredr := 1;
ode := simplify(subs(D = sum('e^(i-1)*D[i]', 'i' = 1 .. e_oredr+1), ode), {e^(e_oredr+1) = 0});
 / 3         2                                                 
 \u  omega[0]  + 2 (epsilon D[2] + D[1])(u) mu - cos(omega t) f

                  \                   2                   
    + 2 D[1, 2](u)/ epsilon + omega[0]  u + D[1, 1](u) = 0
simplify(collect(%, e), {e^(e_oredr+1) = 0});

u := sum('v[i]*e^i', 'i' = 0 .. e_oredr);
                      epsilon v[1] + v[0]
ode := simplify(collect(ode, e), {e^2 = 0});
for i from 0 to e_oredr do eq[i] := coeff(lhs(ode), e, i) = 0 end do;
               omega[0]  v[0] + D[1, 1](v[0]) = 0
       3         2           2                       
   v[0]  omega[0]  + omega[0]  v[1] + 2 D[1](v[0]) mu

      - cos(omega t) f + 2 D[1, 2](v[0]) + D[1, 1](v[1]) = 0
remove(has, lhs(eq[1]), cos); convert(%(t1, t2), diff);
eq[1] := %-convert(f*cos(sigma*t2+t1*w0), 'exp');

v[0] := A(t2)*cos(w0*t1+B(t2)); convert(%, 'exp'); v[0] := unapply(%, t1, t2);
       (t1, t2) -> A(t2) |- exp(I (omega[0] t1 + B(t2)))

            1                              \
          + - exp(-I (omega[0] t1 + B(t2)))|
            2                              /

Error, (in property/ConvertProperty) invalid input: PropRange uses a 2nd argument, b, which is missing
collect(%, exp(I*w0*t1));
Error, (in collect) invalid 1st argument proc (t1, t2) options operator, arrow; A(t2)*((1/2)*exp(I*(w0*t1+B(t2)))+(1/2)*exp(-I*(w0*t1+B(t2)))) end proc
coeff(%, exp(I*w0*t1));
map(proc (x) options operator, arrow; x*exp(-I*B(t2)) end proc, %);
combine(%, 'exp');
subs(I*B(t2) = I*sigma*t2-I*C(t2), B(t2) = sigma*t2-C(t2), %);
conds := combine(%, 'exp');


how to find skin friction value below code



PDEtools[declare]((U, W, T, C)(y), prime = y):

R1 := .1; R0 := .1; m := .1; a := .1; Ha := .1; Nt := .1; Nb := .1; Pr := 6.2; Le := .6; Bi := 1; Ec := .1; k := 1; r := .1; A := 1;

sys := diff(U(y), `$`(y, 2))+(R1*(diff(U(y), y))-2*R0*W(y))*exp(a*T(y))-a*(diff(U(y), y))*(diff(T(y), y))-Ha = 0, diff(W(y), `$`(y, 2))+(R1*(diff(W(y), y))+2*R0*U(y))*exp(a*T(y))-a*(diff(W(y), y)) = 0, diff(T(y), `$`(y, 2))+R1*Pr*(diff(T(y), y))+Pr*Ec*exp(-a*T(y))*((diff(U(y), y))*(diff(U(y), y))+(diff(W(y), y))*(diff(W(y), y)))+Pr*Ha*Ec*((U(y)+m*W(y))*(U(y)+m*W(y))+(W(y)-m*U(y))*(W(y)-m*U(y)))/(m^2+1)^2+Nb*(diff(T(y), y))*(diff(C(y), y))+Nt*(diff(T(y), y))*(diff(T(y), y)) = 0, diff(C(y), `$`(y, 2))+Pr*Le*R1*(diff(C(y), y))+Nt*(diff(C(y), `$`(y, 2)))/Nb = 0:

ba := {sys, C(0) = 0, C(1) = 1, T(1) = 0, U(0) = 0, U(1) = 0, W(0) = 0, W(1) = 0, (D(T))(0) = Bi*(T(0)-1)}:

r1 := dsolve(ba, numeric, output = Array([0., 0.5e-1, .10, .15, .20, .25, .30, .35, .40, .45, .50, .55, .60, .65, .70, .75, .80, .85, .90, .95, 1.00])):


p1u := odeplot(r1, [y, U(y)], 0 .. 1, numpoints = 100, labels = ["y", "U"], style = line, color = green); 


Hi all,

I have the following expression,

Typesetting[delayDotProduct](b, K[P], true)+k*K[D]-(Typesetting[delayDotProduct](b, m[1], true)+Typesetting[delayDotProduct](b, m[2], true)+K[D]*m[2])*k*K[P]/(Typesetting[delayDotProduct](b, K[D], true)+k*m[1]+k*m[2]+K[P]*m[2]-m[1]*m[2]*(Typesetting[delayDotProduct](b, K[P], true)+k*K[D])/(Typesetting[delayDotProduct](b, m[1], true)+Typesetting[delayDotProduct](b, m[2], true)+K[D]*m[2]))

where K and K_P are the controller gains, k is the stiffness, b is the damper, m1 and m2 are masses.

How can I find the condition on variables such that the numerator of this expression is greater that zero?

The conditions should appear as inequalities.









How to convert maple file into the pdf file?For example the attacahed file is maple file.I want to convert this to a pdf file.

Hi, i want to investigate  chaos for the problem , cantilever beam under random narro band excitation, but the code has errors .the code is this:

      restart:with(plots):      h:=1: Omega:=(0..376):alpha1:=617.2:alpha2:=1.02*10^(8): c:=.002:k:=18.4:  step:=0.1:imax:=376:  for i from 0 to imax do;  Omega[i]:=i*step:   f:=evalf(solve({((-a*Omega[i]^(2)+alpha1*a+3/(4)*alpha2*a^(3)+1/(4)*k*Omega[i]^(2)*a^(3)-(3)/(4)*k*Omega[i]^(2)*a^(3))^(2)+(c*Omega[i]*a^())^(2))=h^(2),a>0}));  ff[i]:=((rhs(f[1]))^(2))/(2):  end do:   l1:=[[Omega[n],ff[n]] $n=0..imax]:  p1:=plot(l1, x=0..3,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):    jmax:=914: f1:=array(377..914):f2:=array(377..914):f3:=array(377..914):Omega1:=array(377..914):  for j from 377to jmax do;  Omega1[j]:=j*step:   fff:=evalf(solve({((-a*Omega1[j]^(2)+alpha1*a+3/(4)*alpha2*a^(3)+1/(4)*k*Omega1[j]^(2)*a^(3)-(3)/(4)*k*Omega1[j]^(2)*a^(3))^(2)+(c*Omega1[j]*a^())^(2))=h^(2),a>0}));  f1[j]:=((rhs(fff[1,1]))^(2))/(2):f2[j]:=((rhs(fff[2,1]))^(2))/(2):f3[j]:=((rhs(fff[3,1]))^(2))/(2):  end do:   ll1:=[[Omega1[n],f1[n]] $n=377..jmax]:  pp1:=plot(ll1, x=0..10,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):    ll2:=[[Omega1[n],f2[n]] $n=377..jmax]:  pp2:=plot(ll2, x=0..10,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):    ll3:=[[Omega1[n],f3[n]] $n=377..jmax]:  pp3:=plot(ll3, x=0..15,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):       plot({  seq(seq(p1), seq(seq(pp1),seq(seq(pp2),seq(seq(pp3))  },style=point,title=`Pitchfork Diagram`);  Thanks for your help

Does any body have example of maple code for solving optimal control problem in deterministic model using Pontryagin's maximum (or minimum) principle?

Hello everyone,

I am experiencing a strange result. The Theta_double_dot got equated to zero in line 1.7. Please see the red arrow.

(I am using the Physics package)

How can I solve this issue?


Please help me. I Have to solve some equations with Adomian Decomposition Method in Maple. But i don't know it.

I just know AGM, HPM and Perturbation Method in Maple.

please send me instructions and codes.

I'm sorry, I can't speak English well. I hope you understand what I mean.

thank you

hello , there , i want ask a Question ,

i have a vector result n hier , and there is a long part with ^1/2 (like unter) , which is not defined before , just from compute ,i want to replace this part with A, and have tried to use subs , but it didnt work . 

And i have tried to define it before compute, and then use subs , aber it also didnt work .

so how can i replace or define this part in the result?



how do i solve a system of PDE's with variable coeffiecients in Maple?

Hi everyone

I have a problem with differentiating an equation. I have the following code:

(sum((x(i)-M)^3, i = 1 .. n))/(n*((sum((x(i)-M)^2, i = 1 .. n))/(n-1))^(3/2));

The values of x(i) is available in Excel and I want to import that. For this case, I copy the column and paste in maple and it seems work fine. But, I want to calculate the differentiate of the summation with respect to x(i) and M and find the answer. I don't know how to write the code appropriately.

In other words, how could I differetiate the following function with respect to x(i) and put the values from excel into it.

(sum((x(i)-M)^3, i = 1 .. n))/(n*((sum((x(i)-M)^2, i = 1 .. n))/(n-1))^(3/2));


Thank you so much for your kind attentions  in advance


I am new to maple. how do i segregate different term in long PDE in maple

Dear Maple users,

I am solving a system of linear equations Ax=b where A is a matrix (243*241) which contains a rational polynomial of unknown "kappa" along with floating numbers. As suggested in some other posts I am using Linear algebra package with the LinearSolve command and option "solve" to find out unknown vector x. b is a vector having entries zero and 1. The system is such that two equations are redundant but it is difficult to recognise which two are redundant and hence for the time being I am keeping them in the matrix. (For a known value of kappa (say kappa=2) I have checked that two equations are redundant.) For the reference, the matrix and the right-hand vector b is attached as text.

There are two issues

1) Maple takes very long time (12 hours and so) to get x=b\A;

2) The result is a long expression i.e.  x[i] is a rational polynomial in kappa; a very long rational polynomial which I am importing as a text. I am not sure if maple exports all terms in the polynomial as for the different value of kappa I see Ax-b >0. 

How can I overcome this problem? Any help will be greatly appreciated. 

I have final project to make a media for learning mathematic using maple. But I'm so confused to make a net of cuboid, anybody can help me? please :D

Dear all

I have an operator given below in the image. I want expand this operator upto order 5, when there are three independent variables x, y, t(i=1,2,3). The expansion can also be obtained manually, but that is always prone mistake, is the expansion posible using any routine of Differential Geometry package?

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