Taken from Maple help pages on PDE. Solve the heat equation for \(u(x,y,t)\) \[ u_t= \frac {1}{10} \nabla ^2 u(x,y) \] For \(0<x<1\) and \(0<y<1\) and \(t>0\). The boundary conditions are \begin {align*} u(0,y,t) &= 0 \\ u(1,y,t) &= 0 \\ u(x,0,t) &= 0 \\ u(x,1,t) &= 0 \end {align*}
Initial condition is \(u(x,y,0)=x(1-x)(1-y)y\).
Mathematica ✓
ClearAll["Global`*"]; pde = D[u[x, y, t], t] == (1*(D[u[x, y, t], {x, 2}] + D[u[x, y, t], {y, 2}]))/10; ic = u[x, y, 0] == x*(1 - x)*(1 - y)*y; bc = {u[0, y, t] == 0, u[1, y, t] == 0, u[x, 0, t] == 0, u[x, 1, t] == 0}; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, y, t], {x, y, t}], 60*10]];
\[\left \{\left \{u(x,y,t)\to \begin {array}{cc} \{ & \begin {array}{cc} \underset {K[1]=1}{\overset {\infty }{\sum }}\underset {K[3]=1}{\overset {\infty }{\sum }}\frac {16 \left (-1+(-1)^{K[1]}\right ) \left (-1+(-1)^{K[3]}\right ) e^{\frac {1}{10} t \left (-\pi ^2 K[1]^2-\pi ^2 K[3]^2\right )} \sin (\pi x K[1]) \sin (\pi y K[3])}{\pi ^6 K[1]^3 K[3]^3} & (K[1]|K[3])\in \mathbb {Z}\land K[1]\geq 1\land K[3]\geq 1 \\ \text {Indeterminate} & \text {True} \\\end {array} \\\end {array}\right \}\right \}\]
Maple ✓
restart; pde := diff(u(x, y, t), t) = 1/10*(diff(u(x, y, t), x$2)+diff(u(x, y, t), y$2)); bc := u(0, y, t) = 0, u(1, y, t) = 0, u(x, 0, t) = 0, u(x, 1, t) = 0; ic := u(x, y, 0) = x*(1-x)*(1-y)*y; cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],u(x,y,t))),output='realtime'));
\[u \left (x , y , t\right ) = \moverset {\infty }{\munderset {\mathit {n1} =1}{\sum }}\moverset {\infty }{\munderset {n =1}{\sum }}\left (-\frac {16 \left (\left (-1\right )^{n}+\left (-1\right )^{\mathit {n1}}-\left (-1\right )^{n +\mathit {n1}}-1\right ) {\mathrm e}^{-\frac {\pi ^{2} \left (n^{2}+\mathit {n1}^{2}\right ) t}{10}} \sin \left (\pi n x \right ) \sin \left (\pi \mathit {n1} y \right )}{\pi ^{6} n^{3} \mathit {n1}^{3}}\right )\]
____________________________________________________________________________________
Taken from Maple help pages on PDE
Solve the heat equation for \(u(x,y,t)\) \[ \frac { \partial u}{\partial t}= 1/10 \left ( \frac { \partial ^2 u}{\partial x^2} + \frac { \partial ^2 u}{\partial y^2} \right ) -\frac {1}{5} u(x,y,t); \] For \(0<x<1\) and \(0<y<1\) and \(t>0\). The boundary conditions are \begin {align*} \frac {\partial u}{\partial x} u(0,y,t) &= 0 \\ u(1,y,t) &= 0 \\ u(x,0,t) &= 0 \\ \frac {\partial u}{\partial y} u(x,1,t) &= 0 \\ \end {align*}
Initial condition is \(u(x,y,0)=(1-x^2)(1- \frac {1}{2} y) y\).
Mathematica ✓
ClearAll["Global`*"]; pde = D[u[x, y, t], t] == (1*(D[u[x, y, t], {x, 2}] + D[u[x, y, t], {y, 2}]))/10 - (1*u[x, y, t])/5; ic = u[x, y, 0] == (-x^2 + 1)*(1 - (1/2)*y)*y; bc = {Derivative[1, 0, 0][u][0, y, t] == 0, u[1, y, t] == 0, u[x, 0, t] == 0, Derivative[0, 1, 0][u][x, 1, t] == 0}; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, y, t], {x, y, t}], 60*10]];
\[\left \{\left \{u(x,y,t)\to \begin {array}{cc} \{ & \begin {array}{cc} \underset {K[1]=1}{\overset {\infty }{\sum }}\underset {K[3]=1}{\overset {\infty }{\sum }}-\frac {512 (-1)^{K[1]} \exp \left (t \left (\frac {1}{10} \left (-\frac {1}{4} \pi ^2 (2 K[1]-1)^2-\frac {1}{4} \pi ^2 (2 K[3]-1)^2\right )-\frac {1}{5}\right )\right ) \cos \left (\frac {1}{2} \pi x (2 K[1]-1)\right ) \sin \left (\frac {1}{2} \pi y (2 K[3]-1)\right )}{\pi ^6 (2 K[1]-1)^3 (2 K[3]-1)^3} & (K[1]|K[3])\in \mathbb {Z}\land K[1]\geq 1\land K[3]\geq 1 \\ \text {Indeterminate} & \text {True} \\\end {array} \\\end {array}\right \}\right \}\]
Maple ✓
restart; pde := diff(u(x, y, t), t) = 1/10*(diff(u(x, y, t), x$2)+diff(u(x, y, t), y$2)) - 1/5 * u(x,y,t); ic := u(x, y, 0) = (-x^2+1)*(1-(1/2)*y)*y; bc := (D[1](u))(0, y, t) = 0, u(1, y, t) = 0, u(x, 0, t) = 0, (D[2](u))(x, 1, t) = 0; cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, ic,bc], u(x, y, t))),output='realtime'));
\[u \left (x , y , t\right ) = \moverset {\infty }{\munderset {\mathit {n1} =0}{\sum }}\moverset {\infty }{\munderset {n =0}{\sum }}\frac {512 \left (-1\right )^{n} \cos \left (\frac {\left (2 n +1\right ) \pi x}{2}\right ) {\mathrm e}^{-\frac {\left (\pi ^{2} n^{2}+\pi ^{2} \mathit {n1}^{2}+\pi ^{2} n +\pi ^{2} \mathit {n1} +2+\frac {1}{2} \pi ^{2}\right ) t}{10}} \sin \left (\frac {\left (2 \mathit {n1} +1\right ) \pi y}{2}\right )}{\pi ^{6} \left (2 n +1\right )^{3} \left (2 \mathit {n1} +1\right )^{3}}\]
____________________________________________________________________________________
Added December 20, 2018.
Example 6.6.3 from Partial differential equations and boundary value problems with Maple/George A. Articolo, 2nd ed :
We seek the temperature distribution in a thin rectangular plate over the finite two-dimensional domain \(D = {(x, y) \text {s.t.} 0<x<1, 0<y<1}\). The lateral surfaces of the plate are insulated. The boundaries \(y = 0\) and \(y = 1\) are fixed at temperature \(0\), the boundary \(x = 0\) is insulated, and the boundary \(x = 1\) is losing heat by convection into a surrounding medium at temperature \(0\). The initial temperature distribution f(x, y) is \[ u(x,y,0) = \left (1- \frac {x^2}{3} \right ) y(1-y) \] The thermal diffusivity is \(k = \frac {1}{50}\). Solve for \(u(x,y,t)\) the heat PDE \[ \frac { \partial u}{\partial t}= k \left ( \frac { \partial ^2 u}{\partial x^2} +\frac { \partial ^2 u}{\partial y^2} \right ) \] With \(0<x<1,0<y<1\) and \(t>0\). Boundary conditions are \begin {align*} \frac {\partial u}{\partial x}(0,y,t) &= 0 \\ \frac {\partial u}{\partial x}(1,y,t) + u(1,y,t) &= 0 \\ u(x,0,t) &= 0\\ u(x,1,t) &=0 \end {align*}
Mathematica ✓
ClearAll["Global`*"]; k = 1/50; pde = D[u[x, y, t], t] == k*(D[u[x, y, t], {x, 2}] + D[u[x, y, t], {y, 2}]); bc = {Derivative[1, 0, 0][u][0, y, t] == 0, Derivative[1, 0, 0][u][1, y, t] + u[1, y, t] == 0, u[x, 0, t] == 0, u[x, 1, t] == 0}; ic = u[x, y, 0] == (1 - (1/3)*x^2)*y*(1 - y); sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, y, t], {x, y, t}], 60*10]];
\[\left \{\left \{u(x,y,t)\to \begin {array}{cc} \{ & \begin {array}{cc} \underset {K[1]=1}{\overset {\infty }{\sum }}\underset {K[3]=1}{\overset {\infty }{\sum }}\frac {8 \left (-1+(-1)^{K[3]}\right ) e^{\frac {1}{50} t \left (-\pi ^2 K[3]^2-K[2,K[1]]\right )} \cos \left (x \sqrt {K[2,K[1]]}\right ) \sin (\pi y K[3]) \left (\frac {2 \cos \left (\sqrt {K[2,K[1]]}\right )}{K[2,K[1]]}-\frac {2 (K[2,K[1]]+1) \sin \left (\sqrt {K[2,K[1]]}\right )}{K[2,K[1]]^{3/2}}\right )}{3 \pi ^3 K[3]^3 \left (\sin ^2\left (\sqrt {K[2,K[1]]}\right )+1\right )} & \tan \left (\sqrt {K[2,K[1]]}\right )=\frac {1}{\sqrt {K[2,K[1]]}}\land (K[1]|K[3])\in \mathbb {Z}\land K[1]\geq 1\land K[3]\geq 1\land K[2,K[1]]>0 \\ \text {Indeterminate} & \text {True} \\\end {array} \\\end {array}\right \}\right \}\]
Maple ✓
restart; k:=1/50; pde := diff(u(x, y, t), t) = k*(diff(u(x, y, t), x$2)+diff(u(x, y, t), y$2)); bc_left_edge:=eval( diff(u(x,y,t),x),x=0)=0; bc_right_edge:= eval( diff(u(x,y,t),x),x=1)+u(1,y,t)=0; bc_bottom_edge:=u(x,0,t)=0; bc_top_edge:=u(x,1,t)=0; bc:=bc_left_edge,bc_right_edge,bc_bottom_edge,bc_top_edge; ic := u(x, y, 0) = (1-(1/3)*x^2)*y*(1-y); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc,ic], u(x, y, t)) assuming 0 <= x, x <= 1, 0 <= y, y <= 1),output='realtime'));
\[u \left (x , y , t\right ) = \moverset {\infty }{\munderset {\mathit {n1} =1}{\sum }}\moverset {\infty }{\munderset {n =0}{\sum }}\left (-\frac {32 \left (\left (-1\right )^{\mathit {n1}}-1\right ) \left (\lambda _{n}^{2} \sin \left (\lambda _{n}\right )-\lambda _{n} \cos \left (\lambda _{n}\right )+\sin \left (\lambda _{n}\right )\right ) \cos \left (x \lambda _{n}\right ) {\mathrm e}^{-\frac {\left (\pi ^{2} \mathit {n1}^{2}+\lambda _{n}^{2}\right ) t}{50}} \sin \left (\pi \mathit {n1} y \right )}{3 \pi ^{3} \left (2 \lambda _{n}+\sin \left (2 \lambda _{n}\right )\right ) \mathit {n1}^{3} \lambda _{n}^{2}}\right )\boldsymbol {\mathrm {where}}\left \{\lambda _{n} \tan \left (\lambda _{n}\right )-1=0\wedge 0<\lambda _{n}\right \}\]
____________________________________________________________________________________