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



?Theorem.
Expresion u(x,y)  has the form  u(x,y)=h(y/x^a) * y/x  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)

<snip>
Equation (1) can solve with Maple pdsolve.
<snip>
?
I can look for more examples to check now that I have the pde, but so far my function works in every case I have checked.
pdecheck1(g,x,y):=block
(
    [g2,g3,g4,g5,g6,_a,inflag : true],
    catch(g2:g*x/y,
    if is(equal(at(denom(g2),y=1/x),0))=true then throw(false),
    g3:at(g2,y=1/x),
    if is(equal(g3,g2))=true then 
        (g6:1,_a:%r) 
    else 
    (
        if is(equal(at(denom(radcan(diff(g3,x))),x=1),0))=true then throw(false),
        g4:at(diff(g3,x),x=1),
        if is(equal(radcan(g4),0))=true then 
        (
            g5:at(diff(at(g,y=x),x),x=1),
            _a:-abs(g5)+1
        )
        else
        (
            g6:at(diff(at(g,y=x),x)/g4,x=1),
            _a:-ratsimp((g6+1)/(g6-1))
        )    
    ),
    f:radcan(at(g*x/y,y=x^(_a+1)))),
    if is(equal(radcan(rat(g-y/x*at(f,[x=y/x^_a]))),0))=true then ['a=_a,'f(x)=f,'g(x,y)=y/x*at(f,x=y/x^_a)]
)$