Maple 2019 Questions and Posts

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

Dear Maple friends~

Recently I am thinking a question about how to use Maple to prove an equation based on a known partial differential equationand its boundary conditions.

Although I can Prove it with hand computation ,it still has some difficulty and it will be really hard if its partial differential equation become more complex(As a matter of fact, it will happen).So I think of Maple and want to take advantage of computer.However,I get few ideas how to realize it .The details are as follows:

alias(u=u(x,t)):
pde:=diff(u,t)-diff(u,x$2,t)+4*u^2*diff(u,x)=3*u*diff(u,x)*diff(u,x$2)+u^2*diff(u,x$3);
N:=5;#actually N can be any positive integer!
bcs:=eval(u,x=-infinity)=0,seq(eval(diff(u,x$ha),x=-infinity)=0,ha=1..N),eval(u,x=infinity)=0,seq(eval(diff(u,x$ha),x=infinity)=0,ha=1..N);
E:=Int(u^4+2*u^2*diff(u,x)^2-diff(u,x)^4/3,x=-infinity..infinity);

#try to prove the following equation
diff(E,t)=0

The written proof is as follows:

Therfore,I submit such a problem and look forward your solutions and suggestions sincerely~

restart;
with(Physics);
with(LinearAlgebra);
N := 4;


Cf := Matrix(6, 6, (z, p) -> C[z, p, 1], shape = symmetric);
sigma[1] := Vector(6, [sigma[1, 1, 1], sigma[2, 2, 1], sigma[3, 3, 1], sigma[1, 2, 1], sigma[1, 3, 1], sigma[2, 3, 1]]);
varepsilon[1] := Vector(6, [varepsilon[1, 1, 1], varepsilon[2, 2, 1], varepsilon[3, 3, 1], gamma[1, 2, 1], gamma[1, 3, 1], gamma[2, 3, 1]]);
sigma[1] := Cf . (varepsilon[1]);





for i from 2 to N do
    C[i] := Matrix(6, 6, (z, p) -> C[z, p, i], shape = symmetric);
    sigma[i] := Vector(6, [sigma[1, 1, i], sigma[2, 2, i], sigma[3, 3, i], sigma[1, 2, i], sigma[1, 3, i], sigma[2, 3, i]]);
    varepsilon[i] := Vector(6, [varepsilon[1, 1, i], varepsilon[2, 2, i], varepsilon[3, 3, i], gamma[1, 2, i], gamma[1, 3, i], gamma[2, 3, i]]);
    sigma[i] := (C[i]) . (varepsilon[i]);
end do;



B[1] := 0;

for i to N do
    Parameters(epsilon11c, C[1, 1, i], C[1, 2, i], C[2, 2, i], C[2, 3, i], R[i], A[i], B[i + 1], P);
end do;



g[1](r);
ux[1] := (x, r) -> epsilon[1][1]*x + g[1](r);
ur[1] := r -> A[1]*r + B[1]*1/r;
varepsilon[1][1] := epsilon11c;
varepsilon[1][2] := r -> (A[1]*r + B[1]*1/r)*1/r;
varepsilon[1][3] := r -> diff(ur[1](r), r);
varepsilon[1][3](R[2]);



for i from 2 to N - 1 do 
g[i](r); 
ux[i] := (x, r) -> epsilon[i][1]*x + g[i](r); 
ur[i] := r -> A[i]*r + B[i]*1/r; 
varepsilon[i][1] := epsilon11c; 
varepsilon[i][2] := r -> (A[i]*r + B[i]*1/r)*1/r; 
varepsilon[i][3] := r -> diff(ur[i](r), r); 
varepsilon[i][2](r); i;
end do;
i;
varepsilon[2][2](r);

Hi everyone,

 

I am currently writing a code on maple and I am finding difficulties in this section.

When I define the functions this way, the result I get from the loop "for" for varepsilon[i][2](r) is the same and doesnt depend on i value. I also tried to define it another way that would give me different results but I would end up with being unable to replace the variable "r" with its values (I would get r(R2)).

I would be grateful if you could advice me with this matter.

Thank you in advance.

Hi,

I want to figure out if the Student license offered by Maplesoft for Maple 2019 is perpetual or is just lasts for a year? If it lasts for just 12 months, is there another license I should get which isn't as expensive as the full license? I need it for my personal research. 

Maple is very good in solving PDE's. But this specific solution seems way too complicated when compared to Matematica solution, which I verified using Maple pdetest to be correct.

Is there a way to make Maple produce the simpler solution to this pde? simplify does nothing on the solution. May be by using a good HINT or such other option? 
 

restart;

pde:=(a*y+b*x+c)*diff(w(x,y),x)-(b*y+k*x+s)*diff(w(x,y),y)=0;

(a*y+b*x+c)*(diff(w(x, y), x))-(b*y+k*x+s)*(diff(w(x, y), y)) = 0

sol:=pdsolve(pde,w(x,y))

w(x, y) = _F1(1/(a^3*k^2*y^2-2*a^2*b^2*k*y^2+2*a^2*b*k^2*x*y+a^2*k^3*x^2+a*b^4*y^2-4*a*b^3*k*x*y-2*a*b^2*k^2*x^2+2*b^5*x*y+b^4*k*x^2+2*a^2*c*k^2*y+2*a^2*k^2*s*x-4*a*b^2*c*k*y-4*a*b^2*k*s*x+2*b^4*c*y+2*b^4*s*x+a^2*k*s^2-a*b^2*s^2-2*a*b*c*k*s+a*c^2*k^2+2*b^3*c*s-b^2*c^2*k)^(1/2))

mma_solution := w(x,y)= _F1( (2*s*x+k*x^2+2*c*y+2*b*x*y+a*y^2)/a );

w(x, y) = _F1((a*y^2+2*b*x*y+k*x^2+2*c*y+2*s*x)/a)

pdetest(mma_solution,pde)

0

 


Here is screen shot showing the other solution

Download q1.mw

 

How do I get Maple to factorize this simple expression without too much effort?

f:=3/2 + sqrt(8*k + 2) + 2*k

Is the following a bug? I am using Maple 2019  64 bit with latest Physics package 357 on windows 10.


 

restart;

pde :=  diff(w(x,y,z),x)+(y^2- a*exp(alpha*x)*(x*y-1))*diff(w(x,y,z),y)+(c*exp(beta*x)*z^2+b*exp(-beta*x))*diff(w(x,y,z),z)= 0;
sol:=pdsolve(pde,w(x,y,z));

diff(w(x, y, z), x)+(y^2-a*exp(alpha*x)*(x*y-1))*(diff(w(x, y, z), y))+(c*exp(beta*x)*z^2+b*exp(-beta*x))*(diff(w(x, y, z), z)) = 0

Error, (in depends) too many levels of recursion

restart;

pde :=  diff(w(x,y,z),x)+ (b*exp(alpha*x)*y^2 + a*exp(beta*x)*(beta- a*b*exp((alpha+beta)*x)))*diff(w(x,y,z),y)+(c*z^2*exp(gamma*x)+ d*z + k*exp(-gamma*x))*diff(w(x,y,z),z)= 0;
sol:=pdsolve(pde,w(x,y,z));

diff(w(x, y, z), x)+(b*exp(alpha*x)*y^2+a*exp(beta*x)*(beta-a*b*exp((alpha+beta)*x)))*(diff(w(x, y, z), y))+(c*z^2*exp(gamma*x)+d*z+k*exp(-gamma*x))*(diff(w(x, y, z), z)) = 0

Error, (in depends) too many levels of recursion

restart;

pde :=  x*diff(w(x,y,z),x)+ ( a1*exp(alpha*x)*y^2 + beta*y+ a1*b2^2*x^(2*beta)*exp(alpha*x))*diff(w(x,y,z),y)+(a2*x^(2*n)*z^2*exp(lamba*x)+(b2*x^n*exp(lambda*x) - n)*z + c*exp(lambda*x))*diff(w(x,y,z),z)= 0;
sol:=pdsolve(pde,w(x,y,z));

x*(diff(w(x, y, z), x))+(a1*exp(alpha*x)*y^2+beta*y+a1*b2^2*x^(2*beta)*exp(alpha*x))*(diff(w(x, y, z), y))+(a2*x^(2*n)*z^2*exp(lamba*x)+(b2*x^n*exp(lambda*x)-n)*z+c*exp(lambda*x))*(diff(w(x, y, z), z)) = 0

Error, (in depends) too many levels of recursion

 


 

Download bug2.mw

I just noticed with chagrin that one of my favorite menu commands, Edit -> Remove output -> From worksheet, is missing from Maple 2019's Standard GUI. Is there a keyboard command or toolbar item to replace it?

Hello everyone, Greetings!

I am facing a really strange problem. I need to write an expression, however, maple out of nowhere assigns values to the variable used. only to those which are written inside sin (). In previous versions the out put is fine. Is there a new way to write expressions in maple 2019? I am not sure.


 

restart

96*sin(2*beta*y)*cos(2*beta*y)*beta^4 + 96*sin(2*beta*y)*beta^4

(0.525982730176588e-113+0.525982730176588e-113*I)*beta^4

(1)

``


 

Download strngmpl.mw

 

I have encountered the situation frequently where I want to simplify an equation by cancelling out terms on both sides.  I have tried simplify() with a variety of assumptions(J,L>0,etc) and I haven't been able to get it to work.  On a simple equation, one can use 'solve' however there are situations where solve doesn't work and I just want to simplify the equation not solve it.

The script below shows the situation.  I cancel out JL and the complex exponential by manually identifying that they are common factors.  Is there an automatic way of doing this type of simplification?

If I use expand() it clearly shows the common factors on both sides but I haven't found the command that removes any common terms.


 

E2 := (sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(j+1)*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(j-1)*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*(l+1)*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*(l-1)*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)

(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(j+1)*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(j-1)*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*(l+1)*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*(l-1)*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)

(1)

E3 := E2*J*L; E4 := simplify(lhs(E3)) = simplify(rhs(E3))

J*L*((sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(j+1)*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(j-1)*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*(l+1)*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)+(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*(l-1)*n/L), n = 0 .. L-1), m = 0 .. J-1))/(J*L)) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*j*m/J)*exp(-(2*I)*Pi*l*n/L), n = 0 .. L-1), m = 0 .. J-1))

 

sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*(j+1)*L+l*n*J)*Pi/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*L*(j-1)+l*n*J)*Pi/(J*L)), n = 0 .. L-1), m = 0 .. J-1)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))

(2)

 

subsindets(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*(j+1)*L+l*n*J)*Pi/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*L*(j-1)+l*n*J)*Pi/(J*L)), n = 0 .. L-1), m = 0 .. J-1)-4*(sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1))+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)+sum(sum(`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1) = h^2*(sum(sum(`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)), n = 0 .. L-1), m = 0 .. J-1)), specfunc({Sum, sum}), proc (S) options operator, arrow; op(1, S) end proc)

`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*(j+1)*L+l*n*J)*Pi/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*L*(j-1)+l*n*J)*Pi/(J*L))-4*`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+L*j*m)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+L*j*m)/(J*L)) = h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L))

(3)

 

simplify((`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*(j+1)*L+l*n*J)*Pi/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*(m*L*(j-1)+l*n*J)*Pi/(J*L))-4*`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l+1)*J+L*j*m)/(J*L))+`#mover(mi("u"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(n*(l-1)*J+L*j*m)/(J*L)) = h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]*exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L)))*(1/exp(-(2*I)*Pi*(J*l*n+L*j*m)/(J*L))))

2*`#mover(mi("u"),mo("ˆ"))`[m, n]*(-2+cos(2*Pi*m/J)+cos(2*Pi*n/L)) = h^2*`#mover(mi("ρ",fontstyle = "normal"),mo("ˆ"))`[m, n]

(4)

``


 

Download common_factors.mw

Hi I need to write procedure to find a cubic equation... anyone could help me ...? 

At a point in a worksheet I end up with an equation that has summations on both sides.  The range of summation is the same but the summands are different.  I want to remove the summations from both sides, keeping the equation with just the summands. How can this be done?  The only way I have found is to manually select each summand with the mouse and paste it into a new line which breaks the 'automation' of the script.

Thanks in advance.

This

expr:='1/r^2*diff(r^2*diff(v(r),r),r)'

gives

And when evaluated second time it gives

expr

The question is, how to put expr back to its original form shown at the top?

I tried simplify, combine, etc.. but nothing puts back to same form.

The reason I am asking, is that I need put more complicated expression in form that resembles when I am looking at in textbook. For an example, the Laplacian

VectorCalculus:-Laplacian(u(r,theta,phi),'spherical'[r,theta,phi])

But the above should be the same as

So I figured if I can rewrite each term to look like in the shorter version above (complete derivative version), it will be easier for me to compare what Maple gives and the text book shows,

ps. I found that the following command in Maples gives a little clearer Laplacian, but it is still not as simplified as the book but it is better than using VectorCalculus:-Laplacian

Physics[Vectors]:-Laplacian(u(r,theta,phi));

At least this has each term a little more seprated.

 

If I have checked the Editable button just below the working window, then the temperature would be very high in the next time when I start Maple 2019. I do not what is going on. But when I unchecked the Editable button, and wait for several seconds, then the temperature and the load of my laptop are on the normal state.  Is this a bug for Maple 2019? My OS is Debian Stretch, that is,

$ uname -a
Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux

 

When typing 

z:=exp(I*2*Pi/3);
convert(z,'sincos')

Maple evaluates the intermediate result which is cos(2*Pi/3)+I*sin(2*Pi/3) and  gives

Is there a way to tell it not to do this? I'd like to see the result as when typing

'cos(2*Pi/3)+I*sin(2*Pi/3)'

Is there an option or method to tell Maple not to immediate evaluation in the above? it can do evaluate next time the expression is used.

 

Dear all,

I am totally new to maple and would like to get an understanding for the "language" and how to work with maple. Thats why I tried to get a simple model from Mathematica into Maple, however, unfortunately, I am not able to initialize the plot I want to generate. Hence, I am wondering if someone could please help me here. My code looks as follows:
 

P[t] := a*ED[t - 1] + P[t - 1]

ED[t] := DC[t] + DF[t];

DC[t] := c(P[t] - P[t - 1])

DF[t] := b(F - P[t])

my initial conditions are:

a := 1
c := 0.75
b := 0.2
F := 100
P[0] := F
P[1] := F + 1

Now I would like to see how P[t] develops for t from 0 to 100, but I get the error "Error, (in Plot) Plot([ED[t-1]+P[t-1], t = 0 .. 100]) is not a valid command; see the plot help page" However, I am not able to get a grip on the helppage information. Hence I would be very glad if someone could help me here please.

Thank you in advance!

Best, Alex

 

 

First 40 41 42 43 44 Page 42 of 44