Application Center - Maplesoft

# Finding general solutions for partial differential equations (updated to Maple 7)

You can switch back to the summary page by clicking here.

pdegensol.mws

Finding general solutions for partial differential equations

by Aleksas Domarkas

Vilnius University, Faculty of Mathematics and Informatics,

Naugarduko 24, Vilnius, Lithuania

aleksas@ieva.mif.vu.lt

NOTE: In this session we find  general solutions for first and second order linear partial differential equations

Introduction

Examples 1-4 from P.Golokvoscius, Linear and quasilinear first order partial differential equations, Vilnius University, 1996 (in Lithuanian); 5-9 from V.S.Vladimirov(ed.), Exercises book on Equations of Mathematical  Physics, Nauka, Moscow, 1982(in Russian).

1 Example

 > restart;

 > eq:=(x-y)*diff(z(x,y),x)+(x+y)*diff(z(x,y),y)=0;

 > tr:={x=r*cos(phi),y=r*sin(phi)};

 > PDEtools[dchange](tr,eq,simplify);

 > so:=pdsolve(%,z(phi,r));

 > itr:={r=sqrt(x^2+y^2),phi=arctan(y/x)};

Solution:

 > sol:=z(x,y)=simplify(subs(itr,rhs(so)));

Checking the Solution:

 > simplify(subs(sol,eq));

Other form of the solution:

 > _F1:=F@ln:

 > assume(x,real,y,real):

 > sol:=simplify(sol);

Checking the Solution:

 > simplify(subs(sol,eq));

 > #pdsolve(eq);

 >

2 Example

 > restart;

 > with(linalg):

```Warning, the protected names norm and trace have been redefined and unprotected
```

 > eq:=(x-z)*diff(u(x,y,z),x)+(y-z)*diff(u(x,y,z),y)+2*z*diff(u(x,y,z),z)=0;

We use method from  E.Kamke, Diferentialgleichungen, Losungsmethoden und Losungen, II, Partiele Differentialgleichungen erster Ordnung, Leipzig 1959, Part II, Chapter III(translation into Russian 1966).

 > kk:=[coeff(lhs(eq),diff(u(x,y,z),x)),      coeff(lhs(eq),diff(u(x,y,z),y)),      coeff(lhs(eq),diff(u(x,y,z),z))];

 > A:=transpose(jacobian(kk,[x,y,z]));

 > tv:=eigenvects(A);

Eigenvectors:

 > v:=seq(op(op(3,tv[k])),k=1..nops([tv]));

Eigenvalues:

 > s:=seq(op(1,tv[k])\$op(2,tv[k]),k=1..nops([tv]));

Indepedent integrals:

 > C1:=dotprod([x,y,z],v[2])^s[1]/dotprod([x,y,z],v[1])^s[2];

 > C2:=dotprod([x,y,z],v[3])^s[1]/dotprod([x,y,z],v[1])^s[3];

 > jacobian([C1,C2],[x,y,z]);

 > rank(%);

Solution:

 > sol:=u(x,y,z)=F(C1,C2);

Checking the Solution:

 > subs(sol,eq):simplify(%);

 > #pdsolve(eq);

 >

3 Example

 > restart;

 > eq:=(z-y)*diff(u(x,y,z),x)+(x-z)*diff(u(x,y,z),y)+(y-x)*diff(u(x,y,z),z)=0;

 > S:=PDEtools[charstrip](eq,u(x,y,z));

 > Sx:=select(has,S,diff(x(_s),_s))[1];

 > Sy:=select(has,S,diff(y(_s),_s))[1];

 > Sz:=select(has,S,diff(z(_s),_s))[1];

 > Sx+Sy+Sz;

 > map(int,%,_s);

Then first integral is:

 > C1:=subs(x(_s)=x,y(_s)=y,z(_s)=z,lhs(%));

 > simplify(2*Sx*x(_s)+2*Sy*y(_s)+2*Sz*z(_s));

 > map(int,%,_s);

Then second integral is:

 > C2:=subs(x(_s)=x,y(_s)=y,z(_s)=z,lhs(%));

Solution:

 > sol:=u(x,y,z)=F(C1,C2);

Checking the Solution:

 > simplify(subs(sol,eq));

 > #pdsolve(eq);

 >

4 Example

 > restart;

 > eq:=y*diff(u(x,y,p,q),x)-x*diff(u(x,y,p,q),y)+q*diff(u(x,y,p,q),p)-p*diff(u(x,y,p,q),q)=0;

 > S:=PDEtools[charstrip](eq,u(x,y,p,q));

 > Sx:=select(has,S,diff(x(_s),_s))[1];

 > Sy:=select(has,S,diff(y(_s),_s))[1];

 > Sp:=select(has,S,diff(p(_s),_s))[1];

 > Sq:=select(has,S,diff(q(_s),_s))[1];

 > 2*Sx*x(_s)+2*Sy*y(_s);

 > map(int,%,_s);

Then first integral is:

 > C1:=subs(x(_s)=x,y(_s)=y,lhs(%));

 > 2*Sp*p(_s)+2*Sq*q(_s);

 > 2*p(_s)*diff(p(_s),_s)+2*q(_s)*diff(q(_s),_s) = 0;

 > map(int,%,_s);

Then second integral is:

 > C2:=subs(p(_s)=p,q(_s)=q,lhs(%));

 > Sp*x(_s)+Sx*p(_s)+Sq*y(_s)+Sy*q(_s);

 > diff(x(_s)*p(_s)+y(_s)*q(_s),_s);

Then third integral is:

 > C3:=x*p+y*q;

Solution:

 > sol:=u(x,y,p,q)=F(C1,C2,C3);

Checking the Solution:

 > simplify(subs(sol,eq));

 > #pdsolve(eq);

 >

5 Example

 > restart;

 > eq:=y*diff(u(x,y),x,x)+(x-y)*diff(u(x,y),x,y)-x*diff(u(x,y),y,y)=0;

program  to_can

 > to_can:=proc(eq)option `Copyright Aleksas Domarkas, 1998`; local A,itr,t,i; A := linalg[matrix](2,2,[coeff(eq,diff(u(x,y),x,x)),coeff(eq,diff(u(x,y),x,y))/2,coeff(eq,diff(u(x,y),x,y))/2,  coeff(eq,diff(u(x,y),y,y))]); simplify({solve(A[1,1]*z^2-2*A[1,2]*z+A[2,2],z)}); simplify(%,power,symbolic); subs(y=y(x),%); {seq(dsolve(diff(y(x),x)=%[i],y(x)),i=1..nops(%))}; subs(y(x)=y,%); {seq(solve(%[i],_C1),i=1..nops(%))}; if nops(%)=1 and not has(%,I) then itr:={xi=%[1],eta=y}; t:=par;elif not has(%,I) then itr:={xi=%[1],eta=%[2]};t:=hip;else itr :={xi=coeff(%[1],I),eta=%[1]-coeff(%[1],I)*I};t:=ell; fi; itr:=simplify(itr); RETURN(itr,t); end;

 > to_can(lhs(eq));

 > itr:=%[1];

 > tr:=solve(itr,{x,y});

 > PDEtools[dchange](tr,eq,expand);

 > pdsolve(%);

Solution:

 > sol:=u(x,y)=sort(subs(itr,rhs(expand(%))),[x,y]);

Checking the Solution:

 > simplify(subs(sol,eq));

 > #pdsolve(eq);

 >

6 Example

 > restart;

 > eq:=diff(u(x,y),x,y)-x*diff(u(x,y),x)+u(x,y)=0;

 > diff(eq,x);

 > diff(v(x,y),y)-x*v(x,y)=0;

 > pdsolve(%,v(x,y));

 > subs(v(x,y)=diff(u(x,y),x,x),%);

 > so:=pdsolve(%,u(x,y));

 > simplify(subs(%,eq));

 > isolate(%,op(-1,lhs(%)));

Solution:

 > sol:=u(x,y)=subs(%,rhs(so));

Checking the Solution:

 > simplify(subs(sol,eq));

 > #pdsolve(eq);

 >

7 Example

 > restart;

 > eq:=diff(u(x,y),x,y)+2*x*y*diff(u(x,y),y)-2*x*u(x,y)=0;

 > diff(eq,y);

 > diff(v(x,y),x)+2*x*y*v(x,y)=0;

 > pdsolve(%,v(x,y));

 > subs(v(x,y)=diff(u(x,y),y,y),%);

 > so:=pdsolve(%,u(x,y));

 > simplify(subs(so,eq));

 > isolate(%,_F3(x));

Solution:

 > sol:=simplify(subs(%,so));

Checking the Solution:

 > simplify(subs(%,eq));

 > #pdsolve(eq);

 >

8   Example

 > restart;

 > eq:=diff(u(x,y),x,y)+diff(u(x,y),x)+y*diff(u(x,y),y)+(y-1)*u(x,y)=0;

 > subs(u(x,y)=w(x,y)*exp(-y),eq);

 > eqn:=simplify(%/exp(-y));

 > diff(%,y);

 > DEtools[dsubs](diff(w(x,y),y\$2)=v(x,y),%);

 > pdsolve(%);

 > subs(v(x,y)=diff(w(x,y),y,y),%);

 > so:=pdsolve(%,w(x,y));

 > simplify(subs(%,eqn));

 > isolate(%,_F3(x));

Solution:

 > sol:=u(x,y)=subs(%,rhs(so))*exp(-y);

Checking the Solution:

 > expand(simplify(subs(%,eq)));

 > #pdsolve(eq);

 >

9  Example

 > restart;

 > eq:=diff(u(x,y),x,y)+x*diff(u(x,y),x)+2*y*diff(u(x,y),y)+2*x*y*u(x,y)=0;

 > subs(u(x,y)=w(x,y)*exp(-x*y),eq);

 > eqn:=simplify(%/exp(-x*y));

 > diff(%,y);

 > DEtools[dsubs](diff(w(x,y),y\$2)=v(x,y),%);

 > #diff(v(x,y),x)+y*v(x,y)=0;

 > pdsolve(%,v(x,y));

 > subs(v(x,y)=diff(w(x,y),y,y),%);

 > so:=pdsolve(%,w(x,y));

 > simplify(subs(%,eqn));

 > isolate(%,_F3(x));

Solution:

 > sol:=u(x,y)=subs(%,rhs(so))*exp(-x*y);

Checking the Solution:

 > simplify(subs(%,eq));

 > #pdsolve(eq);

 >

 >

While every effort has been made to validate the solutions in this worksheet, Waterloo Maple Inc. and the contributors are not responsible for any errors contained and are not liable for any damages resulting from the use of this material.