Question: odetest does not handle some solutions from dsolve

When asking dsolve to use specific ode type to solve an ode, in particular, dAlembert type, which typically generate complicated solutions, sometimes dsolve solution shows up using parameter T.

But odetest gets confused by this expression it seems. I am not able to figure if I am doing something wrong in using odetest, or may be odetest does not know how to handle such form of a solution.

Here is an example. This ode

is of these types:

restart;
ode:=diff(y(x), x) = (y(x)^3 + 2*x*y(x)^2 + x^2*y(x) + x^3)/(x*(y(x) + x)^2);
DEtools:-odeadvisor(ode);

By default, dsolve was smart to use homogeneous type to solve the ODE, as this gives the simplest solution. 

One can force dsolve to use the other types. When using dAlembert, odetest gives an error trying to verify any one of the solutions returned from dsolve due to the way the solution is returned. Here is the result

restart;
ode:=diff(y(x), x) = (y(x)^3 + 2*x*y(x)^2 + x^2*y(x) + x^3)/(x*(y(x) + x)^2);
sol:=[dsolve(ode,y(x),[homogeneous])];

No problem here for odetest. it can verify any of the above 3 solutions with no error generated.

odetest(sol[1],ode)

          0

Lets compare using dAlembert type

restart;
ode:=diff(y(x), x) = (y(x)^3 + 2*x*y(x)^2 + x^2*y(x) + x^3)/(x*(y(x) + x)^2);
sol:=[dsolve(ode,y(x),[dAlembert])]: #solution too complicated to show here
odetest(sol[1],ode)

 

It looks like odetest does not know how to handle the form of the solution as returned by dsolve for this case. The problem is that each solution is actually made up of two parts, not just y(x) as normally is the case. One part defines something called X(T_) and the next part which is the solution y(x) uses this X(T) in it. 

Did I do something wrong, or is there a way around this, or is this by design?

Maple 2020.2

Please Wait...