nm

11458 Reputation

20 Badges

13 years, 76 days

MaplePrimes Activity


These are questions asked by nm

I have thought that   D(y)(0)=C1  and  eval(diff(y(t),t),t=0)=C1  mean exactly the same thing which is derivative of y wr.t. "t" evaluated at specific point t=0 is C1.

If you agree they are exactly the same thing, then why dsolve works with both forms used for initial conditions if the option 'series' is not used.

When using the 'series' option, dsolve stops working when using  eval(diff(y(t),t),t=0) form? All else is the same.

ode:=diff(y(t),t$2)+3*diff(y(t),t)+2*y(t)=0;
bc_form_1:=y(0)=C1,eval(diff(y(t),t),t=0)=C2;
bc_form_2:=y(0)=C1,D(y)(0)=C2;
sol1:=dsolve([ode,bc_form_1],y(t));
sol2:=dsolve([ode,bc_form_2],y(t))

Both the above work

But now when I use the 'series' option, the first form stops working!

ode:=diff(y(t),t$2)+3*diff(y(t),t)+2*y(t)=0;
bc_form_1:=y(0)=C1,eval(diff(y(t),t),t=0)=C2;
bc_form_2:=y(0)=C1,D(y)(0)=C2;
sol1:=dsolve([ode,bc_form_1],y(t),'series');
sol2:=dsolve([ode,bc_form_2],y(t),'series')

 

 

Is this a bug? 

Just updated to Maple 2019.1  on windows 10.

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

 

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

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.

 

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.

 

First 145 146 147 148 149 150 151 Last Page 147 of 201