Question: replacing derivatives with symbol^order

sometimes I need to check if an ode is missing y(x) or not. Since diff(y(x),x) has y(x) in it, then can not just check if the ode has y(x) or not as is, as this will always gives true if diffy(y(x),x) is there of any order.

Currently what I do, is change all y',y'',y''', etc... to Z,Z^2,Z^3,etc... and then after that it is safe to check if y(x) exist or not.

Is there a better way to do this? Below is what I currently do and it works. Just wondering if there could a more elgent way to do this.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

ode:=y(x)*diff(y(x),x$2)^2+diff(y(x),x$3)+y(x)*sqrt(diff(y(x),x))+3*x+3=1/(x*y(x)*diff(y(x),x$5));
ode_order := Student:-ODEs:-DifferentialOrder(ode,y(x)):
ode:=convert(ode,D):
for N from 1 to ode_order do
    ode:=eval(ode,[(D@@N)(y)(x)=Z^N]);
od:
ode

y(x)*(diff(diff(y(x), x), x))^2+diff(diff(diff(y(x), x), x), x)+y(x)*(diff(y(x), x))^(1/2)+3*x+3 = 1/(x*y(x)*(diff(diff(diff(diff(diff(y(x), x), x), x), x), x)))

y(x)*Z^4+Z^3+y(x)*Z^(1/2)+3*x+3 = 1/(x*y(x)*Z^5)

has(ode,y(x))

true

 

 

Download find_if_any_ode_has_yx_jan_6_2025.mw

Please Wait...