Maple 2015 Questions and Posts

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


Using plot3d(..., style=surfacecontour, ...) or contourplot3d(...) displays wrong level curves when some axis are switched to a log mode.

Example:

restart:

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

X := (0.4000000000e-4*(-R+80.00))/(R*(0.4e-1+M__a)):

plot3d(X, R=0..10, M__a=10^0..10^4, style=surfacecontour, color=gold)

 

plot3d(X, R=0..10, M__a=10^0..10^4, axis[2]=[mode=log], axis[3]=[mode=log], style=surfacecontour, color=gold)

 

plots:-display(
  plots:-contourplot3d(X, R=0..10, M__a=10^0..10^4, axis[2]=[mode=log], axis[3]=[mode=log], color=red),
  plot3d(X, R=0..10, M__a=10^0..10^4, style=surface, color=gold)
)

 

 

Download WrongLevelCurves.mw

 

The problem is not dramatic because there is a workaround.
 

restart:

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

X := (0.4000000000e-4*(-R+80.00))/(R*(0.4e-1+M__a)):

fig := plot3d(X, R=0..10, M__a=10^0..10^4, style=surfacecontour, color=gold):
Tr  := plottools:-transform((x, y, z) -> [x, log[10](y), log[10](z)]):
plots:-display(Tr(fig), axis[2]=[tickmarks=[seq(i=10^i, i=0..4)]], axis[3]=[tickmarks=[seq(i=nprintf("%1.0e", 10.^i), i=-7..-1)]])

 

 

Download WrongLevelCurves_Workaround.mw

 

Even though this question is related to this one 
https://www.mapleprimes.com/questions/234781-How-Can-I-Get-The-Desired-Answer-From-solve
feel it is about a different issue. If any of you feel otherwise feel free to move it to the original one.

In this notional example  the name _Z1~ is created by RootOf: and here is an ad hoc way to catch it.

restart:

f := RootOf(cos(x)-z, x):
u := indets(f, name);
s := series(f, z):
v := remove(type, indets(s, name), constant);
w := v minus u

{z}

 

{_Z1, z}

 

{_Z1}

(1)

 

Download Example_1.mw

In this more complex example an assumption must be made on M to obtain ths desired solution g and the previous method no longer works.

restart

f := 10*cos((-1+t)/sqrt(1+M))-10*cos(t/sqrt(1+M)):
assume(M::nonnegative):
u := indets(f, name);
g := solve({diff(f, t), t>0 }, t, allsolutions)[1][1];
v := remove(type, indets(rhs(g), name), constant);
w := v minus u

{M, t}

 

t = Pi*_Z2*(1+M)^(1/2)-arctan((cos(1/(1+M)^(1/2))+1)/sin(1/(1+M)^(1/2)))*(1+M)^(1/2)

 

{M, _Z2}

 

{M, _Z2}

(1)

 

Download Example_2.mw

I have tried using select to "capture" the name _Z2~ but I can't know how to distinguish M~ from _Z2~ (is there a type which could be used?).

Can you helpm fix this?
TIA

I don't understand why the solution of sys_2 isn't those of sys_1 when M__p=1 and M__a=0 ?

Traces of the computation seem to indicate that dsolve proceeds exactly the same for sys_2 and sys_1 .

Please note that sol_1 contains a term of the form t*cos(t) that sol_2 doesn't, thus the question: "Is sol_2 correct?"

Could you help me to fix this?
TIA

restart

infolevel[dsolve] := 4;

4

(1)

sys_1 := {diff(x(t), t$2)=sin(t)-x(t), x(0)=0, D(x)(0)=0};
sol_1 := dsolve(sys_1)

{diff(diff(x(t), t), t) = sin(t)-x(t), x(0) = 0, (D(x))(0) = 0}

 

Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
trying high order exact linear fully integrable
trying differential order: 2; linear nonhomogeneous with symmetry [0,1]
trying a double symmetry of the form [xi=0, eta=F(x)]
-> Try solving first the homogeneous part of the ODE
   checking if the LODE has constant coefficients
   <- constant coefficients successful
   -> Determining now a particular solution to the non-homogeneous ODE
      building a particular solution using variation of parameters
<- solving first the homogeneous part of the ODE successful

 

x(t) = (1/2)*sin(t)-(1/2)*cos(t)*t

(2)

sys_2 := {(M__p+M__a)*diff(x(t), t$2)=M__p*sin(t)-x(t), x(0)=0, D(x)(0)=0};
sol_2 := dsolve(sys_2)

{(M__p+M__a)*(diff(diff(x(t), t), t)) = M__p*sin(t)-x(t), x(0) = 0, (D(x))(0) = 0}

 

Methods for second order ODEs:
--- Trying classification methods ---
trying a quadrature
trying high order exact linear fully integrable
trying differential order: 2; linear nonhomogeneous with symmetry [0,1]
trying a double symmetry of the form [xi=0, eta=F(x)]
-> Try solving first the homogeneous part of the ODE
   checking if the LODE has constant coefficients
   <- constant coefficients successful
   -> Determining now a particular solution to the non-homogeneous ODE
      building a particular solution using variation of parameters
<- solving first the homogeneous part of the ODE successful

 

x(t) = sin(t/(M__p+M__a)^(1/2))*M__p*(M__p+M__a)^(1/2)/(M__p+M__a-1)-M__p*sin(t)/(M__p+M__a-1)

(3)

eval(sol_2, [M__p=1, M__a=0])

Error, numeric exception: division by zero

 

 

Download SomethingWrong.mw

PS: Already, in the following case, dsolve doesn't return the solution of sys_1.

sys_3 := {(A+B)*diff(x(t), t$2)=(A+B)*sin(t)-x(t), x(0)=0, D(x)(0)=0};
sol_3 := dsolve(sys_3)

If I do this

sys_4 := {(A+B)*diff(v(t), t)=(A+B)*sin(t)-x(t), diff(x(t), t)=v(t), x(0)=0, v(0)=0}:
sol_4 := dsolve(sys_4)

I get a very complex solution wich contains a piecewise function which separates the cases A+B=1 and A+B<>1.
Evaluating sol_4 for A+B=1 gives the same expression than sys_1:

simplify(eval(sol_4, A=1-B), trig)
       /       1                  1          1         \ 
      { v(t) = - sin(t) t, x(t) = - sin(t) - - cos(t) t }
       \       2                  2          2         / 

Here is a workaround to get the correct solution of sys_2:

sys_5 := {(M__P+M__A)*diff(v(t), t)=(M__P+C)*sin(t)-x(t), diff(x(t), t)=v(t), x(0)=0, v(0)=0}:
sol_5 := dsolve(sys_5):
simplify(eval(sol_5, [M__P=1, M__A=0, C=0]), trig)
       /       1                  1          1         \ 
      { v(t) = - sin(t) t, x(t) = - sin(t) - - cos(t) t }
       \       2                  2          2         / 

e

I compute the solution of this differential system

shock := piecewise(t <0, 0, t < 1, 10, 0):
sys   := {(M__p+M__a)*diff(x(t), t$2)=M__p*shock-x(t), x(0)=0, D(x)(0)=0}
sol   := unapply(rhs(dsolve(sys)), (M__p,M__a))

I'm interested in 3 quantities:

  • the first time tend > 0 such that sol(tend) = 0,
  • the time tmax in (0..tend) where sol(tmax) reaches its maximum value,
  • the value xmax = sol(tmax).

Since sol has a relatively simple expression, I first attempted to use solve for calculating tend, but that didn't work.
The conclusion is still the same for tmax and xmax.

The values of these 3 quantities that I expect solve to provide, are those obtained using fsolve.

Can you explain me the failures I faced and show me how to force solve to get these values?
TIA

ToyProblem.mw

Hello Everyone;

Hope you are fine. I need to solve the system of equation. I am using fsolve command but it is not working. Kindly guide me.

Thanks

ques.mw

restart

``

``

Eq[0, 0] := 1.33120000000000000000000000000*lambda[0, 1]+1.33120000000000000000000000000*lambda[0, 2]+1.33120000000000000000000000000*lambda[0, 3]+1.33120000000000000000000000000*lambda[0, 4] = .916487142969312002551492271668:

Eq[0, 1] := 1.32901933598375616624661615670*lambda[0, 1]+1.32901933598375616624661615670*lambda[0, 2]+1.32901933598375616624661615670*lambda[0, 3]+1.32901933598375616624661615670*lambda[0, 4] = 1.09232395220587507357427365904:

Eq[0, 2] := 1.37120000000000000000000000000*lambda[0, 1]+1.37120000000000000000000000000*lambda[0, 2]+1.37120000000000000000000000000*lambda[0, 3]+1.37120000000000000000000000000*lambda[0, 4] = 1.25415129307905065856083635281:

Eq[0, 3] := .966980664016243833753383843299*lambda[0, 1]+.966980664016243833753383843299*lambda[0, 2]+.966980664016243833753383843299*lambda[0, 3]+.966980664016243833753383843299*lambda[0, 4] = 1.37114174964252179339832329224:

``

``

fsolve({seq(Eq[0, ii1], ii1 = 0 .. 3)});

fsolve({.966980664016243833753383843299*lambda[0, 1]+.966980664016243833753383843299*lambda[0, 2]+.966980664016243833753383843299*lambda[0, 3]+.966980664016243833753383843299*lambda[0, 4] = 1.37114174964252179339832329224, 1.32901933598375616624661615670*lambda[0, 1]+1.32901933598375616624661615670*lambda[0, 2]+1.32901933598375616624661615670*lambda[0, 3]+1.32901933598375616624661615670*lambda[0, 4] = 1.09232395220587507357427365904, 1.33120000000000000000000000000*lambda[0, 1]+1.33120000000000000000000000000*lambda[0, 2]+1.33120000000000000000000000000*lambda[0, 3]+1.33120000000000000000000000000*lambda[0, 4] = .916487142969312002551492271668, 1.37120000000000000000000000000*lambda[0, 1]+1.37120000000000000000000000000*lambda[0, 2]+1.37120000000000000000000000000*lambda[0, 3]+1.37120000000000000000000000000*lambda[0, 4] = 1.25415129307905065856083635281}, {lambda[0, 1], lambda[0, 2], lambda[0, 3], lambda[0, 4]})

(1)

``

``

Download ques.mw

Can pacemaker and corosync work with maple?

How to setup pacemaker and Corosync to maple work in Amazon EC2?

i had only one installed License in linux

how to make it work in clusters ?

what is the difference with supercomputing in Amazon ?

which consulting company in Hong Kong can help to use supercomputing in Amazon in my case ? I would like to run batch of batch total 100 script running maple in one instance , but total numbers need to run around 60 years. Any consultant to calculate and setup this supercomputing or pacemaker to make calculations into one day or a few days ? 

 

How can i see analytical maple calculations?

Hello Everyone;

Hope you are fine. My problem is convert into nonlinear system of ODE's and further i need make the code of apply rk-4 for the formulated ODE's. Kindly guide me. The file is attached. I am waiting for your kind response.

Thanks

Question3.mw

 


 

restart

``

var111 := [C[1, 1](t), C[1, 2](t), C[1, 3](t), C[2, 1](t), C[2, 2](t), C[2, 3](t), C[3, 1](t), C[3, 2](t), C[3, 3](t), ZETA[1](t), ZETA[2](t), ZETA[3](t)]:

sysM := [diff(C[1, 1](t), t) = -(3/16)*Pi*(C[2, 1](t)+4*C[1, 1](t)), diff(C[1, 2](t), t) = -5*Pi*(C[2, 2](t)+4*C[1, 2](t)), diff(C[1, 3](t), t) = -(945/4)*Pi*(C[2, 3](t)+4*C[1, 3](t)), diff(C[2, 1](t), t) = -(1/8)*Pi*(C[3, 1](t)+6*C[2, 1](t)+6*C[1, 1](t)), diff(C[2, 2](t), t) = -10.4719755119659774615421446110*C[3, 2](t)-62.8318530717958647692528676658*C[2, 2](t)-62.8318530717958647692528676658*C[1, 2](t)-2.38361014507273884349657421134*10^15*ZETA[1](t)*C[1, 1](t), diff(C[2, 3](t), t) = -494.800842940392435057866332869*C[3, 3](t)-2968.80505764235461034719799721*C[2, 3](t)-2968.80505764235461034719799721*C[1, 3](t)-1.35954060126371030332767566128*10^16*ZETA[1](t)*C[1, 2](t)-1.35954060126371030332767566128*10^16*ZETA[2](t)*C[1, 1](t), diff(C[3, 1](t), t) = -(3/8)*Pi*(2*C[3, 1](t)+3*C[2, 1](t)), diff(C[3, 2](t), t) = -62.8318530717958647692528676658*C[3, 2](t)-94.2477796076937971538793014986*C[2, 2](t)-1.12625579354686910355213131486*10^17*ZETA[1](t)*C[2, 1](t), diff(C[3, 3](t), t) = -2968.80505764235461034719799721*C[3, 3](t)-4453.20758646353191552079699581*C[2, 3](t)-6.42382934097103118322326749959*10^17*ZETA[1](t)*C[2, 2](t)-6.42382934097103118322326749959*10^17*ZETA[2](t)*C[2, 1](t), diff(ZETA[1](t), t) = -(1/3)*C[2, 1](t), diff(ZETA[2](t), t) = -(1/3)*C[2, 2](t), diff(ZETA[3](t), t) = -(1/3)*C[2, 3](t)]:

ICS := [C[1, 1] = 0.998238989835086492681507032141e-1, C[1, 2] = -0.137051161872492529218951625903e-1, C[1, 3] = -0.629146365720807620696267926206e-2, C[2, 1] = 0.923300332435106257640735267282e-1, C[2, 2] = -0.126762613568515069966837491839e-1, C[2, 3] = -0.581915808273854734025727975244e-2, C[3, 1] = -0.190143920352772604950256237747e-1, C[3, 2] = 0.261054171122321128306306984717e-2, C[3, 3] = 0.119839394846335068333097530793e-2, ZETA[1] = .464598743230343884242076682299, ZETA[2] = .429720916976380440572769663279, ZETA[3] = -0.884964696113332752036741498040e-1]:

``


 

Download Question3.mw

Hello Everyone;

Hope you are fine. I have set of following ODE's;

Every variable has two ODE's. I need to take one ODE for each variable. Is that any way?
I am waiting for your kind response.

Thanks

Question2.mw

Hello Everyone;Hope you are fine. I am trying to convert the nonlinear system of ODE's into matric form using the following comand but not working it.

 

Kindly help me to do this. The cose is pasted and also attached. I am waiting for your kind response.

Thanks.

Question1_NEW.mw


 

restart; with(PDEtools, Solve); with(LinearAlgebra); with(plots); with(plottools); printlevel := 2

NULL

ZETA[0] := proc (t) options operator, arrow; 0 end proc:

sys222 := [(3/16)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[1, 1](t), t) = 0, 5*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[1, 2](t), t) = 0, 800*ZETA[0](t)*C[1, 1](t)*Pi+(3/4)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[2, 1](t), t) = 0, 4320*ZETA[1](t)*C[1, 1](t)*Pi+4320*ZETA[0](t)*C[1, 2](t)*Pi+20*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[2, 2](t), t) = 0, diff(ZETA[1](t), t)+(1/3)*C[2, 1](t) = 0, diff(ZETA[2](t), t)+(1/3)*C[2, 2](t) = 0]

[(3/16)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[1, 1](t), t) = 0, 5*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[1, 2](t), t) = 0, (3/4)*Pi*C[2, 1](t)+(3/4)*Pi*C[1, 1](t)+diff(C[2, 1](t), t) = 0, 4320*ZETA[1](t)*C[1, 1](t)*Pi+20*Pi*C[2, 2](t)+20*Pi*C[1, 2](t)+diff(C[2, 2](t), t) = 0, diff(ZETA[1](t), t)+(1/3)*C[2, 1](t) = 0, diff(ZETA[2](t), t)+(1/3)*C[2, 2](t) = 0]

(1)

var1 := {C[1, 1](t), C[1, 2](t), C[2, 1](t), C[2, 2](t), ZETA[1](t), ZETA[2](t)};

{C[1, 1](t), C[1, 2](t), C[2, 1](t), C[2, 2](t), ZETA[1](t), ZETA[2](t)}

(2)

f, diffs := eval(GenerateMatrix(`~`[`-`](`~`[rhs](sys222), `~`[lhs](sys222)), var1))

f, diffs := Matrix(6, 6, {(1, 1) = -(3/4)*Pi, (1, 2) = 0, (1, 3) = -(3/16)*Pi, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (2, 1) = 0, (2, 2) = -20*Pi, (2, 3) = 0, (2, 4) = -5*Pi, (2, 5) = 0, (2, 6) = 0, (3, 1) = -(3/4)*Pi, (3, 2) = 0, (3, 3) = -(3/4)*Pi, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (4, 1) = 0, (4, 2) = -20*Pi, (4, 3) = 0, (4, 4) = -20*Pi, (4, 5) = 0, (4, 6) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = -1/3, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = -1/3, (6, 5) = 0, (6, 6) = 0}), Vector(6, {(1) = diff(C[1, 1](t), t), (2) = diff(C[1, 2](t), t), (3) = diff(C[2, 1](t), t), (4) = 4320*ZETA[1](t)*C[1, 1](t)*Pi+diff(C[2, 2](t), t), (5) = diff(ZETA[1](t), t), (6) = diff(ZETA[2](t), t)})

(3)

NULL


 

Download Question1_NEW.mw

Hello Everyone.

Hope you are fine. I have two following queries

1. Are there any builtin commands in Maple, so that we can apply the finite difference method directly to the PDE's?

2. We all know about "BurdenFaires, and Burden's NUMERICAL ANALYSIS" book. The important Maple codes are discussed on this book. Is there any website where I can take these codes on Maple files?

I am waiting for kind response.

Thanks

I have  a:=1; b:= 2; c:=1; d:= 6; e:= 2;

P:= a*b*c*d*e;

How do I get  P:=1*2*1*6*2  result with the Maple command?

Thank you for your help!

     Hello everyone !

     I have a problem asking for help:

     In the Oxy coordinate plane, for rectangles are limited by straight lines: x=1, x=7, y=1, y=9 and there are 63 points distinguished from coordinates that are integers located on this rectangle.

     These include:

  • 7 black points with coordinates are listed in the list:

[[1,1], [2,1], [3,1], [4,1], [5,1], [6,1], [7,1]].

  • 7 red points with coordinates are listed in the list:

[[1,2], [2,2], [3,2], [4,2], [5,2], [6,2], [7,2]].

  • 8 yellow points with coordinates are listed in the list:

[[1,3], [4,3], [5,3], [7,3], [1,4], [4,4], [5,4], [7,4] ].

  • 6 pink points with coordinates are listed in the list:

[[2,3], [3,3], [6,3], [2,4], [3,4], [6,4]].

  • 8 brown points with coordinates are listed in the list:

[[1,5], [3,5], [5,5], [7,5], [1,6], [3,6], [5,6], [7,6]].

  • 6 purple points with coordinates are listed:

[[2,5], [4,5], [6,5], [2,6], [4,6], [6,6]].

  • 9 blue points with coordinates are listed in the list:

[[1,7], [2,7], [7,7], [1,8], [2,8], [7,8], [1,9], [2,9], [7,9]].

  • 6 green points with coordinates are listed:

[[3,7], [5,7], [3,8], [5,8], [3,9], [5,9]].

  • 6 orange points with coordinates are listed in the list:

[[4,7], [6,7], [4,8], [6,8], [4,9], [6,9]].

     Help me find the integer coordinates of the 63 points when arranging them on the rectangle knowing that their HorizontalCoord has not changed, and the VerticalCoord of the points of the same color is always different with the Maple command.

     Thank you so much for your help!

Hi!

Somebody know how Maple computes (numerically) the values of the Z function? That is, if we run the command evalf(Z(3)), How compute Maple this number?

Many thanks in advance for your comments.

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