# A cute little bit of Maple code to determined whether or not a # DE is separable. # # Let y' = F(x,y) be a 1st order DE # # Then "checkseparable(F)" should return true if it determines the DE is separable # otherwise it may or may not be separable. However, it returns an idea for a second # attempt. # > checkseparable:=proc(F) \ local g,d2gdxdy;\ g:=log(F);\ d2gdxdy:=simplify(diff(g,x,y));\ if d2gdxdy=0 then \ RETURN(true) \ else\ RETURN(`it seems not to be separable. You might want to plot diff( log(F),x,y). If the plot is zero everywhere in the plot, then the DE may well be separable after all.`)\ fi \ end; checkseparable := proc(F) local g,d2gdxdy; g := log(F); d2gdxdy := simplify(diff(g,x,y)); if d2gdxdy = 0 then RETURN(true) else RETURN( `it seems not to be separable. You might want to plot diff( log(F),x,y). If the plot i\ s zero everywhere in the plot, then the DE may well be separable after all.` ) fi end -------------------------------------------------------------------------------- > checkseparable(y+y^2);\ true -------------------------------------------------------------------------------- > checkseparable(1+x+y+x*y);\ true -------------------------------------------------------------------------------- > checkseparable(sin(x*y)); it seems not to be separable. You might want to plot diff( log(F),x,y). If the \ plot is zero everywhere in the plot, then the DE may well be separable after al\ l. -------------------------------------------------------------------------------- >