finding out if expr has the form F(y/x^a)



Answer to
http://www.math.utexas.edu/pipermail/maxima/2012/031140.html

 Hi Rich !
Thank you for your comments.
I updated  check to check1.
Now  cases u(x,y)=a*x and u(x,y)=0 are included.

 Theorem.
Expresion u(x,y)  has the form  u(x,y)=y/x*f(y/x^a)  if only if
u(x,y) is solution of pde
a*y*diff(u(x,y),y)+x*diff(u(x,y),x)=(a-1)*u(x,y)      (1)

 Recommendation. First make from menu: Maxima>Restart Maxima

(%i1) check1(g,x,y):=block([eq,sol,_a],
eq:_a*y*diff(u(x,y),y)+x*diff(u(x,y),x)=(_a-1)*u(x,y),
subst(u(x,y)=g,eq), ev(%%,nouns),
sol:radcan(solve(%%,_a)),
if sol=all then sol:[a=%r],
if not freeof (x,y, sol) then return(false),
[g='f(y/x^a)*y/x,a=rhs(sol[1]),f(x)=radcan(subst([y=x^(_a+1),sol[1]],g*x/y))])$

 Examples. Now all correct.

(%i2) check1(1/x^3,x,y);
(%o2) [1/x^3=(y*f(y/x^a))/x,a=-2,f(x)=1/x]

(%i3) check1(y^4/x^3,x,y);
(%o3) [y^4/x^3=(y*f(y/x^a))/x,a=2/3,f(x)=x^3]

(%i4) check1(1/x^2,x,y);
(%o4) [1/x^2=(y*f(y/x^a))/x,a=-1,f(x)=1/x]

(%i5) check1(1/x^3,x,y);
(%o5) [1/x^3=(y*f(y/x^a))/x,a=-2,f(x)=1/x]

(%i6) check1(1,x,y);
(%o6) [1=(y*f(y/x^a))/x,a=1,f(x)=1/x]

(%i7) check1(x,x,y);
(%o7) [x=(y*f(y/x^a))/x,a=2,f(x)=1/x]

(%i8) check1(0,x,y);
(%o8) [0=(y*f(y/x^a))/x,a=%r,f(x)=0]

(%i9) check1(a*x,x,y);
(%o9) [a*x=(y*f(y/x^a))/x,a=2,f(x)=a/x]

(%i10) check1(b*x,x,y);
(%o10) [b*x=(y*f(y/x^a))/x,a=2,f(x)=b/x]

(%i11) build_info();
(%o11) build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU
Common Lisp (GCL)","GCL 2.6.8")

 Regards
Aleksas