nm

8320 Reputation

19 Badges

11 years, 221 days

MaplePrimes Activity


These are questions asked by nm

Maple does not give solution to this first order ode with IC, if asked to do it implicit. It only solves it explicit. 

ode := diff(y(x), x) - 2*(2*y(x) - x)/(x + y(x)) = 0;
ic:=y(0)=2;
dsolve([ode,ic],'implicit'); #maple gives no solution when implicit!

Then I asked Maple for an implicit solution but with no IC. Then solved for the constant of integration myself, and plugged this back in the solution. But odetest now says the initial conditions do not verify. 

Here are the steps I did to solve for the constant of integration. I do not see any error I made. Does any one see where my error is and why odetest does not verify the solution for IC?

This first order ode has unique solution. Here is my worksheet.
 

35220

restart;

35220

ode := diff(y(x), x) - 2*(2*y(x) - x)/(x + y(x)) = 0;
ic:=y(0)=2;
dsolve([ode,ic],'implicit'); #maple gives no solution when implicit!

diff(y(x), x)-2*(2*y(x)-x)/(x+y(x)) = 0

y(0) = 2

#lets now try finding the constant of integration ourself
sol:=dsolve(ode,'implicit')

2*ln(-(-y(x)+x)/x)-3*ln(-(-y(x)+2*x)/x)-ln(x)-c__1 = 0

#setup equation and plugin the IC. Raise both sides to exp. RHS becomes 1
eq:=exp(lhs(sol))=1;

exp(2*ln(-(-y(x)+x)/x)-3*ln(-(-y(x)+2*x)/x)-ln(x)-c__1) = 1

simplify(eq,exp);

(y(x)-x)^2*exp(-c__1)/(y(x)-2*x)^3 = 1

#plugin in y=2 at x=0
eval(%,[y(x)=2,x=0]);

(1/2)*exp(-c__1) = 1

#solve for constant of integration
solve(%,c__1)

-ln(2)

#subtitute back in the solution
sol:=eval(sol,c__1=%);

2*ln(-(-y(x)+x)/x)-3*ln(-(-y(x)+2*x)/x)-ln(x)+ln(2) = 0

#verify. Why it failed check on IC?? Notice it is not [0,0].
odetest(sol,[ode,ic])

[0, 2]

 


 

Download why_fails_to_verify.mw

 

I bought Maple 2023 student version. (I am student) and installed it on windows 10.

I wanted to try it on Linux to see if runs better. So Installed the Linux version. When I tried to activate using the same purchase code I got, I get error that I have no more activations or I exceeded the number of activations.

But I installed Maple 2023 only one time, on windows which is my main OS. Never installed it anywhere else before.

Is one really only allowed one installation?

How would then I can try Maple on Linux but keep my Maple on windows until I decide if Maple works better on Linux or not?

This first order ode is quadrature with initial conditions. By existence theorem it has solution and is unique on some interval that includes the initial conditions (because f and f_y  are continuous on the initial condition).

But for some reason Maple can't find the solution, unless one adds 'implicit' option. Why is that? I thought that Maple will automatically return implicit solution if can't find explicit solution. 

So does one then needs to try with implicit solution again if no solution is returned? I am basically asking if this is expected behavior of dsolve.

Below is worksheet also with the solution that Maple verifies is valid and satisfies the ode and also initial conditions.

ode:=diff(y(x), x) = sin(y(x)) + 1;
ic:=y(0)=Pi;
sol:=dsolve([ode,ic]);

20212

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1618 and is the same as the version installed in this computer, created 2023, November 29, 17:28 hours Pacific Time.`

restart;

28544

ode:=diff(y(x), x) = sin(y(x)) + 1;
ic:=y(0)=Pi;
sol:=dsolve([ode,ic]);

diff(y(x), x) = sin(y(x))+1

y(0) = Pi

maple_sol:=dsolve([ode,ic],'implicit');
odetest(maple_sol,[ode,ic])

(2+x*tan((1/2)*y(x))+x)/(tan((1/2)*y(x))+1) = 0

[0, 0]

maple_sol:=dsolve([ode,ic],y(x),'explicit');

mysol:=y(x)=2*arccos(-x/(sqrt(4+4*x+2*x^2)));
odetest(mysol,[ode,ic]) assuming x>=0

y(x) = 2*Pi-2*arccos(x/(2*x^2+4*x+4)^(1/2))

[0, 0]

 


 

Download unable_to_dsolve_quadature_dec_22_2023.mw

 

Why does

restart;
eq:=Z^2=y/x;
solve(eq,Z)

give

I never told maple that y>=0 and x>=0 ?   I was expecting what we will do by hand. which is

Note that sqrt(x*y) is same as sqrt(x)*sqrt(y) only when y and x are not negative. 

Is there an option to make Maple not do this and give same result as above? I tried PDEtools:-Solve and it gives same solution as solve.

Maple 2023.2.1 on windows 10

This could be new bug in 2023.2.1, could someone else confirm if it is in earlier versions 2023.2 ?

restart;
ode:=diff(y(x),x)-y(x)^2-m*y(x)*cot(x)-b^2*sin(x)^(2*m) = 0;
DEtools:-symgen(ode)

Error, (in trig/reduce) too many levels of recursion

After about 30 seconds.

I tried it in Maple 2022.2  I waited for more than 10 minutes and it was still running.  If you think it is new bug, will send email to Maple support.

The big problem with these Maple internal errors, is that it is not possible to trap them with try/catch. So the program simply crashes and there is no workaround.

``

restart;

35880

interface(version)

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1615 and is the same as the version installed in this computer, created 2023, November 29, 17:28 hours Pacific Time.`

ode:=diff(y(x),x)-y(x)^2-m*y(x)*cot(x)-b^2*sin(x)^(2*m) = 0;

diff(y(x), x)-y(x)^2-m*y(x)*cot(x)-b^2*sin(x)^(2*m) = 0

DEtools:-symgen(ode);

Error, (in tools/map) too many levels of recursion

 


reported to Maple support

Download trig_reduce_recursion_dec_20_2023.mw

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