5701 Reputation

17 Badges

8 years, 298 days

MaplePrimes Activity

These are questions asked by nm

I think Maple is wrong here. But may be someone could show me how it is correct?

Maple says this ode (below) is of type d'Alembert. But I am not able to show this. It is impossible for me to put this ode in _dAlembert. form. So I gave up.


The challenge then is to put the following first order ODE in the above form to show it is dAlembert.

I could not do it. I worked on this by hand and not possible to get the ODE in the above form. Could someone show this?

ode:=3*x^2*y(x)^3+y(x)^4+(3*x^3*y(x)^2+4*x*y(x)^3+y(x)^4)*diff(y(x),x) = 0;

The first thing I do when I want to show this, is to solve for y(x) from the ode. Since I can't use solve on an ode, I start by replacing all the diff(y(x),x) with say p. Then now solve for y(x). If it is dAlembert, then it should give expression that be put in the form    y(x)=x*f(p) + g(p). Notice that the functions f(p) and g(p) are functions of p only and not of x. This is important.  And f(p) is multiplied by linear term and not x^(3/2) or x^(1/2), etc... The term multiplying f(p) has to be linear in x.


Looking at second and third solutions. None of them is dAlembert.  This can be shown by either simplyfing it with assumptions, where not possible to obtain the needed form, or by simply replacing p back with diff(y(x),x) and asking advisor for the type of the resulting ode

DEtools:-odeadvisor( subs(p=diff(y(x),x),sol[2]));

So none is d'Alembert.

Question is: Could someone may be proof that this ode is d'Alembert? By putting it in the form   y(x)=x*f(p)+g(p)? Or is advisor is wrong here?

ps. I tried infolevel[DEtools:-odeadvisor]:=4 to try to trace it, but it does not work.

pps. I worked this out by hand, and I get 

                y(x)= x^(3/2)*f(p)  where f(p) = sqrt(-12 p^2)+sqrt(12*p)

And this is not d'Alembert.


I was just using odeadvisor to check type of some ode's, when I noticed it gives 

             Error, (in ODEtools/radnormal) numeric exception: division by zero

on ode's of form y(x)=x*diff(y(x),x)^n+x^2

for different n:

for n from -5 to 5 do
    if n<>0 then
          print("n=",n,"OK, no error");
          print("n=",n,StringTools:-FormatMessage( lastexception[2..-1] ));
       end try;

Is this known issue and is expected?

Maple 2020.2 on windows 10


I am getting this error. Is this expected or known issue?  

sol:=-csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a^4/((k + 1)*(_C1*a - _C1*x - 1)^2) + 4*csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a^3*x/((k + 1)*(_C1*a - _C1*x - 1)^2) - 6*csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a^2*x^2/((k + 1)*(_C1*a - _C1*x - 1)^2) + 4*csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*a*x^3/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1, 1/(_C1*a - _C1*x - 1))*_C1*x^4/((k + 1)*(_C1*a - _C1*x - 1)^2) + a^2/((k + 1)*(_C1*a - _C1*x - 1)^2) - 2*a*x/((k + 1)*(_C1*a - _C1*x - 1)^2) + x^2/((k + 1)*(_C1*a - _C1*x - 1)^2) + csgn(1, 1/(_C1*a - _C1*x - 1))*a^3/((k + 1)*(_C1*a - _C1*x - 1)^2) - 3*csgn(1, 1/(_C1*a - _C1*x - 1))*a^2*x/((k + 1)*(_C1*a - _C1*x - 1)^2) + 3*csgn(1, 1/(_C1*a - _C1*x - 1))*a*x^2/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1, 1/(_C1*a - _C1*x - 1))*x^3/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1/(_C1*a - _C1*x - 1))*a^2/((k + 1)*(_C1*a - _C1*x - 1)^2) + 2*csgn(1/(_C1*a - _C1*x - 1))*a*x/((k + 1)*(_C1*a - _C1*x - 1)^2) - csgn(1/(_C1*a - _C1*x - 1))*x^2/((k + 1)*(_C1*a - _C1*x - 1)^2);

solve( simplify(sol)=0,x,allsolutions = true) assuming real; #also x::real, same error

Maple 2020.2 on winsows 10. Physics 897



Should dsolve has missed this solution? I used singsol=all option:

ode:=y(x)^2+(x^2+x*y(x))*diff(y(x),x) = 0;

But y(x)=0 is singular solution. It can not be obtained from the above general solutions for any constant of integration value.



if I change the type of ode, Maple now gives y(x)=0 but the general solution is too complicated (which is OK) but the point is that it does now find y(x)=0.


           y(x)=0,  etc.....

my question is: Why singsol=all did not also give y(x)=0 in this example?  Is there something I am misundertanding here?

Maple 2020.2

I just had enough with odetest hanging (even when using with timelimit). I wait hours and hours each time (even though I have 30 second timelimit, which Maple ignores) and I do not think Maplesoft is going to fix this in my lifetime.  

So I am attempting to make my own very simple and basic odetest.

I give it an ode and explicit solution in for form sol:= y(x)=... and the function uses algsubs(sol,ode) and checks it is gets zero or not (it will also do simplify if needed)

But there is a BIG problem.   Even though algsubs(z=0,z/z);  gives back 1 as expected,  but

ode:=diff(y(x), x)/y(x);

algsubs(sol,ode);   #this gives ZERO. It should be 1

If we do algsubs on each term one by one



So why did algsubs give zero in the first case, since  the result of the algsubs should be 0/0 which algsubs knows in the limit it is 1?   How did it come up with zero?

Clearly my simple method of replacing odetest with algsubs is not working. I need a more robust way to handle this.

subs does not work. Since subs does not know how substitute y(x)=f(x) into derivatives involved in an ODE.

My question is: Is there a way to teach algsubs to give 1 for the above example? or better function to use?

I tried applyrule instead of algsubs, but that does not work.

applyrule(sol, ode)

Error, (in rec) numeric exception: division by zero

Is there a better method to use? I am trying to do simple version of odetest that does not hang. Even if not perfect. Will only use it for explicit solutions, not implicit since implicit is much harder.

Here is a more full example

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


But when I use my simple method

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

                          -1 = 0

The reason it failed, because algsubs replaced the second term by 0 instead of 1. The second term in the ode is diff(y(x),x)/y(x)

Which is 0/0 but this is 1 in the limit. But algsubs used 0 instead for some reason.

So I need a little bit smarter way to replace my solution into the ode than just using algsubs. May need to use some of the tricks I've seen used here before using freez/thaw/frontend, etc.. which I still do not understand.

Any recommendation?  This is meant to work for any single ode and any explicit solution of the form y(x)=....

This algsubs method works actually pretty well on many ode's. I've tested it on 2,000 ode's. It just fails so far on subtle ones like the above. Here is just random example where it works

ode:=diff(y(x),x)^2 = (-x+1)/x;



So I just need a way to handle the cases where it gives 0/0 I think. I have 20 ODE's which now fail out of about 2,000 using this basic method compared to using odetest.


Thank you

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