Subject: finding out if expr has the form F(y/x^a)
From: Richard Hennessy
Date: Fri, 14 Dec 2012 16:57:59 -0500
A slight improvement, my function did not check to see if a = 0. I figured you could see that for yourself, anyway, it could be called a bug so here is a fix to that. I think it works now in every case, maybe it is more complicated than necessary.
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 and is(equal(_a,0))=false then ['a=_a,'f(x)=f,'g(x,y)=y/x*at(f,x=y/x^_a)]
)$
From: Richard Hennessy
Sent: Friday, December 14, 2012 4:20 PM
To: Aleksas Domarkas ; maxima
Subject: Re: [Maxima] 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)]
)$
--------------------------------------------------------------------------------
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima