nm

2691 Reputation

17 Badges

7 years, 94 days

MaplePrimes Activity


These are questions asked by nm

This is a solution to a PDE. I solved this by hand and got a much simpler solution. Maple solution is also correct but very complicated. They are both the same, as when I plot them  for different t values, they match. I am sure they are the same. 

How would one simplify Maple solution to the simpler one? Tried number of options to simplify, but can't get Maple to simplify it to the hand solution. Also tried different assumptions on t and x (real, positive etc..) nothing helps.

Maple 2019.1 on windows 10. Physics 436

restart;
pde := diff(u(x,t), t) +1/(x^2+4)*diff(u(x,t),x) =0:
ic:=u(x,0)=exp(x^3+12*x):
maple_sol:=rhs(pdsolve([pde,ic],u(x,t)));

exp(((1/2)*(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3)-8/(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3))*(((1/2)*(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3)-8/(4*x^3+48*x-12*t+4*(9*(-(1/3)*x^3-4*x+t)^2+256)^(1/2))^(1/3))^2+12))

hand_sol:=exp(x^3 - 3*t + 12*x); #this is much simpler

exp(x^3-3*t+12*x)

simplify(maple_sol)

exp(3*((4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(1/3)-4)*((-(1/3)*x^3+t-4*x-(1/3)*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))*(4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(1/3)-(4/3)*(4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(2/3)-64/3)*((4*x^3+48*x-12*t+4*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2))^(1/3)+4)/(-8*x^3+24*t-96*x-8*(x^6-6*t*x^3+24*x^4+9*t^2-72*t*x+144*x^2+256)^(1/2)))

plot([subs(t=0.1,maple_sol),subs(t=0.1,hand_sol)],x=-1..0.3)

plot([subs(t=5,maple_sol),subs(t=5,hand_sol)],x=-1..0.3)

 

 

Download how_to_simplify.mw

Fyi, this solution to 1D wave pde is wrong. The solution does not even satisfy the PDE itself. Compared it to a numerical solution and they are not the same solution. Do not have time now to write the hand solution. But it is clear the solution is not valid.

I do not know now how to roll back to earlier version of the Physcis packages to see if this used to work OK before. Since when typing Physics:-Version(420) It gives error

Error, (in Physics:-Version) unable to determine the Physics Updates version, could you please report the problem to support@maplesoft.com

And Physics:-Version(425) seems to hang. I am not sure if these commands are supposed to automatically download the physics package from the cloud and install it on my PC or what.

Any way, could someone please verify the solution they get is the same as shown below? May be someone with earlier physics package could try to see if they get different solution?

restart

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 429 and is the same as the version installed in this computer, created 2019, September 23, 0:14 hours, found in the directory C:\Users\me\maple\toolbox\2019\Physics Updates\lib\`

pde:=diff(u(x,t),t$2)=4*diff(u(x,t),x$2);
ic:=u(x,0)=0,D[2](u)(x,0)=sin(x)^2;
bc:=u(-Pi,t)=0,u(Pi,t)=0;
sol:=pdsolve([pde,ic,bc],u(x,t))

diff(diff(u(x, t), t), t) = 4*(diff(diff(u(x, t), x), x))

u(x, 0) = 0, (D[2](u))(x, 0) = sin(x)^2

u(-Pi, t) = 0, u(Pi, t) = 0

u(x, t) = t*sin(x)^2

pdetest(sol,pde)

-8*t*(2*cos(x)^2-1)

simplify(diff(rhs(sol),t$2)-4*diff(rhs(sol),x$2))

-16*t*cos(x)^2+8*t

 


 

Download sept_23_2019.mw

I just  found what seems to be a serious problem and I am not able to figure if it is related to my own installation or not.

After I installed Physics 426 (Published on Sept 17, 2019) using the Maple GUI install button (which now works for my PC), I found I am not able to integrate basic things.

It seems to affect int when using some build in function with definite integration, but it could be others also. I need to test more. 

Could someone see if they get same problem as well?  

Could also someone please remind me of the library  commands to issue in order to remove current Physics version 426 and install earlier Physics version package, say 425, or any other version, so that  to see if this is related to version of a physics package or not?

restart;

version()

 User Interface: 1399874
         Kernel: 1399874
        Library: 1399874

1399874

interface(version)

`Standard Worksheet Interface, Maple 2019.1, Windows 10, May 21 2019 Build ID 1399874`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 426 and is the same as the version installed in this computer, created 2019, September 20, 23:28 hours, found in the directory C:\Users\me\maple\toolbox\2019\Physics Updates\lib\`

infolevel[int] := 3:

int(exp(x),x=0..1)

Definite Integration:   Integrating expression on x=0..1

Definite Integration:   Using the integrators [distribution, piecewise, series, o, polynomial, ln, lookup, cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper, asymptotic, ftoc, ftocms, meijerg, contour]
LookUp Integrator:   unable to find the specified integral in the table
int/elliptic: trying elliptic integration
Integration Warning:   Integration method ftoc encountered an error in IntegrationTools:-Definite:-Main:
 mismatched multiple assignment of 2 variables on the left side and 1 value on the right side

Definite Integration:   Returning integral unevaluated.

int(exp(x), x = 0 .. 1)

restart;

int(sin(n*x),x=0..Pi)

int(sin(n*x), x = 0 .. Pi)

int(tan(x),x=0..Pi)

int(tan(x), x = 0 .. Pi)

int(cos(x),x=0..1)

int(cos(x), x = 0 .. 1)

int(sin(x),x=0 .. Pi)

int(sin(x), x = 0 .. Pi)

int(cos(x),x)

sin(x)

int(x,x=0 .. 1)

1/2

 

Download int_not_working.mw

Why Maple 2019.1 gives an error when no initial conditions are given for the following heat PDE with periodic BC?

I am using Physics 426 (current version). On windows 10.

When adding ic as some arbitrary function f(x), then the error goes away. But no ic needs to be given to solve this PDE. The answer can be left using arbitrary constants in this case.

I also found that this seems to happen when the BC are periodic. When using the normal Dirichlet B.C. and omitting the initial conditions, the error went away.

Am I doing something wrong or is this a bug?

restart;

pde:=diff(u(x,t),t)=diff(u(x,t),x$2); #try with NO IC
bc:=u(-Pi,t)=u(Pi,t),D[1](u)(-Pi,t)=D[1](u)(Pi,t);
pdsolve([pde,bc],u(x,t))

diff(u(x, t), t) = diff(diff(u(x, t), x), x)

u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)

Error, (in pdsolve/BC/2nd_order/Series/TwoBC) invalid boolean expression: NULL

restart;

pde:=diff(u(x,t),t)=diff(u(x,t),x$2)-u(x,t); #now try with IC
bc:=u(-Pi,t)=u(Pi,t),D[1](u)(-Pi,t)=D[1](u)(Pi,t);
ic:=u(x,0)=f(x);
pdsolve([pde,bc,ic],u(x,t)); #solution is correct

 

diff(u(x, t), t) = diff(diff(u(x, t), x), x)-u(x, t)

u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)

u(x, 0) = f(x)

u(x, t) = exp(-t)*_C7[0]+Sum(exp(-t*(n^2+1))*(sin(n*x)*_C1[n]+cos(n*x)*_C7[n]), n = 1 .. infinity)

restart;

pde:=diff(u(x,t),t)=diff(u(x,t),x$2); #now try with NO IC, but not periodic BC
bc:=u(0,t)=1,u(Pi,t)=0;
pdsolve([pde,bc],u(x,t)); #solution is correct

diff(u(x, t), t) = diff(diff(u(x, t), x), x)

u(0, t) = 1, u(Pi, t) = 0

u(x, t) = ((Sum(sin(n*x)*exp(-n^2*t)*_C1(n), n = 1 .. infinity))*Pi+Pi-x)/Pi

 

 

Download problem_09_20_2019.mw

Is this documented somewhere?  Why Maple do not return 0 from odetest after expanding the solution?

update: added additional tries to simplify it to zero as suggested but they do not give zero.

ode:=2*x^(1/2)*diff(y(x),x) = (1-y(x)^2)^(1/2);
sol:=dsolve(ode);

2*x^(1/2)*(diff(y(x), x)) = (1-y(x)^2)^(1/2)

y(x) = sin(x^(1/2)+(1/2)*_C1)

odetest(sol,ode);

0

res:=odetest(expand(sol),ode);

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res,symbolic)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

simplify(res,trig)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

combine(res)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

combine(res,trig)

cos(x^(1/2)+(1/2)*_C1)-(1/2)*(2*cos(2*x^(1/2)+_C1)+2)^(1/2)

expand(res)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res))

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),symbolic)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),trig)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

simplify(expand(res),size)

cos(x^(1/2))*cos((1/2)*_C1)-sin(x^(1/2))*sin((1/2)*_C1)-(1/2)*(4*cos(_C1)*cos(x^(1/2))^2-2*cos(_C1)-4*sin(_C1)*sin(x^(1/2))*cos(x^(1/2))+2)^(1/2)

 

 

Download odetest_q.mw

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