Subject: Solving linear second-order PDE in closed form
From: Aleksas Domarkas
Date: Fri, 20 Apr 2012 22:57:06 +0300
*??? wrote:*>>* Hi,*>>* I'm a undergraduate strudent, learning
linear second-order PDE now.I*>>* want to write some programs to solve
the boring PDEs.Are there any examples*>>* to help me begin the work?*
Example(example 2.22 fom Prem K. Kythe, e.a., Partial differential
equations and Mathematica, 1997)
Solve pde
(%i1)
eq:y^2*'diff(u,x,2)-4*x*y*'diff(u,x,1,y,1)+3*x^2*'diff(u,y,2)-y^2/x*'diff(u,x,1)-3*x^2/y*'diff(u,y,1)=0$
(%i2) load(contrib_ode)$ load(pdiff)$
Characteristic equation:
(%i4) char_eq:y^2*'diff(y,x)^2+4*x*y*'diff(y,x)+3*x^2=0;
(%o4) y^2*('diff(y,x,1))^2+4*x*y*('diff(y,x,1))+3*x^2=0
(%i5) s:contrib_ode(char_eq,y,x);
(%t5) y^2*('diff(y,x,1))^2+4*x*y*('diff(y,x,1))+3*x^2=0
"first order equation not linear in y'"
(%o5) [-y^2/2=x^2/2+%c,-y^2/6=x^2/2+%c]
(%i6) solve(s[1],%c);
(%o6) [%c=-(y^2+x^2)/2]
(%i7) sol1:reverse(%[1]*(-2));
(%o7) y^2+x^2=-2*%c
(%i8) solve(s[2],%c);
(%o8) [%c=-(y^2+3*x^2)/6]
(%i9) sol2:reverse(%[1]*(-6));
(%o9) y^2+3*x^2=-6*%c
(%i10) tr:[xi=lhs(sol1),eta=lhs(sol2)];
(%o10) [xi=y^2+x^2,eta=y^2+3*x^2]
(%i11) depends(u,[xi,eta],xi,[x,y],eta,[x,y])$
(%i12)
isv:append(diff(tr,x),diff(tr,x,2),diff(tr,y),diff(tr,y,2),diff(tr,x,1,y,1));
(%o12)
['diff(xi,x,1)=2*x,'diff(eta,x,1)=6*x,'diff(xi,x,2)=2,'diff(eta,x,2)=6,'diff(xi,y,1)=2*y,'diff(eta,y,1)=2*y,'diff(xi,y,2)=2,'diff(eta,y,2)=2,'diff(xi,x,1,y,1)=0,'diff(eta,x,1,y,1)=0]
(%i13) subst(isv,ev(eq,nouns)),expand;
(%o13) -16*('diff(u,eta,1,xi,1))*x^2*y^2=0
We get the canonical form(hyperbolic equation)
(%i14) can_form:solve(%,'diff(u,eta,1,xi,1))[1];
(%o14) 'diff(u,eta,1,xi,1)=0
solution of this equation is
(%i15) u=F(xi)+G(eta);
(%o15) u=F(xi)+G(eta)
whose solution is
(%i16) solution:subst(tr,%);
(%o16) u=G(y^2+3*x^2)+F(y^2+x^2)
where G and F any differentiable functions.
Test of solution:
(%i17) subst(solution,eq)$
(%i18) ev(%, nouns)$
(%i19) ratsimp(%);
(%o19) 0=0
Moore examples with Maple see
http://www.maplesoft.com/applications/author.aspx?mid=17
Aleksas D