nm

8679 Reputation

19 Badges

11 years, 273 days

MaplePrimes Activity


These are questions asked by nm

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

What is the correct way, in code, to check if Maple result contains any one of its own global build in symbols such as _Z or _C or any such symbol it uses?

I need to bypass this result. Currently I check explicitly, but I am sure there is a better way. Here is an example

r:=discont(1/tan(x),x);

This returns 

Currently I do 

if has(r,_Z1)  or has(r,_Z2) or has(r,_Z3) then
etc...

same for _C1, _C2., etc...

But this method is not robust. The problem is that _Z1 is symbol. So I can't check for symbol type in the  result as result could possibly have one of my own symbols there depending on input.

Is there  better way to do this? I am only asking about output of discont here and not any other Maple function. I assume discont uses _Zn only but I am not sure. It could use different symbol? 

given 

r1:=   -1 <= x and x <= 0;
r2:=   0 <= x and x <= 1;

We see that the above can be simplified to one inequality

-1<= x and x<=1

The closest I found to do this is

r1:=-1 <= x and x <= 0;
r2:=0 <= x and x <= 1;
solve(r1 or r2,x);

which gives RealRange(-1, 1) but I'd like to get the form  -1<= x and x<=1 similar to:

I tried convert to piecewise and simplify and few other things. Is there a trick in Maple to simplify/combine/join inequalites like the above? i.e. convert RealRange(-1, 1) to -1<=x and x<=1 

everything is on the real line.

Maple 2023.2

First 6 7 8 9 10 11 12 Last Page 8 of 165