## 9779 Reputation

12 years, 65 days

## MaplePrimes Activity

### These are replies submitted by nm

fyi, Actually it works if I do not pass the assumptions to odetest.

But first obtain the result of odetest, and then in separate step, call simplify with the same assumptions. Now it works and gives zero.

So no need to change the assumptions the way you had them. I just need to replace x0,y0 with _C1 and it still works but not with odetest, but with simplify.

 > interface(version);

 > restart;
 > ode:= y(x) = x + 3*ln(diff(y(x), x)): sol_separable:= dsolve(ode, [separable]); assmp:= sol-> ((x,_C1)::~real, op(indets(sol, specfunc(ln))[]) >~ 0): #do not add assuming here. residual:=odetest(sol_separable, ode): #add assuming here. simplify( residual ) assuming assmp(sol_separable);

I tried your assumptions on general solution but it does not verify it. Would you know why? I replaced your sol-> ((x,x0,y0)::~real  with sol-> ((x,_C1)::~real since now there is no x0,y0 and only _C1,x are there.

 > restart;
 > ode:= y(x) = x + 3*ln(diff(y(x), x)): sol_separable:= dsolve(ode, [separable]); assmp:= sol-> ((x,_C1)::~real, op(indets(sol, specfunc(ln))[]) >~ 0): odetest(sol_separable, ode) assuming assmp(sol_separable);

works OK for me in Maple 2024.1

 > interface(version);

 > restart;
 > assume(g > 0): dsolve({diff(r(t), t\$2) + g * t * r(t), r(0) = r0, D(r)(0) = r1},  r(t));

 >

Both solutions are correct, but the separable one requires assumptions to obtain zero result from odetest while the dAlembert one does not. In this sense, the dAlembert solution is preferable.

 > ode:=y(x)-x=3*ln(diff(y(x),x)); sol_dalembert:=dsolve(ode,[dAlembert]);

 > odetest([sol_dalembert][2],ode)

 > sol_separable:=dsolve(ode,[separable]);

 > residual:=odetest(sol_separable,ode);

 > simplify(residual) assuming exp(-x/3) - c__1/3>0, x>0

 >

I guess the rule of thumb here is this:

If we can find a method to solve non-linear ode in y', as in this example,  without first having to solve for y' , then use that method.

The dAlembert method does that, it does no require isolating y' first.

While in the case of solving as separable, we have to first solve for y' to isolate it, and then solve the resulting ode as seprable. This is the main difference I see.

I solved this ode by hand using both separable and dAlembert methods. I see nothing wrong with the separable approach, this is how we solve this at school. The only difference as I said, is we have to isolate y' first. And this seems to be the cause of the trouble even though I can't still see why and what is wrong with doing that. May be someone can see the subtle mistake if any in the separable solution method.

Thanks, I think the Maple 2024.1 gives the correct solution, not Maple 2018, because this Clairaut  ode can only have one general solution and possibly a number of singular solutions (if they are valid ofcourse).

In the above result from Maple 2018 you show, only the first general solution must be the correct one and all the others are not.

Singular solutions do not have a constant of integration in them. So this looks like something that was fixed in later version of Maple after 2018 or in Maple 2024.

But the strange thing I was asking about are those warning messages.

I do not yet know what causes them and why they go away when trying the command one more time and do not think I saw them before from calling dsolve. They seem to be new.  I do not have Maple 2024.0 to check.

Oh, yes ofcourse. Phase plot does not work for non-autonomous system of odes. I completely forgot that when I was looking at this. It will be nice if Maple issues a WARNING message to alert the user so they know :)

it looks like Maple does not have the cos(2*x) trig relations (double angle trig) in its lookup tables.You could help it by using simplify with side-relation

e:=1/2 + cos(2*x)/2;
simplify(e,{cos(2*x)=1-2*sin(x)^2}):
simplify(%);


btw, the intutive thing for the user is just to do simplify() and nothing else. This is what another software does

In Maple one has to try 10 different things to get the answer. Nothing new here. See my recent question on Limit where the same thing there. One has to try different things to find which one works.