3.2.1 Cartesian coordinates (Rectangle, Square)

3.2.1.1 [255] No source
3.2.1.2 [256] Internal source term
3.2.1.3 [257] Articolo 6.6.3

3.2.1.1 [255] No source

problem number 255

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 }}2 \left (\frac {20 \left (-1+(-1)^{K[1]}\right ) \left (1-e^{-\frac {1}{10} \pi ^2 t \left (K[1]^2+K[3]^2\right )}\right ) \text {DSolve$\grave { }$DSolveHeatEquationDump$\grave { }$q} \left (-1+(-1)^{K[3]}\right )}{\pi ^4 K[1] K[3] \left (K[1]^2+K[3]^2\right )}+\frac {8 \left (-1+(-1)^{K[1]}\right ) e^{\frac {1}{10} t \left (-\pi ^2 K[1]^2-\pi ^2 K[3]^2\right )} \left (-1+(-1)^{K[3]}\right )}{\pi ^6 K[1]^3 K[3]^3}\right ) \sin (\pi x K[1]) \sin (\pi y K[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 ) =\sum _{{\it n1}=1}^{\infty } \left ( \sum _{n=1}^{\infty }-16\,{\frac { \left ( - \left ( -1 \right ) ^{{\it n1}+n}+ \left ( -1 \right ) ^{{\it n1}}+ \left ( -1 \right ) ^{n}-1 \right ) \sin \left ( n\pi \,x \right ) \sin \left ( {\it n1}\,\pi \,y \right ) {{\rm e}^{-1/10\,{\pi }^{2}t \left ( {n}^{2}+{{\it n1}}^{2} \right ) }}}{{n}^{3}{\pi }^{6}{{\it n1}}^{3}}} \right ) \]

____________________________________________________________________________________

3.2.1.2 [256] Internal source term

problem number 256

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 }}2 \cos \left (\frac {1}{2} \pi x (2 K[1]-1)\right ) \left (-\frac {160 (-1)^{K[1]} \left (1-\exp \left (-\frac {1}{20} t \left (\pi ^2 (2 (K[1]-1) K[1]+2 (K[3]-1) K[3]+1)+4\right )\right )\right ) \text {DSolve$\grave { }$DSolveHeatEquationDump$\grave { }$q}}{\pi ^2 (2 K[1]-1) (2 K[3]-1) \left (\pi ^2 (2 (K[1]-1) K[1]+2 (K[3]-1) K[3]+1)+4\right )}-\frac {256 (-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 )}{\pi ^6 (2 K[1]-1)^3 (2 K[3]-1)^3}\right ) \sin \left (\frac {1}{2} \pi y (2 K[3]-1)\right ) & (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 ) =\sum _{{\it n1}=0}^{\infty } \left ( \sum _{n=0}^{\infty }512\,{\frac { \left ( -1 \right ) ^{n}{{\rm e}^{-1/10\,t \left ( 2+{\pi }^{2}{n}^{2}+{\pi }^{2}{{\it n1}}^{2}+{\pi }^{2}n+{\pi }^{2}{\it n1}+1/2\,{\pi }^{2} \right ) }}\sin \left ( 1/2\, \left ( 1+2\,{\it n1} \right ) \pi \,y \right ) \cos \left ( 1/2\, \left ( 1+2\,n \right ) \pi \,x \right ) }{{\pi }^{6} \left ( 1+2\,n \right ) ^{3} \left ( 1+2\,{\it n1} \right ) ^{3}}} \right ) \]

____________________________________________________________________________________

3.2.1.3 [257] Articolo 6.6.3

problem number 257

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 {2 \cos \left (x \sqrt {K[2,K[1]]}\right ) \sin (\pi y K[3]) \left (\frac {100 \left (-1+(-1)^{K[3]}\right ) \left (1-e^{-\frac {1}{50} t \left (\pi ^2 K[3]^2+K[2,K[1]]\right )}\right ) \text {DSolve$\grave { }$DSolveHeatEquationDump$\grave { }$q} \sin \left (\sqrt {K[2,K[1]]}\right )}{\pi K[3] \sqrt {K[2,K[1]]} \left (\pi ^2 K[3]^2+K[2,K[1]]\right ) \sqrt {\sin ^2\left (\sqrt {K[2,K[1]]}\right )+1}}-\frac {4 \left (-1+(-1)^{K[3]}\right ) e^{\frac {1}{50} t \left (-\pi ^2 K[3]^2-K[2,K[1]]\right )} \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 \sqrt {\sin ^2\left (\sqrt {K[2,K[1]]}\right )+1}}\right )}{\sqrt {\sin ^2\left (\sqrt {K[2,K[1]]}\right )+1}} & \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 ) = \left ( \sum _{{\it n1}=1}^{\infty } \left ( \sum _{n=0}^{\infty }-{\frac { \left ( 32\, \left ( -1 \right ) ^{{\it n1}}-32 \right ) \sin \left ( {\it n1}\,\pi \,y \right ) \cos \left ( \lambda _{{n}}x \right ) \left ( {\lambda _{{n}}}^{2}\sin \left ( \lambda _{{n}} \right ) -\lambda _{{n}}\cos \left ( \lambda _{{n}} \right ) +\sin \left ( \lambda _{{n}} \right ) \right ) }{3\,{\lambda _{{n}}}^{2} \left ( 2\,\lambda _{{n}}+\sin \left ( 2\,\lambda _{{n}} \right ) \right ) {{\it n1}}^{3}{\pi }^{3}}{{\rm e}^{-{\frac {t \left ( {\pi }^{2}{{\it n1}}^{2}+{\lambda _{{n}}}^{2} \right ) }{50}}}}} \right ) , \left \{ \left ( \tan \left ( \lambda _{{n}} \right ) \lambda _{{n}}-1=0 \land 0<\lambda _{{n}}\right ) \right \} \right ) \]

____________________________________________________________________________________