Partial Differential Equations - Maple Help

 Expanded Ability to solve PDEs with Boundary Conditions

For Partial differential equations with boundary condition (PDE and BC), problems in three independent variables can now be solved, and more problems in two independent variables are now solved.

PDE&BC problems in three independent variables for bounded spatial domains can now be solved

We are now able to solve 3-variable PDE&BC problems in bounded spatial domains through separation of variables by product and eigenfunction expansion. The example problems and corresponding descriptions below are taken from: Articolo, George A. Partial Differential Equations and Boundary Value Problems with Maple. 2nd ed., Elsevier Academic Press, 2009.

A homogeneous diffusion PDE in two bounded spatial dimensions

The temperature distribution in thin plates whose lateral surfaces are insulated, in the bounded domain $x=0..1,y=0..1,$ is sought. The problem is represented as follows (Articolo, p.396):

 > ${\mathrm{pde}}_{1}≔\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)=\frac{1}{10}\left(\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)+\frac{{\partial }^{2}}{\partial {y}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)\right):$

with the boundary and initial conditions:

 > ${\mathrm{iv}}_{1}≔u\left(0,y,t\right)=0,u\left(1,y,t\right)=0,u\left(x,0,t\right)=0,u\left(x,1,t\right)=0,u\left(x,y,0\right)=x\left(1-x\right)\left(1-y\right)y:$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{1},{\mathrm{iv}}_{1}\right],u\left(x,y,t\right)\right)$
 ${u}{}\left({x}{,}{y}{,}{t}\right){=}{\sum }_{{\mathrm{n1}}{=}{1}}^{{\mathrm{\infty }}}{}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}{-}\frac{{16}{}\left({-}{\left({-1}\right)}^{{\mathrm{n1}}{+}{n}}{+}{\left({-1}\right)}^{{\mathrm{n1}}}{+}{\left({-1}\right)}^{{n}}{-}{1}\right){}{\mathrm{sin}}{}\left({n}{}{\mathrm{\pi }}{}{x}\right){}{\mathrm{sin}}{}\left({\mathrm{n1}}{}{\mathrm{\pi }}{}{y}\right){}{{ⅇ}}^{{-}\frac{{t}{}{{\mathrm{\pi }}}^{{2}}{}\left({{n}}^{{2}}{+}{{\mathrm{n1}}}^{{2}}\right)}{{10}}}}{{{n}}^{{3}}{}{{\mathrm{\pi }}}^{{6}}{}{{\mathrm{n1}}}^{{3}}}$ (1)

One way to verify that this solution satisfies the initial condition is to plot $u\left(x,y,0\right)=x\left(1-x\right)\left(1-y\right)y$ together with its series representation (below we use the first 10000 terms in the solution) in the corresponding range, in this case $x=0..1,y=0..1.$

 > $\mathrm{map}\left(\mathrm{plot3d},\left[\mathrm{subs}\left(t=0,\mathrm{infinity}=100,\mathrm{rhs}\left(\right)\right),x\left(1-x\right)\left(1-y\right)y\right],x=0..1,y=0..1\right)$
 $\left[{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right){,}{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right)\right]$ (2)

A homogeneous diffusion PDE with heat loss in two bounded spatial dimensions

The temperature distribution in thin plates whose lateral surfaces are experiencing heat loss proportional to the plate and surrounding temperatures in a bounded domain is sought. The problem is represented as follows (Articolo, p. 401):

 > ${\mathrm{pde}}_{2}≔\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)=\frac{1}{10}\left(\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)\right)+\frac{1}{10}\left(\frac{{\partial }^{2}}{\partial {y}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)\right)-\frac{1}{5}u\left(x,y,t\right):$

with the boundary and initial conditions:

 > ${\mathrm{iv}}_{2}≔{\mathrm{D}}_{1}\left(u\right)\left(0,y,t\right)=0,u\left(1,y,t\right)=0,u\left(x,0,t\right)=0,{\mathrm{D}}_{2}\left(u\right)\left(x,1,t\right)=0,u\left(x,y,0\right)=\left(-{x}^{2}+1\right)\left(1-\frac{1}{2}y\right)y:$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{2},{\mathrm{iv}}_{2}\right],u\left(x,y,t\right)\right)$
 ${u}{}\left({x}{,}{y}{,}{t}\right){=}{\sum }_{{\mathrm{n1}}{=}{0}}^{{\mathrm{\infty }}}{}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{512}{}{\left({-1}\right)}^{{n}}{}{\mathrm{cos}}{}\left(\frac{\left({1}{+}{2}{}{n}\right){}{\mathrm{\pi }}{}{x}}{{2}}\right){}{\mathrm{sin}}{}\left(\frac{\left({1}{+}{2}{}{\mathrm{n1}}\right){}{\mathrm{\pi }}{}{y}}{{2}}\right){}{{ⅇ}}^{{-}\frac{\left({2}{+}\left({{n}}^{{2}}{+}{{\mathrm{n1}}}^{{2}}{+}{n}{+}{\mathrm{n1}}{+}\frac{{1}}{{2}}\right){}{{\mathrm{\pi }}}^{{2}}\right){}{t}}{{10}}}}{{\left({1}{+}{2}{}{n}\right)}^{{3}}{}{{\mathrm{\pi }}}^{{6}}{}{\left({1}{+}{2}{}{\mathrm{n1}}\right)}^{{3}}}$ (3)

To verify that this solution satisfies the initial condition, we plot $u\left(x,y,0\right)=\left(-{x}^{2}+1\right)\left(1-\frac{1}{2}y\right)y$ and its series representation in the domain, which in this case is again $x=0..1,y=0..1$:

 > $\mathrm{map}\left(\mathrm{plot3d},\left[\mathrm{subs}\left(t=0,\mathrm{infinity}=100,\mathrm{rhs}\left(\right)\right),\left(-{x}^{2}+1\right)\left(1-\frac{1}{2}y\right)y\right],x=0..1,y=0..1\right)$
 $\left[{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right){,}{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right)\right]$ (4)

A homogeneous wave PDE in two bounded spatial dimensions

The wave amplitude for the transverse wave propagation on a thin rectangular membrane in a medium with no damping over a finite domain is sought. The problem is represented as follows (Articolo, p. 425):

 > ${\mathrm{pde}}_{3}≔\frac{{\partial }^{2}}{\partial {t}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)=\frac{1}{4}\left(\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)\right)+\frac{1}{4}\left(\frac{{\partial }^{2}}{\partial {y}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)\right):$

with the boundaries $x=0,x=\mathrm{\pi }$ unsecured, boundaries $y=0,y=\mathrm{\pi }$ secured, and initial conditions as follows:

 > ${\mathrm{iv}}_{3}≔{\mathrm{D}}_{1}\left(u\right)\left(0,y,t\right)=0,{\mathrm{D}}_{1}\left(u\right)\left(\mathrm{\pi },y,t\right)=0,u\left(x,0,t\right)=0,u\left(x,\mathrm{\pi },t\right)=0,{\mathrm{D}}_{3}\left(u\right)\left(x,y,0\right)=0,u\left(x,y,0\right)=xy\left(\mathrm{\pi }-y\right):$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{3},{\mathrm{iv}}_{3}\right],u\left(x,y,t\right)\right)$
 ${u}{}\left({x}{,}{y}{,}{t}\right){=}\left({\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}{-}\frac{{2}{}\left({\left({-1}\right)}^{{n}}{-}{1}\right){}{\mathrm{sin}}{}\left({n}{}{y}\right){}{\mathrm{cos}}{}\left(\frac{{n}{}{t}}{{2}}\right)}{{{n}}^{{3}}}\right){+}\left({\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\sum }_{{\mathrm{n1}}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{8}{}\left({-}{\left({-1}\right)}^{{\mathrm{n1}}{+}{n}}{+}{\left({-1}\right)}^{{\mathrm{n1}}}{+}{\left({-1}\right)}^{{n}}{-}{1}\right){}{\mathrm{cos}}{}\left({\mathrm{n1}}{}{x}\right){}{\mathrm{sin}}{}\left({n}{}{y}\right){}{\mathrm{cos}}{}\left(\frac{\sqrt{{{n}}^{{2}}{+}{{\mathrm{n1}}}^{{2}}}{}{t}}{{2}}\right)}{{{\mathrm{\pi }}}^{{2}}{}{{\mathrm{n1}}}^{{2}}{}{{n}}^{{3}}}\right)$ (5)

We verify the initial condition by comparing plots of both the initial condition function $u\left(x,y,0\right)=xy\left(\mathrm{\pi }-y\right)$ and its series representation:

 > $\mathrm{map}\left(\mathrm{plot3d},\left[\mathrm{subs}\left(t=0,\mathrm{infinity}=100,\mathrm{rhs}\left(\right)\right),xy\left(\mathrm{\pi }-y\right)\right],x=0..\mathrm{\pi },y=0..\mathrm{\pi }\right)$
 $\left[{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right){,}{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right)\right]$ (6)

A homogeneous wave PDE (with damping) in two bounded spatial dimensions

The wave amplitude for the transverse wave propagation on a thin rectangular membrane in a medium with damping over a finite domain is sought. The problem is represented as follows (Articolo, p. 468):

 > ${\mathrm{pde}}_{4}≔\frac{{\partial }^{2}}{\partial {t}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)=\frac{1}{4}\left(\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)+\frac{{\partial }^{2}}{\partial {y}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)\right)-\frac{1}{10}\left(\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,y,t\right)\right):$

with the boundaries $x=0,y=0$ held secure, boundaries $x=1,y=1$ unsecure, and initial conditions as follows:

 > ${\mathrm{iv}}_{4}≔u\left(0,y,t\right)=0,{\mathrm{D}}_{1}\left(u\right)\left(1,y,t\right)=0,u\left(x,0,t\right)=0,{\mathrm{D}}_{2}\left(u\right)\left(x,1,t\right)=0,u\left(x,y,0\right)=0,{\mathrm{D}}_{3}\left(u\right)\left(x,y,0\right)=x\left(1-\frac{1}{2}x\right)\left(1-\frac{1}{2}y\right)y:$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{4},{\mathrm{iv}}_{4}\right],u\left(x,y,t\right)\right)$
 ${u}{}\left({x}{,}{y}{,}{t}\right){=}{\sum }_{{\mathrm{n1}}{=}{0}}^{{\mathrm{\infty }}}{}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{5120}{}{\mathrm{sin}}{}\left(\frac{\left({1}{+}{2}{}{n}\right){}{\mathrm{\pi }}{}{x}}{{2}}\right){}{\mathrm{sin}}{}\left(\frac{\left({1}{+}{2}{}{\mathrm{n1}}\right){}{\mathrm{\pi }}{}{y}}{{2}}\right){}{{ⅇ}}^{{-}\frac{{t}}{{20}}}{}{\mathrm{sin}}{}\left(\frac{{t}{}\sqrt{{-}{1}{+}\left({100}{}{{n}}^{{2}}{+}{100}{}{{\mathrm{n1}}}^{{2}}{+}{100}{}{n}{+}{100}{}{\mathrm{n1}}{+}{50}\right){}{{\mathrm{\pi }}}^{{2}}}}{{20}}\right)}{\sqrt{{-}{1}{+}\left({100}{}{{n}}^{{2}}{+}{100}{}{{\mathrm{n1}}}^{{2}}{+}{100}{}{n}{+}{100}{}{\mathrm{n1}}{+}{50}\right){}{{\mathrm{\pi }}}^{{2}}}{}{{\mathrm{\pi }}}^{{6}}{}{\left({1}{+}{2}{}{\mathrm{n1}}\right)}^{{3}}{}{\left({1}{+}{2}{}{n}\right)}^{{3}}}$ (7)

To verify the initial condition, we compare the plots of both the initial condition function ${\mathrm{D}}_{3}\left(u\right)\left(x,y,0\right)=x\left(1-\frac{1}{2}x\right)\left(1-\frac{1}{2}y\right)y$ and its series representation:

 > $\mathrm{map}\left(\mathrm{plot3d},\left[\mathrm{subs}\left(t=0,\mathrm{infinity}=100,\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\mathrm{rhs}\left(\right)\right),x\left(1-\frac{1}{2}x\right)\left(1-\frac{1}{2}y\right)y\right],x=0..1,y=0..1\right)$
 $\left[{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right){,}{\mathrm{PLOT3D}}{}\left({\mathrm{...}}\right)\right]$ (8)

More PDE&BC problems in two independent variables for bounded spatial domains can be solved

The code for solving PDE&BC problems in bounded spatial domains through separation by product and eigenfunction expansion continues to grow.

Solving more problems with periodic boundary conditions

A problem involving the diffusion PDE:

 > ${\mathrm{pde}}_{5}≔\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)=k\left(\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)\right):$
 > ${\mathrm{iv}}_{5}≔u\left(x,0\right)=f\left(x\right),u\left(-l,t\right)=u\left(l,t\right),{\mathrm{D}}_{1}\left(u\right)\left(-l,t\right)={\mathrm{D}}_{1}\left(u\right)\left(l,t\right):$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{5},{\mathrm{iv}}_{5}\right],u\left(x,t\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{assuming}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}0
 ${u}{}\left({x}{,}{t}\right){=}\frac{{2}{}\left({\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\frac{\left(\left({{\int }}_{{-}{l}}^{{l}}{f}{}\left({x}\right){}{\mathrm{sin}}{}\left(\frac{{n}{}{\mathrm{\pi }}{}{x}}{{l}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{sin}}{}\left(\frac{{n}{}{\mathrm{\pi }}{}{x}}{{l}}\right){+}\left({{\int }}_{{-}{l}}^{{l}}{f}{}\left({x}\right){}{\mathrm{cos}}{}\left(\frac{{n}{}{\mathrm{\pi }}{}{x}}{{l}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{cos}}{}\left(\frac{{n}{}{\mathrm{\pi }}{}{x}}{{l}}\right)\right){}{{ⅇ}}^{{-}\frac{{k}{}{{\mathrm{\pi }}}^{{2}}{}{{n}}^{{2}}{}{t}}{{{l}}^{{2}}}}}{{l}}\right){}{l}{+}{{\int }}_{{-}{l}}^{{l}}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}}{{2}{}{l}}$ (9)

A problem involving the Laplace PDE in cylindrical coordinates:

 > ${\mathrm{pde}}_{6}≔\frac{\frac{\partial }{\partial r}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\left(r\left(\frac{\partial }{\partial r}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(r,\mathrm{\theta }\right)\right)\right)}{r}+\frac{\frac{{\partial }^{2}}{\partial {\mathrm{\theta }}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(r,\mathrm{\theta }\right)}{{r}^{2}}=0:$
 > ${\mathrm{iv}}_{6}≔u\left(a,\mathrm{\theta }\right)=f\left(\mathrm{\theta }\right),u\left(r,-\mathrm{\pi }\right)=u\left(r,\mathrm{\pi }\right),{\mathrm{D}}_{2}\left(u\right)\left(r,-\mathrm{\pi }\right)={\mathrm{D}}_{2}\left(u\right)\left(r,\mathrm{\pi }\right):$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{6},{\mathrm{iv}}_{6}\right],u\left(r,\mathrm{\theta }\right),\mathrm{HINT}=\mathrm{boundedseries}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{assuming}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}0
 ${u}{}\left({r}{,}{\mathrm{\theta }}\right){=}\frac{{2}{}\left({\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{{r}}^{{n}}{}\left(\left({{\int }}_{{-}{\mathrm{\pi }}}^{{\mathrm{\pi }}}{f}{}\left({\mathrm{\theta }}\right){}{\mathrm{sin}}{}\left({n}{}{\mathrm{\theta }}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{\theta }}\right){}{\mathrm{sin}}{}\left({n}{}{\mathrm{\theta }}\right){+}\left({{\int }}_{{-}{\mathrm{\pi }}}^{{\mathrm{\pi }}}{f}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({n}{}{\mathrm{\theta }}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({n}{}{\mathrm{\theta }}\right)\right){}{{a}}^{{-}{n}}}{{\mathrm{\pi }}}\right){}{\mathrm{\pi }}{+}{{\int }}_{{-}{\mathrm{\pi }}}^{{\mathrm{\pi }}}{f}{}\left({\mathrm{\theta }}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{\theta }}}{{2}{}{\mathrm{\pi }}}$ (10)

Another problem involving the heat PDE:

 > ${\mathrm{pde}}_{7}≔\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)=\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right):$
 > ${\mathrm{iv}}_{7}≔u\left(x,0\right)=f\left(x\right),u\left(-1,t\right)=0,u\left(1,t\right)=0:$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{7},{\mathrm{iv}}_{7}\right],u\left(x,t\right)\right)$
 ${u}{}\left({x}{,}{t}\right){=}{\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\left(\left({{\int }}_{{-1}}^{{1}}{f}{}\left({x}\right){}{\mathrm{sin}}{}\left({n}{}{\mathrm{\pi }}{}{x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{sin}}{}\left({n}{}{\mathrm{\pi }}{}{x}\right){}{{ⅇ}}^{\frac{{t}{}{{\mathrm{\pi }}}^{{2}}{}{\left({2}{}{n}{-}{1}\right)}^{{2}}}{{4}}}{+}\left({{\int }}_{{-1}}^{{1}}{f}{}\left({x}\right){}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}{}{x}{}\left({2}{}{n}{-}{1}\right)}{{2}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{cos}}{}\left(\frac{{\mathrm{\pi }}{}{x}{}\left({2}{}{n}{-}{1}\right)}{{2}}\right){}{{ⅇ}}^{{t}{}{{\mathrm{\pi }}}^{{2}}{}{{n}}^{{2}}}\right){}{{ⅇ}}^{{-}\frac{{t}{}{{\mathrm{\pi }}}^{{2}}{}\left({8}{}{{n}}^{{2}}{-}{4}{}{n}{+}{1}\right)}{{4}}}$ (11)

Solving more problems with non-homogeneous boundary conditions

A problem involving the heat PDE:

 > ${\mathrm{pde}}_{8}≔\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)=\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right):$
 > ${\mathrm{iv}}_{8}≔u\left(0,t\right)=20,u\left(1,t\right)=50,u\left(x,0\right)=0:$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{8},{\mathrm{iv}}_{8}\right],u\left(x,t\right)\right)$
 ${u}{}\left({x}{,}{t}\right){=}{20}{+}{30}{}{x}{+}\left({\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\frac{\left({-}{40}{+}{100}{}{\left({-1}\right)}^{{n}}\right){}{\mathrm{sin}}{}\left({n}{}{\mathrm{\pi }}{}{x}\right){}{{ⅇ}}^{{-}{t}{}{{\mathrm{\pi }}}^{{2}}{}{{n}}^{{2}}}}{{n}{}{\mathrm{\pi }}}\right)$ (12)

A problem involving the heat PDE with a source:

 > ${\mathrm{pde}}_{9}≔\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)+k\left(\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)\right)+k:$
 > ${\mathrm{iv}}_{9}≔u\left(x,0\right)=f\left(x\right),u\left(0,t\right)=A,u\left(L,t\right)=B:$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{9},{\mathrm{iv}}_{9}\right],u\left(x,t\right)\right)$
 ${u}{}\left({x}{,}{t}\right){=}\frac{{2}{}\left({\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\left({-}\frac{\left({{\int }}_{{0}}^{{L}}{2}{}\left({-}{f}{}\left({x}\right){}{L}{+}\frac{{{L}}^{{2}}{}{x}}{{2}}{+}\left({-}\frac{{{x}}^{{2}}}{{2}}{+}{A}\right){}{L}{-}{x}{}\left({A}{-}{B}\right)\right){}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}{}{n}{}{x}}{{L}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{sin}}{}\left(\frac{{\mathrm{\pi }}{}{n}{}{x}}{{L}}\right){}{{ⅇ}}^{\frac{{k}{}{{\mathrm{\pi }}}^{{2}}{}{{n}}^{{2}}{}{t}}{{{L}}^{{2}}}}}{{{L}}^{{2}}}\right)\right){}{L}{+}{{L}}^{{2}}{}{x}{+}\left({-}{{x}}^{{2}}{+}{2}{}{A}\right){}{L}{-}{2}{}{x}{}\left({A}{-}{B}\right)}{{2}{}{L}}$ (13)

Solving more problems with a source term in the PDE

A diffusion problem with a source function $f\left(x,t\right)$:

 > ${\mathrm{pde}}_{10}≔\frac{\partial }{\partial t}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)=k\left(\frac{{\partial }^{2}}{\partial {x}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(x,t\right)\right)+f\left(x,t\right):$
 > ${\mathrm{iv}}_{10}≔u\left(0,t\right)=0,u\left(l,t\right)=0,u\left(x,0\right)=g\left(x\right):$
 >
 ${u}{}\left({x}{,}{t}\right){=}\left({\sum }_{{\mathrm{n1}}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{2}{}\left({{\int }}_{{0}}^{{l}}{g}{}\left({x}\right){}{\mathrm{sin}}{}\left(\frac{{\mathrm{n1}}{}{\mathrm{\pi }}{}{x}}{{l}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{sin}}{}\left(\frac{{\mathrm{n1}}{}{\mathrm{\pi }}{}{x}}{{l}}\right){}{{ⅇ}}^{{-}\frac{{k}{}{{\mathrm{\pi }}}^{{2}}{}{{\mathrm{n1}}}^{{2}}{}{t}}{{{l}}^{{2}}}}}{{l}}\right){+}{{\int }}_{{0}}^{{t}}\left({\sum }_{{n}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{2}{}\left({{\int }}_{{0}}^{{l}}{f}{}\left({x}{,}{\mathrm{τ1}}\right){}{\mathrm{sin}}{}\left(\frac{{n}{}{\mathrm{\pi }}{}{x}}{{l}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}\right){}{\mathrm{sin}}{}\left(\frac{{n}{}{\mathrm{\pi }}{}{x}}{{l}}\right){}{{ⅇ}}^{{-}\frac{{k}{}{{\mathrm{\pi }}}^{{2}}{}{{n}}^{{2}}{}\left({t}{-}{\mathrm{τ1}}\right)}{{{l}}^{{2}}}}}{{l}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{\mathrm{τ1}}$ (14)

Improvements to the ability to solve problems with the Laplace PDE

In cylindrical coordinates:

 > ${\mathrm{pde}}_{11}≔\frac{\frac{\partial }{\partial r}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(r,\mathrm{\theta }\right)+r\left(\frac{{\partial }^{2}}{\partial {r}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(r,\mathrm{\theta }\right)\right)}{r}+\frac{\frac{{\partial }^{2}}{\partial {\mathrm{\theta }}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}u\left(r,\mathrm{\theta }\right)}{{r}^{2}}=0:$
 > ${\mathrm{iv}}_{11}≔u\left(0,\mathrm{\theta }\right)=0,u\left(1,\mathrm{\theta }\right)=\mathrm{\theta }\left(\frac{1}{3}\mathrm{\pi }-\mathrm{\theta }\right),u\left(r,0\right)=0,u\left(r,\frac{1}{3}\mathrm{\pi }\right)=0:$
 > $\mathrm{pdsolve}\left(\left[{\mathrm{pde}}_{11},{\mathrm{iv}}_{11}\right],u\left(r,\mathrm{\theta }\right)\right)$