4.1.1 Cartesian coordinates

4.1.1.1 [280] Rectangle, 3 edges zero, buttom edge not
4.1.1.2 [281] Rectangle, 3 edges zero, right edge not
4.1.1.3 [282] Rectangle, 3 edges zero, buttom edge has impulse
4.1.1.4 [283] Haberman 2.5.1 (a)
4.1.1.5 [284] Haberman 2.5.1 (b)
4.1.1.6 [285] Haberman 2.5.1 (c)
4.1.1.7 [286] Haberman 2.5.1 (d)
4.1.1.8 [287] Haberman 2.5.1 (e)
4.1.1.9 [288] Unit triangle B.C.
4.1.1.10 [289] Top edge at infinity
4.1.1.11 [290] Top edge at infinity
4.1.1.12 [291] Right edge at infinity
4.1.1.13 [292] Right edge at infinity
4.1.1.14 [293] Right edge at infinity
4.1.1.15 [294] Laplace PDE in 2D Cartessian with boundary condition as Dirac function
4.1.1.16 [295] One side homogeneous
4.1.1.17 [296] In right half plane
4.1.1.18 [297] Right edge at infinity
4.1.1.19 [298] Dirichlet problem Upper half
4.1.1.20 [299] Right half-plane
4.1.1.21 [300] First quadrant
4.1.1.22 [301] Neumann problem upper half-plane
4.1.1.23 [302] Dirichlet problem in a rectangle
4.1.1.24 [303] Strip in upper half
4.1.1.25 [304] in Rectangle, right edge at infinity

4.1.1.1 [280] Rectangle, 3 edges zero, buttom edge not

problem number 280

Added Nov 20, 2019

Solve Laplace PDE \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \] inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq H\), with following boundary conditions \begin {align*} u(x,0)&=f(x) \\ u(x,H)&=0 \\ u(0,y)&=0 \\ u(L,y)&=0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde = D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = {u[x,0]==f[x], u[x, H] == 0, u[0, y] == 0,u[L,y]==0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 <= x <= L && 0 <= y <= H}], 60*10]]; 
sol =  sol /. {K[1] -> n};
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}\text {csch}\left (\frac {H n \pi }{L}\right ) \text {FourierSinCoefficient}\left [f(x),x,n,\text {FourierParameters}\to \left \{1,\frac {\pi }{L}\right \}\right ] \sin \left (\frac {n \pi x}{L}\right ) \sinh \left (\frac {n \pi (H-y)}{L}\right )\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
assume(L>0 and H>0); 
bc:=u(x,0)=f(x), u(x, H) = 0, u(0,y) = 0,u(L,y)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,bc],u(x,y)) assuming(0<=x and x<=L and 0<=y and y<=H)),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty } \left ( -2\,{\frac {1}{L}\sin \left ( {\frac {n\pi \,x}{L}} \right ) \int _{0}^{L}\!\sin \left ( {\frac {n\pi \,x}{L}} \right ) f \left ( x \right ) \,{\rm d}x \left ( -{{\rm e}^{-{\frac {n\pi \, \left ( -2\,H+y \right ) }{L}}}}+{{\rm e}^{{\frac {n\pi \,y}{L}}}} \right ) \left ( {{\rm e}^{2\,{\frac {n\pi \,H}{L}}}}-1 \right ) ^{-1}} \right ) \]

Hand solution

Solve

\begin {align*} \nabla ^{2}u & =0\qquad \text {on a rectangle}\qquad R=\left \{ 0<x<a,0<y<b\right \} \\ u\left ( x,0\right ) & =f\left ( x\right ) \\ u\left ( x,H\right ) & =0\\ u\left ( 0,y\right ) & =0\\ u\left ( L,y\right ) & =0 \end {align*}

Solution

Let \(u\left ( x,y\right ) =X\left ( x\right ) Y\left ( x\right ) \). Substituting this into the PDE \(\frac {\partial ^{2}u}{\partial x^{2}}+\frac {\partial ^{2}u}{\partial y^{2}}=0\) and simplifying gives\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}\] Each side depends on different independent variable and they are equal, therefore they must be equal to same constant.\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}=\pm \lambda \] Since the boundary conditions along the \(x\) direction are the homogeneous ones, \(-\lambda \) is selected in the above.\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}=-\lambda \] Two ODE’s are obtained\begin {equation} X^{\prime \prime }+\lambda X=0\tag {1} \end {equation} With the boundary conditions\begin {align*} X\left ( 0\right ) & =0\\ X\left ( L\right ) & =0 \end {align*}

And\begin {equation} Y^{\prime \prime }-\lambda Y=0\tag {2} \end {equation} With the boundary conditions\begin {align*} Y\left ( 0\right ) & =f\left ( x\right ) \\ Y\left ( H\right ) & =0 \end {align*}

Case \(\lambda <0\)

The solution to (1) is

\[ X=A\cosh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) +B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) \] At \(x=0\), the above gives \(0=A\). Hence \(X=B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) \). At \(x=L\) this gives \(X=B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }L\right ) \). But \(\sinh \left ( \sqrt {\left \vert \lambda \right \vert }L\right ) =0\) only at \(0\) and \(\sqrt {\left \vert \lambda \right \vert }L\neq 0\), therefore \(B=0\) and this leads to trivial solution. Hence \(\lambda <0\) is not an eigenvalue.

Case \(\lambda =0\)

\[ X=Ax+B \] Hence at \(x=0\) this gives \(0=B\) and the solution becomes \(X=B\). At \(x=L\), \(B=0\). Hence the trivial solution. \(\lambda =0\) is not an eigenvalue.

Case \(\lambda >0\)

Solution is \[ X=A\cos \left ( \sqrt {\lambda }x\right ) +B\sin \left ( \sqrt {\lambda }x\right ) \] At \(x=0\) this gives \(0=A\) and the solution becomes \(X=B\sin \left ( \sqrt {\lambda }x\right ) \). At \(x=L\)\[ 0=B\sin \left ( \sqrt {\lambda }L\right ) \] For non-trivial solution \(\sin \left ( \sqrt {\lambda }L\right ) =0\) or \(\sqrt {\lambda }L=n\pi \) where \(n=1,2,3,\cdots \), therefore\[ \lambda _{n}=\left ( \frac {n\pi }{L}\right ) ^{2}\qquad n=1,2,3,\cdots \] Eigenfunctions are\begin {equation} X_{n}\left ( x\right ) =B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \qquad n=1,2,3,\cdots \tag {3} \end {equation} For the \(Y\) ODE, the solution is\begin {equation} Y_{n}=C_{n}\cosh \left ( \frac {n\pi }{L}y\right ) +D_{n}\sinh \left ( \frac {n\pi }{L}y\right ) \tag {4} \end {equation} Applying B.C. at \(y=H\) gives\begin {align*} 0 & =C_{n}\cosh \left ( \frac {n\pi }{L}H\right ) +D_{n}\sinh \left ( \frac {n\pi }{L}H\right ) \\ C_{n} & =-D_{n}\frac {\sinh \left ( \frac {n\pi }{L}H\right ) }{\cosh \left ( \frac {n\pi }{L}H\right ) }\\ & =-D_{n}\tanh \left ( \frac {n\pi }{L}H\right ) \end {align*}

Hence (4) becomes \begin {align*} Y_{n} & =-D_{n}\tanh \left ( \frac {n\pi }{L}H\right ) \cosh \left ( \frac {n\pi }{L}y\right ) +D_{n}\sinh \left ( \frac {n\pi }{L}y\right ) \\ & =D_{n}\left ( \sinh \left ( \frac {n\pi }{L}y\right ) -\tanh \left ( \frac {n\pi }{L}H\right ) \cosh \left ( \frac {n\pi }{L}y\right ) \right ) \end {align*}

Now the complete solution is produced\begin {align*} u_{n}\left ( x,y\right ) & =Y_{n}X_{n}\\ & =D_{n}\left ( \sinh \left ( \frac {n\pi }{L}y\right ) -\tanh \left ( \frac {n\pi }{L}H\right ) \cosh \left ( \frac {n\pi }{L}y\right ) \right ) B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \end {align*}

Let \(D_{n}B_{n}=B_{n}\) since a constant. (no need to make up a new symbol).\[ u_{n}\left ( x,y\right ) =B_{n}\left ( \sinh \left ( \frac {n\pi }{L}y\right ) -\tanh \left ( \frac {n\pi }{L}H\right ) \cosh \left ( \frac {n\pi }{L}y\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \] Sum of eigenfunctions is the solution, hence\begin {equation} u\left ( x,y\right ) =\sum _{n=1}^{\infty }B_{n}\left ( \sinh \left ( \frac {n\pi }{L}y\right ) -\tanh \left ( \frac {n\pi }{L}H\right ) \cosh \left ( \frac {n\pi }{L}y\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \tag {5} \end {equation} The nonhomogeneous boundary condition is now resolved.  At \(y=0\)\[ u\left ( x,0\right ) =f\left ( x\right ) \] Therefore (5) becomes\[ f\left ( x\right ) =\sum _{n=1}^{\infty }-B_{n}\tanh \left ( \frac {n\pi }{a}b\right ) \sin \left ( \frac {n\pi }{a}x\right ) \] Multiplying both sides by \(\sin \left ( \frac {m\pi }{L}x\right ) \) and integrating gives\begin {align*} \int _{0}^{L}f\left ( x\right ) \sin \left ( \frac {m\pi }{L}x\right ) dx & =-\int _{0}^{a}\sin \left ( \frac {m\pi }{L}x\right ) \sum _{n=1}^{\infty }B_{n}\tanh \left ( \frac {n\pi }{L}H\right ) \sin \left ( \frac {n\pi }{L}x\right ) dx\\ & =-\sum _{n=1}^{\infty }B_{n}\tanh \left ( \frac {n\pi }{L}b\right ) \int _{0}^{L}\sin \left ( \frac {n\pi }{L}x\right ) \sin \left ( \frac {m\pi }{L}x\right ) dx\\ & =-B_{n}\tanh \left ( \frac {m\pi }{L}H\right ) \left ( \frac {L}{2}\right ) \end {align*}

Hence\[ B_{n}=-\frac {2}{L}\frac {\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac {n\pi }{L}x\right ) dx}{\tanh \left ( \frac {n\pi }{L}H\right ) }\] The solution (5) becomes\begin {align*} u\left ( x,y\right ) & =-\frac {2}{L}\sum _{n=1}^{\infty }\frac {\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac {n\pi }{L}x\right ) dx}{\tanh \left ( \frac {n\pi }{L}H\right ) }\left ( \sinh \left ( \frac {n\pi }{L}y\right ) -\tanh \left ( \frac {n\pi }{L}H\right ) \cosh \left ( \frac {n\pi }{L}y\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \\ & =-\frac {2}{L}\sum _{n=1}^{\infty }\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac {n\pi }{L}x\right ) dx\left ( \frac {\sinh \left ( \frac {n\pi }{L}y\right ) }{\tanh \left ( \frac {n\pi }{L}H\right ) }-\cosh \left ( \frac {n\pi }{L}y\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \end {align*}

____________________________________________________________________________________

4.1.1.2 [281] Rectangle, 3 edges zero, right edge not

problem number 281

Added January 12, 2020

Solve Laplace PDE inside square \(\nabla ^2 u(x,y) = 0\) with \(0 \leq x \leq 1, 0 \leq y \leq 1\), with following boundary conditions \begin {align*} u(x,0)&=0 \\ u(x,1)&=0 \\ u(0,y)&=0 \\ u(1,y)&=y(1-y) \end {align*}

Mathematica

ClearAll["Global`*"]; 
a=1;b=1; 
pde = Laplacian[u[x,y],{x,y}] == 0; 
bc  = {u[x,0]==0, u[x, b] == 0, u[0, y] == 0,u[a,y]==y*(1-y)}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}], 60*10]]; 
sol =  sol /. {K[1] -> n};
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}-\frac {4 \left (-1+(-1)^n\right ) \text {csch}(n \pi ) \sin (n \pi y) \sinh (n \pi x)}{n^3 \pi ^3}\right \}\right \}\]

Maple

restart; 
a:=1; 
b:=1; 
pde := VectorCalculus:-Laplacian(u(x,y),'cartesian'[x,y])=0; 
bc:=u(x,0)=0, u(x, b) = 0, u(0,y) = 0,u(a,y)=y*(1-y); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,bc],u(x,y)) ),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }-4\,{\frac { \left ( -1+ \left ( -1 \right ) ^{n} \right ) {{\rm e}^{n\pi }}\sin \left ( n\pi \,y \right ) \left ( {{\rm e}^{n\pi \,x}}-{{\rm e}^{-n\pi \,x}} \right ) }{{n}^{3}{\pi }^{3} \left ( {{\rm e}^{2\,n\pi }}-1 \right ) }}\]

Hand solution

\(a\) is used for the length of the \(x\) dimension and \(b\) for the length of the \(y\) dimension.

Solution

Let \(u\left ( x,y\right ) =X\left ( x\right ) Y\left ( x\right ) \). Substituting this into the PDE gives\[ X^{\prime \prime }Y+Y^{\prime \prime }X=0 \] Dividing throughout by \(XY\neq 0\,\) and simplifying gives\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}=\lambda \] This gives the eigenvalue ODE\begin {align} Y^{\prime \prime }+\lambda Y & =0\tag {1}\\ Y\left ( 0\right ) & =0\nonumber \\ Y\left ( b\right ) & =0\nonumber \end {align}

The solution to (1) gives the eigenvalues \(\lambda _{n}=\left ( \frac {n\pi }{L}\right ) ^{2}\) for \(n=1,2,3\cdots \) and since \(L=b\), this becomes \[ \lambda _{n}=\left ( \frac {n\pi }{b}\right ) ^{2}\qquad n=1,2,\cdots \] And the corresponding eigenfunction\begin {align*} Y_{n}\left ( y\right ) & =c_{n}\sin \left ( \sqrt {\lambda _{n}}y\right ) \\ & =c_{n}\sin \left ( \frac {n\pi }{b}y\right ) \end {align*}

Therefore the corresponding nonhomogeneous \(X\left ( x\right ) \) ODE\begin {align} X_{n}^{\prime \prime }-\lambda _{n}X_{n} & =0\tag {2}\\ X_{n}\left ( 0\right ) & =0\nonumber \\ X_{n}\left ( a\right ) & =y-y^{2}\nonumber \end {align}

The solution to (2), since \(\lambda _{n}\) is positive is \begin {align*} X_{n}\left ( x\right ) & =A_{n}\cosh \left ( \sqrt {\lambda _{n}}x\right ) +B_{n}\sinh \left ( \sqrt {\lambda _{n}}x\right ) \\ & =A_{n}\cosh \left ( \frac {n\pi }{b}x\right ) +B_{n}\sinh \left ( \frac {n\pi }{b}x\right ) \end {align*}

Boundary conditions \(X\left ( 0\right ) =0\) gives\[ 0=A_{n}\] The solution (3) now simplifies to\[ X_{n}\left ( x\right ) =B_{n}\sinh \left ( \frac {n\pi }{b}x\right ) \] Hence the fundamental solution is\begin {align*} u_{n}\left ( x,y\right ) & =X_{n}Y_{n}\\ & =c_{n}\sinh \left ( \frac {n\pi }{b}x\right ) \sin \left ( \frac {n\pi }{b}y\right ) \end {align*}

Where the constants \(B_{n}\) is merged with \(c_{n}\). The solution is\begin {equation} u\left ( x,y\right ) =\sum _{n=1}^{\infty }c_{n}\sinh \left ( \frac {n\pi }{b}x\right ) \sin \left ( \frac {n\pi }{b}y\right ) \tag {3} \end {equation} \(c_{n}\) is now found by applying the boundary condition at \(x=a\). The above becomes\[ y-y^{2}=\sum _{n=1}^{\infty }c_{n}\sinh \left ( \frac {n\pi }{b}a\right ) \sin \left ( \frac {n\pi }{b}y\right ) \] Multiplying both sides by \(\sin \left ( \frac {m\pi }{b}y\right ) \) and integrating gives\[ \int _{0}^{b}\left ( y-y^{2}\right ) \sin \left ( \frac {m\pi }{b}y\right ) dy=\sum _{n=1}^{\infty }c_{n}\sinh \left ( \frac {n\pi }{b}a\right ) \left ( \int _{0}^{b}\sin \left ( \frac {m\pi }{b}y\right ) \sin \left ( \frac {n\pi }{b}y\right ) dy\right ) \] By orthogonality the above reduces to \begin {align*} \int _{0}^{b}\left ( y-y^{2}\right ) \sin \left ( \frac {m\pi }{b}y\right ) dy & =c_{n}\sinh \left ( \frac {m\pi }{b}a\right ) \int _{0}^{b}\sin ^{2}\left ( \frac {m\pi }{b}y\right ) dy\\ & =\frac {b}{2}c_{m}\sinh \left ( \frac {m\pi }{b}a\right ) \end {align*}

Therefore\[ c_{n}=\frac {2}{b}\frac {1}{\sinh \left ( \frac {m\pi }{b}a\right ) }\int _{0}^{b}\left ( y-y^{2}\right ) \sin \left ( \frac {n\pi }{b}y\right ) dy \] Now replacing \(a=1,b=1\), the above becomes\begin {align*} c_{n} & =\frac {2}{\sinh \left ( n\pi \right ) }\int _{0}^{1}\left ( y-y^{2}\right ) \sin \left ( n\pi y\right ) dy\\ & =\frac {2}{\sinh \left ( n\pi \right ) }\left ( \frac {-2\left ( -1+\left ( -1\right ) ^{n}\right ) }{n^{3}\pi ^{3}}\right ) \\ & =\frac {-4}{\sinh \left ( n\pi \right ) }\frac {\left ( -1+\left ( -1\right ) ^{n}\right ) }{n^{3}\pi ^{3}} \end {align*}

Hence the solution (3) becomes\[ u\left ( x,y\right ) =\frac {-4}{\pi ^{3}}\sum _{n=1}^{\infty }\frac {\left ( -1+\left ( -1\right ) ^{n}\right ) }{n^{3}}\frac {\sinh \left ( n\pi x\right ) }{\sinh \left ( n\pi \right ) }\sin \left ( n\pi y\right ) \] This is a 3D plot of the solution.

pict

This is a contour plot

pict

____________________________________________________________________________________

4.1.1.3 [282] Rectangle, 3 edges zero, buttom edge has impulse

problem number 282

Added Jan. 8, 2020.

This is Problem 6.3.10 from Introduction to Partial Differential Equations by Peter Olver ISBN 9783319020983.

Solve

\begin {align*} \nabla ^{2}u & =0\qquad \text {on a rectangle}\qquad R=\left \{ 0<x<a,0<y<b\right \} \\ u\left ( x,0\right ) & =f\left ( x\right ) \\ u\left ( x,b\right ) & =0\\ u\left ( 0,y\right ) & =0\\ u\left ( a,y\right ) & =0 \end {align*}

When the boundary data \(f\left ( x\right ) =\delta \left ( x-\xi \right ) \) is a delta function at a point \(0<\xi <a\).

Mathematica

ClearAll["Global`*"]; 
pde = Laplacian[u[x, y], {x, y}] == 0; 
f[x_] := DiracDelta[x - zeta]; 
bc = {u[x, 0] == f[x], u[x, b] == 0, u[0, y] == 0, u[a, y] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 <= x <= a && 0 <= y <= b && 0 < zeta < a}], 60*10]]; 
sol =  sol /. {K[1] -> n};
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}\frac {2 \text {csch}\left (\frac {b n \pi }{a}\right ) \sin \left (\frac {n \pi x}{a}\right ) \sin \left (\frac {n \pi \zeta }{a}\right ) \sinh \left (\frac {n \pi (b-y)}{a}\right )}{a}\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
f:=x->Dirac(x-zeta); 
bc:=u(x,0)=f(x), u(x, b) = 0, u(0,y) = 0,u(a,y)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,bc],u(x,y)) assuming(0<=x and x<=a and 0<=y and y<=b and 0<zeta and zeta<a)),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }2\,{\frac {1}{a}\sin \left ( {\frac {n\pi \,x}{a}} \right ) \sin \left ( {\frac {n\pi \,\zeta }{a}} \right ) \left ( {{\rm e}^{{\frac {n\pi \, \left ( 2\,b-y \right ) }{a}}}}-{{\rm e}^{{\frac {n\pi \,y}{a}}}} \right ) \left ( {{\rm e}^{2\,{\frac {n\pi \,b}{a}}}}-1 \right ) ^{-1}}\]

Hand solution

Let \(u\left ( x,y\right ) =X\left ( x\right ) Y\left ( x\right ) \). Substituting this into the PDE \(\frac {\partial ^{2}u}{\partial x^{2}}+\frac {\partial ^{2}u}{\partial y^{2}}=0\) and simplifying gives\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}\] Each side depends on different independent variable and they are equal, therefore they must be equal to same constant.\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}=\pm \lambda \] Since the boundary conditions along the \(x\) direction are the homogeneous ones, \(-\lambda \) is selected in the above.

\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}=-\lambda \]

Two ODE’s are obtained\begin {equation} X^{\prime \prime }+\lambda X=0 \tag {1} \end {equation} With the boundary conditions\begin {align*} X\left ( 0\right ) & =0\\ X\left ( a\right ) & =0 \end {align*}

And\begin {equation} Y^{\prime \prime }-\lambda Y=0 \tag {2} \end {equation} With the boundary conditions\begin {align*} Y\left ( 0\right ) & =f\left ( x\right ) \\ Y\left ( b\right ) & =0 \end {align*}

In all these cases \(\lambda \) will turn out to be positive. This is shown below.

Case \(\lambda <0\)

The solution to (1) is

\[ X=A\cosh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) +B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) \] At \(x=0\), the above gives \(0=A\). Hence \(X=B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) \). At \(x=a\) this gives \(X=B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }a\right ) \). But \(\sinh \left ( \sqrt {\left \vert \lambda \right \vert }a\right ) =0\) only at \(0\) and \(\sqrt {\left \vert \lambda \right \vert }a\neq 0\), therefore \(B=0\) and this leads to trivial solution. Hence \(\lambda <0\) is not an eigenvalue.

Case \(\lambda =0\)

\[ X=Ax+B \] Hence at \(x=0\) this gives \(0=B\) and the solution becomes \(X=B\). At \(x=a\), \(B=0\). Hence the trivial solution. \(\lambda =0\) is not an eigenvalue.

Case \(\lambda >0\)

Solution is \[ X=A\cos \left ( \sqrt {\lambda }x\right ) +B\sin \left ( \sqrt {\lambda }x\right ) \] At \(x=0\) this gives \(0=A\) and the solution becomes \(X=B\sin \left ( \sqrt {\lambda }x\right ) \). At \(x=a\) \[ 0=B\sin \left ( \sqrt {\lambda }a\right ) \] For non-trivial solution \(\sin \left ( \sqrt {\lambda }a\right ) =0\) or \(\sqrt {\lambda }a=n\pi \) where \(n=1,2,3,\cdots \), therefore\[ \lambda _{n}=\left ( \frac {n\pi }{a}\right ) ^{2}\qquad n=1,2,3,\cdots \] Eigenfunctions are\begin {equation} X_{n}\left ( x\right ) =B_{n}\sin \left ( \frac {n\pi }{a}x\right ) \qquad n=1,2,3,\cdots \tag {3} \end {equation} For the \(Y\) ODE, the solution is\begin {equation} Y_{n}=C_{n}\cosh \left ( \frac {n\pi }{a}y\right ) +D_{n}\sinh \left ( \frac {n\pi }{a}y\right ) \tag {4} \end {equation} Applying B.C. at \(y=b\) gives\begin {align*} 0 & =C_{n}\cosh \left ( \frac {n\pi }{a}b\right ) +D_{n}\sinh \left ( \frac {n\pi }{a}b\right ) \\ C_{n} & =-D_{n}\frac {\sinh \left ( \frac {n\pi }{a}b\right ) }{\cosh \left ( \frac {n\pi }{a}b\right ) }\\ & =-D_{n}\tanh \left ( \frac {n\pi }{a}b\right ) \end {align*}

Hence (4) becomes \begin {align*} Y_{n} & =-D_{n}\tanh \left ( \frac {n\pi }{a}b\right ) \cosh \left ( \frac {n\pi }{a}y\right ) +D_{n}\sinh \left ( \frac {n\pi }{a}y\right ) \\ & =D_{n}\left ( \sinh \left ( \frac {n\pi }{a}y\right ) -\tanh \left ( \frac {n\pi }{a}b\right ) \cosh \left ( \frac {n\pi }{a}y\right ) \right ) \end {align*}

Now the complete solution is produced\begin {align*} u_{n}\left ( x,y\right ) & =Y_{n}X_{n}\\ & =D_{n}\left ( \sinh \left ( \frac {n\pi }{a}y\right ) -\tanh \left ( \frac {n\pi }{a}b\right ) \cosh \left ( \frac {n\pi }{a}y\right ) \right ) B_{n}\sin \left ( \frac {n\pi }{a}x\right ) \end {align*}

Let \(D_{n}B_{n}=B_{n}\) since a constant. (no need to make up a new symbol).\[ u_{n}\left ( x,y\right ) =B_{n}\left ( \sinh \left ( \frac {n\pi }{a}y\right ) -\tanh \left ( \frac {n\pi }{a}b\right ) \cosh \left ( \frac {n\pi }{a}y\right ) \right ) \sin \left ( \frac {n\pi }{a}x\right ) \] Sum of eigenfunctions is the solution, hence\begin {equation} u\left ( x,y\right ) =\sum _{n=1}^{\infty }B_{n}\left ( \sinh \left ( \frac {n\pi }{a}y\right ) -\tanh \left ( \frac {n\pi }{a}b\right ) \cosh \left ( \frac {n\pi }{a}y\right ) \right ) \sin \left ( \frac {n\pi }{a}x\right ) \tag {5} \end {equation} The nonhomogeneous boundary condition is now resolved.  At \(y=0\)\[ u\left ( x,0\right ) =f\left ( x\right ) =\delta \left ( x-\xi \right ) \] Therefore (5) becomes\[ \delta \left ( x-\xi \right ) =\sum _{n=1}^{\infty }-B_{n}\tanh \left ( \frac {n\pi }{a}b\right ) \sin \left ( \frac {n\pi }{a}x\right ) \] Multiplying both sides by \(\sin \left ( \frac {m\pi }{a}x\right ) \) and integrating gives\begin {align*} \int _{0}^{a}\delta \left ( x-\xi \right ) \sin \left ( \frac {m\pi }{a}x\right ) dx & =-\int _{0}^{a}\sin \left ( \frac {m\pi }{a}x\right ) \sum _{n=1}^{\infty }B_{n}\tanh \left ( \frac {n\pi }{a}b\right ) \sin \left ( \frac {n\pi }{a}x\right ) dx\\ & =-\sum _{n=1}^{\infty }B_{n}\tanh \left ( \frac {n\pi }{a}b\right ) \int _{0}^{a}\sin \left ( \frac {n\pi }{a}x\right ) \sin \left ( \frac {m\pi }{a}x\right ) dx\\ & =-B_{n}\tanh \left ( \frac {m\pi }{a}b\right ) \left ( \frac {a}{2}\right ) \end {align*}

Hence\[ B_{n}=-\frac {2}{a}\frac {\int _{0}^{a}\delta \left ( x-\xi \right ) \sin \left ( \frac {n\pi }{a}x\right ) dx}{\tanh \left ( \frac {n\pi }{a}b\right ) }\] But \(\int _{0}^{a}\delta \left ( x-\xi \right ) \sin \left ( \frac {m\pi }{L}x\right ) dx=\sin \left ( \frac {m\pi }{L}\xi \right ) \) by the property delta function. Therefore\[ B_{n}=-\frac {2}{a}\frac {\sin \left ( \frac {n\pi }{a}\xi \right ) }{\tanh \left ( \frac {n\pi }{a}b\right ) }\] This completes the solution. (4) becomes\begin {align*} u\left ( x,y\right ) & =-\frac {2}{a}\sum _{n=1}^{\infty }\frac {\sin \left ( \frac {n\pi }{a}\xi \right ) }{\tanh \left ( \frac {n\pi }{a}b\right ) }\left ( \sinh \left ( \frac {n\pi }{a}y\right ) -\tanh \left ( \frac {n\pi }{a}b\right ) \cosh \left ( \frac {n\pi }{a}y\right ) \right ) \sin \left ( \frac {n\pi }{a}x\right ) \\ & =-\frac {2}{a}\sum _{n=1}^{\infty }\sin \left ( \frac {n\pi }{a}\xi \right ) \sin \left ( \frac {n\pi }{a}x\right ) \left ( \frac {\sinh \left ( \frac {n\pi }{a}y\right ) }{\tanh \left ( \frac {n\pi }{a}b\right ) }-\cosh \left ( \frac {n\pi }{a}y\right ) \right ) \end {align*}

Looking at the solution above, it is composed of functions that are all differentiable. Hence the solution is infinitely differentiable inside the rectangle.

Here is a plot of the above solution using \(a=\pi ,b=\frac {1}{2},\xi =1\).

____________________________________________________________________________________

4.1.1.4 [283] Haberman 2.5.1 (a)

problem number 283

This is problem 2.5.1 part (a) from Richard Haberman applied partial differential equations, 5th edition

Solve Laplace equation \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \] inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq H\), with following boundary conditions \begin {align*} \frac {\partial u}{\partial x}(0,y) &= 0 \\ \frac {\partial u}{\partial x}(L,y) &= 0 \\ u(x,0)&=0 \\ u(x,H)&=f(x) \\ \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde = D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = {Derivative[1, 0][u][0, y] == 0, Derivative[1, 0][u][L, y] == 0, u[x, 0] == 0, u[x, H] == f[x]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 <= x <= L && 0 <= y <= H}], 60*10]]; 
sol =  sol /. {K[1] -> n};
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}\frac {2 \cos \left (\frac {n \pi x}{L}\right ) \text {csch}\left (\frac {H n \pi }{L}\right ) \left (\int _0^L \cos \left (\frac {n \pi x}{L}\right ) f(x) \, dx\right ) \sinh \left (\frac {n \pi y}{L}\right )}{L}+\frac {y \int _0^L f(x) \, dx}{H L}\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
assume(L>0 and H>0); 
bc:=D[1](u)(0,y)=0,D[1](u)(L,y)=0,u(x,0)=0,u(x,H)=f(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,bc],u(x,y)) assuming(0<=x and x<=L and 0<=y and y<=H)),output='realtime')); 
#these simplifications below to convert answer to one that match standard; 
sol:=convert(sol,trigh); 
sol:=simplify(expand(sol));
 

\[u \left ( x,y \right ) ={\frac {1}{H\,L} \left ( 4\,\sum _{n=1}^{\infty } \left ( 1/2\,{\sinh \left ( {\frac {n\pi \,y}{L}} \right ) \int _{0}^{L}\!f \left ( x \right ) \cos \left ( {\frac {n\pi \,x}{L}} \right ) \,{\rm d}x\cos \left ( {\frac {n\pi \,x}{L}} \right ) \left ( \sinh \left ( {\frac {n\pi \,H}{L}} \right ) \right ) ^{-1}} \right ) H+\int _{0}^{L}\!f \left ( x \right ) \,{\rm d}xy \right ) }\]

____________________________________________________________________________________

4.1.1.5 [284] Haberman 2.5.1 (b)

problem number 284

This is problem 2.5.1 part (b) from Richard Haberman applied partial differential equations, 5th edition

Solve Laplace equation \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \] inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq H\), with following boundary conditions \begin {align*} \frac {\partial u}{\partial x}(0,y) &= g(y) \\ \frac {\partial u}{\partial x}(L,y) &= 0 \\ u(x,0)&=0 \\ u(x,H)&=0 \\ \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = {Derivative[1, 0][u][0, y] == g[y], Derivative[1, 0][u][L, y] == 0, u[x, 0] == 0, u[x, H] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 <= x <= L && 0 <= y <= H}], 60*10]]; 
sol =  sol /. {K[1] -> n};
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}-\frac {2 \cosh \left (\frac {n \pi (L-x)}{H}\right ) \text {csch}\left (\frac {L n \pi }{H}\right ) \left (\int _0^H g(y) \sin \left (\frac {n \pi y}{H}\right ) \, dy\right ) \sin \left (\frac {n \pi y}{H}\right )}{n \pi }\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
assume(L>0 and H>0): 
bc:=D[1](u)(0,y)=g(y),D[1](u)(L,y)=0,u(x,0)=0,u(x,H)=0: 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,bc],u(x,y)) assuming(0<=x and x<=L and 0<=y and y<=H)),output='realtime')); 
sol:=convert(sol,trigh);
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty } \left ( -2\,{\frac {1}{n\pi }\sin \left ( {\frac {n\pi \,y}{H}} \right ) \int _{0}^{H}\!\sin \left ( {\frac {n\pi \,y}{H}} \right ) g \left ( y \right ) \,{\rm d}y \left ( \cosh \left ( {\frac {n\pi \, \left ( -2\,L+x \right ) }{H}} \right ) -\sinh \left ( {\frac {n\pi \, \left ( -2\,L+x \right ) }{H}} \right ) +\cosh \left ( {\frac {n\pi \,x}{H}} \right ) +\sinh \left ( {\frac {n\pi \,x}{H}} \right ) \right ) \left ( \cosh \left ( 2\,{\frac {n\pi \,L}{H}} \right ) +\sinh \left ( 2\,{\frac {n\pi \,L}{H}} \right ) -1 \right ) ^{-1}} \right ) \]

____________________________________________________________________________________

4.1.1.6 [285] Haberman 2.5.1 (c)

problem number 285

This is problem 2.5.1 part (c) from Richard Haberman applied partial differential equations, 5th edition

Solve Laplace equation \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \] inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq H\), with following boundary conditions \begin {align*} \frac {\partial u}{\partial x}(0,y) &= 0 \\ u(L,y) &= g(y) \\ u(x,0)&=0 \\ u(x,H)&=0 \\ \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = {Derivative[1, 0][u][0, y] == 0, u[L, y] == g[y], u[x, 0] == 0, u[x, H] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 <= x <= L && 0 <= y <= H}], 60*10]];
 

\[\left \{\left \{u(x,y)\to \underset {K[1]=1}{\overset {\infty }{\sum }}\sqrt {2} \sqrt {\frac {1}{H}} \cosh \left (\frac {\pi x K[1]}{H}\right ) \left (\int _0^H \frac {\sqrt {2} g(y) \sin \left (\frac {\pi y K[1]}{H}\right )}{\sqrt {H}} \, dy\right ) \text {sech}\left (\frac {L \pi K[1]}{H}\right ) \sin \left (\frac {\pi y K[1]}{H}\right )\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
assume(L>0 and H>0); 
bc:=D[1](u)(0,y)=0,u(L,y)=g(y),u(x,0)=0,u(x,H)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,bc],u(x,y)) assuming(0<=x and x<=L and 0<=y and y<=H)),output='realtime')); 
sol:=convert(sol,trigh);
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty } \left ( 4\,{\frac {1}{H}\sin \left ( {\frac {n\pi \,y}{H}} \right ) \int _{0}^{H}\!\sin \left ( {\frac {n\pi \,y}{H}} \right ) g \left ( y \right ) \,{\rm d}y \left ( \cosh \left ( {\frac {n\pi \,L}{H}} \right ) +\sinh \left ( {\frac {n\pi \,L}{H}} \right ) \right ) \cosh \left ( {\frac {n\pi \,x}{H}} \right ) \left ( \cosh \left ( 2\,{\frac {n\pi \,L}{H}} \right ) +\sinh \left ( 2\,{\frac {n\pi \,L}{H}} \right ) +1 \right ) ^{-1}} \right ) \]

____________________________________________________________________________________

4.1.1.7 [286] Haberman 2.5.1 (d)

problem number 286

This is problem 2.5.1 part (d) from Richard Haberman applied partial differential equations, 5th edition

Solve Laplace equation \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \]

inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq H\), with following boundary conditions

\begin {align*} u(0,y) &= g(y) \\ u(L,y) &= 0 \\ \frac {\partial u}{\partial y}u(x,0)&=0 \\ u(x,H)&=0 \\ \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = {u[0, y] == g[y], u[L, y] == 0, Derivative[0, 1][u][x, 0] == 0, u[x, H] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 <= x <= L && 0 <= y <= H}], 60*10]]; 
sol = sol/.K[1]->n;
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}\frac {\sqrt {2} \cos \left (\frac {(2 n-1) \pi y}{2 H}\right ) \text {csch}\left (\frac {L (2 n-1) \pi }{2 H}\right ) \left (\int _0^H \frac {\sqrt {2} \cos \left (\frac {(2 n-1) \pi y}{2 H}\right ) g(y)}{\sqrt {H}} \, dy\right ) \sinh \left (\frac {(2 n-1) \pi (L-x)}{2 H}\right )}{\sqrt {H}}\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
assume(L>0 and H>0); 
bc  := u(0,y)=g(y),u(L,y)=0,D[2](u)(x,0)=0,u(x,H)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y)) assuming(0<=x and x<=L and 0<=y and y<=H)),output='realtime')); 
sol:=convert(sol,trigh);
 

\[u \left ( x,y \right ) =\sum _{n=0}^{\infty } \left ( 2\,{\frac {1}{H}\sin \left ( 1/2\,{\frac {\pi \, \left ( 2\,ny+H+y \right ) }{H}} \right ) \int _{0}^{H}\!\sin \left ( 1/2\,{\frac {\pi \, \left ( 2\,ny+H+y \right ) }{H}} \right ) g \left ( y \right ) \,{\rm d}y \left ( \cosh \left ( {\frac {\pi \, \left ( x-2\,L \right ) \left ( 1/2+n \right ) }{H}} \right ) +\sinh \left ( {\frac {\pi \, \left ( x-2\,L \right ) \left ( 1/2+n \right ) }{H}} \right ) -\cosh \left ( 1/2\,{\frac { \left ( 1+2\,n \right ) \pi \,x}{H}} \right ) +\sinh \left ( 1/2\,{\frac { \left ( 1+2\,n \right ) \pi \,x}{H}} \right ) \right ) \left ( \cosh \left ( {\frac { \left ( 1+2\,n \right ) \pi \,L}{H}} \right ) -\sinh \left ( {\frac { \left ( 1+2\,n \right ) \pi \,L}{H}} \right ) -1 \right ) ^{-1}} \right ) \]

____________________________________________________________________________________

4.1.1.8 [287] Haberman 2.5.1 (e)

problem number 287

This is problem 2.5.1 part (e) from Richard Haberman applied partial differential equations, 5th edition

Solve Laplace equation \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \] inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq H\), with following boundary conditions \begin {align*} u(0,y) &= 0 \\ u(L,y) &= 0 \\ u(x,0) - \frac {\partial u}{\partial y}u(x,0)&=0 \\ u(x,H)&= f(x) \\ \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = {u[0, y] == 0, u[L, y] == 0, u[x, 0] - Derivative[0, 1][u][x, 0] == 0, u[x, H] == f[x]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 <= x <= L && 0 <= y <= H}], 60*10]]; 
sol = sol/.K[1]->n;
 

\[\left \{\left \{u(x,y)\to \underset {K[1]=1}{\overset {\infty }{\sum }}\frac {\sqrt {2} \sqrt {\frac {1}{L}} \left (\int _0^L \frac {\sqrt {2} f(x) \sin \left (\frac {\pi x K[1]}{L}\right )}{\sqrt {L}} \, dx\right ) \sin \left (\frac {\pi x K[1]}{L}\right ) \left (\pi \cosh \left (\frac {\pi y K[1]}{L}\right ) K[1]+L \sinh \left (\frac {\pi y K[1]}{L}\right )\right )}{\pi \cosh \left (\frac {H \pi K[1]}{L}\right ) K[1]+L \sinh \left (\frac {H \pi K[1]}{L}\right )}\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
assume(L>0 and H>0); 
bc  := u(0,y)=0,u(L,y)=0,u(x,0)-D[2](u)(x,0)=0,u(x,H)=f(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y)) assuming(0<=x and x<=L and 0<=y and y<=H)),output='realtime')); 
sol:=convert(sol,trigh);
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty } \left ( 4\,{\frac {1}{L}\int _{0}^{L}\!\sin \left ( {\frac {n\pi \,x}{L}} \right ) f \left ( x \right ) \,{\rm d}x\sin \left ( {\frac {n\pi \,x}{L}} \right ) \left ( \pi \,\cosh \left ( {\frac {n\pi \,y}{L}} \right ) n+L\,\sinh \left ( {\frac {n\pi \,y}{L}} \right ) \right ) \left ( \cosh \left ( {\frac {n\pi \,H}{L}} \right ) +\sinh \left ( {\frac {n\pi \,H}{L}} \right ) \right ) \left ( \left ( \pi \,n+L \right ) \cosh \left ( 2\,{\frac {n\pi \,H}{L}} \right ) + \left ( \pi \,n+L \right ) \sinh \left ( 2\,{\frac {n\pi \,H}{L}} \right ) +\pi \,n-L \right ) ^{-1}} \right ) \]

Hand solution

Let \(u\left ( x,y\right ) =X\left ( x\right ) Y\left ( x\right ) \). Substituting this into the PDE \(\frac {\partial ^{2}u}{\partial x^{2}}+\frac {\partial ^{2}u}{\partial y^{2}}=0\) and simplifying gives\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}\] Each side depends on different independent variable and they are equal, therefore they must be equal to same constant.\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}=\pm \lambda \] Since the boundary conditions along the \(x\) direction are the homogeneous ones, \(-\lambda \) is selected in the above. Two ODE’s (1,2) are obtained as follows\begin {equation} X^{\prime \prime }+\lambda X=0 \tag {1} \end {equation} With the boundary conditions\begin {align*} X\left ( 0\right ) & =0\\ X\left ( L\right ) & =0 \end {align*}

And\begin {equation} Y^{\prime \prime }-\lambda Y=0 \tag {2} \end {equation} With the boundary conditions\begin {align*} Y\left ( 0\right ) & =Y^{\prime }\left ( 0\right ) \\ Y\left ( H\right ) & =f\left ( x\right ) \end {align*}

In all these cases \(\lambda \) will turn out to be positive. This is shown for this problem only and not be repeated again.

Case \(\lambda <0\)

The solution to (1) us

\[ X=A\cosh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) +B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) \] At \(x=0\), the above gives \(0=A\). Hence \(X=B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }x\right ) \). At \(x=L\) this gives \(X=B\sinh \left ( \sqrt {\left \vert \lambda \right \vert }L\right ) \). But \(\sinh \left ( \sqrt {\left \vert \lambda \right \vert }L\right ) =0\) only at \(0\) and \(\sqrt {\left \vert \lambda \right \vert }L\neq 0\), therefore \(B=0\) and this leads to trivial solution. Hence \(\lambda <0\) is not an eigenvalue.

Case \(\lambda =0\)

\[ X=Ax+B \] Hence at \(x=0\) this gives \(0=B\) and the solution becomes \(X=B\). At \(x=L\), \(B=0\). Hence the trivial solution. \(\lambda =0\) is not an eigenvalue.

Case \(\lambda >0\)

Solution is \[ X=A\cos \left ( \sqrt {\lambda }x\right ) +B\sin \left ( \sqrt {\lambda }x\right ) \] At \(x=0\) this gives \(0=A\) and the solution becomes \(X=B\sin \left ( \sqrt {\lambda }x\right ) \). At \(x=L\) \[ 0=B\sin \left ( \sqrt {\lambda }L\right ) \] For non-trivial solution \(\sin \left ( \sqrt {\lambda }L\right ) =0\) or \(\sqrt {\lambda }L=n\pi \) where \(n=1,2,3,\cdots \), therefore\[ \lambda _{n}=\left ( \frac {n\pi }{L}\right ) ^{2}\qquad n=1,2,3,\cdots \] Eigenfunctions are\begin {equation} X_{n}\left ( x\right ) =B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \qquad n=1,2,3,\cdots \tag {3} \end {equation} For the \(Y\) ODE, the solution is\begin {align*} Y_{n} & =C_{n}\cosh \left ( \frac {n\pi }{L}y\right ) +D_{n}\sinh \left ( \frac {n\pi }{L}y\right ) \\ Y_{n}^{\prime } & =C_{n}\frac {n\pi }{L}\sinh \left ( \frac {n\pi }{L}y\right ) +D_{n}\frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}y\right ) \end {align*}

Applying B.C. at \(y=0\) gives\begin {align*} Y\left ( 0\right ) & =Y^{\prime }\left ( 0\right ) \\ C_{n}\cosh \left ( 0\right ) & =D_{n}\frac {n\pi }{L}\cosh \left ( 0\right ) \\ C_{n} & =D_{n}\frac {n\pi }{L} \end {align*}

The eigenfunctions \(Y_{n}\) are\begin {align*} Y_{n} & =D_{n}\frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}y\right ) +D_{n}\sinh \left ( \frac {n\pi }{L}y\right ) \\ & =D_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}y\right ) +\sinh \left ( \frac {n\pi }{L}y\right ) \right ) \end {align*}

Now the complete solution is produced\begin {align*} u_{n}\left ( x,y\right ) & =Y_{n}X_{n}\\ & =D_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}y\right ) +\sinh \left ( \frac {n\pi }{L}y\right ) \right ) B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \end {align*}

Let \(D_{n}B_{n}=B_{n}\) since a constant. (no need to make up a new symbol).\[ u_{n}\left ( x,y\right ) =B_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}y\right ) +\sinh \left ( \frac {n\pi }{L}y\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \] Sum of eigenfunctions is the solution, hence\[ u\left ( x,y\right ) =\sum _{n=1}^{\infty }B_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}y\right ) +\sinh \left ( \frac {n\pi }{L}y\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \] The nonhomogeneous boundary condition is now resolved.  At \(y=H\)\[ u\left ( x,H\right ) =f\left ( x\right ) \] Therefore\[ f\left ( x\right ) =\sum _{n=1}^{\infty }B_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}H\right ) +\sinh \left ( \frac {n\pi }{L}H\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \] Multiplying both sides by \(\sin \left ( \frac {m\pi }{L}x\right ) \) and integrating gives\begin {align*} \int _{0}^{L}f\left ( x\right ) \sin \left ( \frac {m\pi }{L}x\right ) dx & =\int _{0}^{L}\sin \left ( \frac {m\pi }{L}x\right ) \sum _{n=1}^{\infty }B_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}H\right ) +\sinh \left ( \frac {n\pi }{L}H\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) dx\\ & =\sum _{n=1}^{\infty }B_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}H\right ) +\sinh \left ( \frac {n\pi }{L}H\right ) \right ) \int _{0}^{L}\sin \left ( \frac {n\pi }{L}x\right ) \sin \left ( \frac {m\pi }{L}x\right ) dx\\ & =B_{m}\left ( \frac {m\pi }{L}\cosh \left ( \frac {m\pi }{L}H\right ) +\sinh \left ( \frac {m\pi }{L}H\right ) \right ) \frac {L}{2} \end {align*}

Hence\begin {equation} B_{n}=\frac {2}{L}\frac {\int _{0}^{L}f\left ( x\right ) \sin \left ( \frac {n\pi }{L}x\right ) dx}{\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}H\right ) +\sinh \left ( \frac {n\pi }{L}H\right ) \right ) } \tag {4} \end {equation} This completes the solution. In summary\[ u\left ( x,y\right ) =\sum _{n=1}^{\infty }B_{n}\left ( \frac {n\pi }{L}\cosh \left ( \frac {n\pi }{L}y\right ) +\sinh \left ( \frac {n\pi }{L}y\right ) \right ) \sin \left ( \frac {n\pi }{L}x\right ) \] With \(B_{n}\) given by (4).

____________________________________________________________________________________

4.1.1.9 [288] Unit triangle B.C.

problem number 288

Taken from Mathematica DSolve help pages.

Solve Laplace equation \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \] inside a rectangle \(0 \leq x \leq 1, 0 \leq y \leq 2\), with following boundary conditions \begin {align*} u(0,y) &= 0 \\ u(1,y) &= 0 \\ u(x,0) &= \text {UnitTriagle(2 x-1)} \\ u(x,2) &= \text {UnitTriagle(2 x-1)} \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
 L0 = 1; 
 H0 = 2; 
bc  = DirichletCondition[u[x, y] == Piecewise[{{UnitTriangle[2*x - L0], y == 0 || y == H0}}, 0], True]; 
 domain = Rectangle[{0, 0}, {L0, H0}]; 
sol =  AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, bc}, u[x, y], Element[{x, y}, domain]]], 60*10]]; 
sol =  sol /. K[1] -> n;
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}\frac {8 \text {csch}(2 n \pi ) \sin \left (\frac {n \pi }{2}\right ) \sin (n \pi x) (\sinh (n \pi (2-y))+\sinh (n \pi y))}{n^2 \pi ^2}\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
f:=x-> piecewise(x>0 and x<1/2, 2*x, x>1/2 and x<1, 2-2*x); 
bc  := u(0,y)=0,u(1,y)=0,u(x,0)=f(x),u(x,2)=f(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y)) assuming x>0,y>0),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }8\,{\frac {\sin \left ( 1/2\,\pi \,n \right ) {{\rm e}^{2\,\pi \,n}}\sin \left ( n\pi \,x \right ) \left ( -{{\rm e}^{\pi \,n \left ( y-2 \right ) }}+{{\rm e}^{-\pi \,n \left ( y-2 \right ) }}+{{\rm e}^{n\pi \,y}}-{{\rm e}^{-n\pi \,y}} \right ) }{{n}^{2}{\pi }^{2} \left ( {{\rm e}^{4\,\pi \,n}}-1 \right ) }}\]

____________________________________________________________________________________

4.1.1.10 [289] Top edge at infinity

problem number 289

Added December 20, 2018.

Example 21, Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve Laplace equation \[ u_{xx}+u_{yy} = 0 \] Inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq \infty \), with following boundary conditions \begin {align*} u(0,y) &= A \\ u(L,y) &= 0 \\ u(x,0) &= 0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[0, y] == A, u[L, y] == 0, u[x, 0] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {x > 0, y > 0, L > 0}]], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {A \left (-i L \log \left (1-e^{\frac {i \pi (x+i y)}{L}}\right )+i L \log \left (1-e^{-\frac {\pi (y+i x)}{L}}\right )+\pi (L-x)\right )}{\pi L}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2) = 0; 
bc_left_edge := u(0, y) = A; 
bc_right_edge:= u(L, y) = 0; 
bc_bottom_edge:= u(x, 0) = 0; 
bc:=bc_left_edge ,bc_right_edge,bc_bottom_edge; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], HINT = boundedseries(y = infinity)) assuming x>0,y>0,L>0),output='realtime'));
 

\[u \left ( x,y \right ) =-{\frac {xA}{L}}+A+\sum _{n=1}^{\infty }-2\,{\frac {A}{\pi \,n}\sin \left ( {\frac {n\pi \,x}{L}} \right ) {{\rm e}^{-{\frac {n\pi \,y}{L}}}}}\]

Hand solution

Let \begin {equation} u=U+v\tag {1} \end {equation} Where \(U\) satisfies \(\nabla ^{2}U=0\) but with right edge boundary conditions zero, and \(v\left ( x\right ) \) satisfies the nonhomogeneous boundary conditions \(v\left ( 0\right ) =A,v\left ( L\right ) =0\). This implies \[ v\left ( x\right ) =A\left ( 1-\frac {x}{L}\right ) \] Hence \(u=U+A\left ( 1-\frac {x}{L}\right ) \). Substituting this back in \(\nabla ^{2}u=0\) gives\[ \nabla ^{2}U=0 \] But with boundary condition on right edge being zero now. Let \(U=X\left ( x\right ) Y\left ( x\right ) \). Substituting this in the above gives\[ \frac {X^{\prime \prime }}{X}+\frac {Y^{\prime \prime }}{Y}=0 \] We want the eigenvalue problem to be in the \(X\) direction. Hence \begin {align*} X^{\prime \prime }+\lambda X & =0\\ X\left ( 0\right ) & =0\\ X\left ( L\right ) & =0 \end {align*}

This has eigenvalues \(\lambda _{n}=\left ( \frac {n\pi }{L}\right ) ^{2},n=1,2,\cdots \) with eigenfunctions \(X_{n}\left ( x\right ) =\sin \left ( \sqrt {\lambda _{n}}x\right ) \). The \(Y\) ode is\begin {align*} Y_{n}^{\prime \prime }-\lambda _{n}Y_{n} & =0\\ Y_{n}\left ( 0\right ) & =0 \end {align*}

Since \(\lambda _{n}>0\) then the solution is \(Y_{n}\left ( y\right ) =c_{1_{n}}e^{\sqrt {\lambda _{n}}y}+c_{2_{n}}e^{-\sqrt {\lambda _{n}}y}\). Since \(Y_{n}\left ( y\right ) \) is bounded, then \(c_{1_{n}}=0\) and the \(Y_{n}\left ( y\right ) =c_{2_{n}}e^{-\sqrt {\lambda _{n}}y}\). Hence\begin {align*} U\left ( x,y\right ) & =\sum _{n=1}^{\infty }X_{n}\left ( x\right ) Y_{n}\left ( y\right ) \\ & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \sqrt {\lambda _{n}}x\right ) e^{-\sqrt {\lambda _{n}}y}\\ & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) e^{-\frac {n\pi }{L}y} \end {align*}

Using the above in (1) gives the solution\begin {equation} u\left ( x,y\right ) =A\left ( 1-\frac {x}{L}\right ) +\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) e^{-\frac {n\pi }{L}y}\tag {2} \end {equation} At \(y=0\) the above gives\begin {align*} 0 & =A\left ( 1-\frac {x}{L}\right ) +\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \\ A\left ( \frac {x}{L}-1\right ) & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \end {align*}

Therefore \(B_{n}\) are the Fourier sine coefficients of \(\frac {A}{L}x\)\begin {align*} B_{n} & =\frac {2}{L}\int _{0}^{L}A\left ( \frac {x}{L}-1\right ) \sin \left ( \frac {n\pi }{L}x\right ) dx\\ & =\frac {2A}{L}\int _{0}^{L}\left ( \frac {x}{L}-1\right ) \sin \left ( \frac {n\pi }{L}x\right ) dx\\ & =-\frac {2A}{L}\frac {L}{n\pi }\\ & =-\frac {2A}{n\pi } \end {align*}

Hence the solution (2) becomes\[ u\left ( x,y\right ) =A\left ( 1-\frac {x}{L}\right ) -2\frac {A}{\pi }\sum _{n=1}^{\infty }\frac {1}{n}\sin \left ( \frac {n\pi }{L}x\right ) e^{-\frac {n\pi }{L}y}\]

____________________________________________________________________________________

4.1.1.11 [290] Top edge at infinity

problem number 290

Added March 19, 2019

Solve Laplace equation \[ u_{xx} + u_{yy} = 0 \]

Inside a rectangle \(0 \leq x \leq L, 0 \leq y \leq \infty \), with following boundary conditions

\begin {align*} u(0,y) &= 0 \\ u(L,y) &= A \\ u(x,0) &= 0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[0, y] == 0, u[L, y] == A, u[x, 0] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {x > 0, y > 0, L > 0}]], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {A \left (i L \log \left (1+e^{\frac {i \pi (x+i y)}{L}}\right )-i L \log \left (1+e^{-\frac {\pi (y+i x)}{L}}\right )+\pi x\right )}{\pi L}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2) = 0; 
bc_left_edge := u(0, y) = 0; 
bc_right_edge:= u(L, y) = A; 
bc_bottom_edge:= u(x, 0) = 0; 
bc:=bc_left_edge ,bc_right_edge,bc_bottom_edge; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], HINT = boundedseries(y = infinity)) assuming x>0,y>0,L>0),output='realtime'));
 

\[u \left ( x,y \right ) ={\frac {xA}{L}}+\sum _{n=1}^{\infty }2\,{\frac { \left ( -1 \right ) ^{n}A}{\pi \,n}\sin \left ( {\frac {n\pi \,x}{L}} \right ) {{\rm e}^{-{\frac {n\pi \,y}{L}}}}}\]

Hand solution

Let \begin {equation} u=U+v\tag {1} \end {equation} Where \(U\) satisfies \(\nabla ^{2}U=0\) but with right edge boundary conditions zero, and \(v\left ( x\right ) \) satisfies the nonhomogeneous boundary conditions \(v\left ( 0\right ) =0A,v\left ( L\right ) =A\). This implies \[ v\left ( x\right ) =A\frac {x}{L}\] Hence \(u=U+\frac {A}{L}x\). Substituting this back in \(\nabla ^{2}u=0\) gives\[ \nabla ^{2}U=0 \] But with boundary condition on right edge being zero now. Let \(U=X\left ( x\right ) Y\left ( x\right ) \). Substituting this in the above gives\[ \frac {X^{\prime \prime }}{X}+\frac {Y^{\prime \prime }}{Y}=0 \] We want the eigenvalue problem to be in the \(X\) direction. Hence \begin {align*} X^{\prime \prime }+\lambda X & =0\\ X\left ( 0\right ) & =0\\ X\left ( L\right ) & =0 \end {align*}

This has eigenvalues \(\lambda _{n}=\left ( \frac {n\pi }{L}\right ) ^{2},n=1,2,\cdots \) with eigenfunctions \(X_{n}\left ( x\right ) =\sin \left ( \sqrt {\lambda _{n}}x\right ) \). The \(Y\) ode is\begin {align*} Y_{n}^{\prime \prime }-\lambda _{n}Y_{n} & =0\\ Y_{n}\left ( 0\right ) & =0 \end {align*}

Since \(\lambda _{n}>0\) then the solution is \(Y_{n}\left ( y\right ) =c_{1_{n}}e^{\sqrt {\lambda _{n}}y}+c_{2_{n}}e^{-\sqrt {\lambda _{n}}y}\). Since \(Y_{n}\left ( y\right ) \) is bounded, then \(c_{1_{n}}=0\) and the \(Y_{n}\left ( y\right ) =c_{2_{n}}e^{-\sqrt {\lambda _{n}}y}\). Hence\begin {align*} U\left ( x,y\right ) & =\sum _{n=1}^{\infty }X_{n}\left ( x\right ) Y_{n}\left ( y\right ) \\ & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \sqrt {\lambda _{n}}x\right ) e^{-\sqrt {\lambda _{n}}y}\\ & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) e^{-\frac {n\pi }{L}y} \end {align*}

Using the above in (1) gives the solution\begin {equation} u\left ( x,y\right ) =\frac {A}{L}x+\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) e^{-\frac {n\pi }{L}y}\tag {2} \end {equation} At \(y=0\) the above gives\begin {align*} 0 & =\frac {A}{L}x+\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \\ -\frac {A}{L}x & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}x\right ) \end {align*}

Therefore \(B_{n}\) are the Fourier sine coefficients of \(-\frac {A}{L}x\)\begin {align*} B_{n} & =-\frac {2}{L}\int _{0}^{L}\frac {A}{L}x\sin \left ( \frac {n\pi }{L}x\right ) dx\\ & =-\frac {2A}{L^{2}}\int _{0}^{L}x\sin \left ( \frac {n\pi }{L}x\right ) dx\\ & =-\frac {2A}{L^{2}}\frac {\left ( -1\right ) ^{n+1}L^{2}}{n\pi }\\ & =\frac {2A}{n\pi }\left ( -1\right ) ^{n} \end {align*}

Hence the solution (2) becomes\[ u\left ( x,y\right ) =\frac {A}{L}x+\frac {2A}{\pi }\sum _{n=1}^{\infty }\frac {\left ( -1\right ) ^{n}}{n}\sin \left ( \frac {n\pi }{L}x\right ) e^{-\frac {n\pi }{L}y}\]

____________________________________________________________________________________

4.1.1.12 [291] Right edge at infinity

problem number 291

Added March 19, 2019.

Solve Laplace equation \[ u_{xx}+u_{yy}= 0 \] Inside a rectangle \(0 \leq y \leq L, 0 \leq x \leq \infty \), with following boundary conditions \begin {align*} u(0,y) &= 0 \\ u(x,0) &= A \\ u(x,L) &= 0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[0, y] == 0, u[x, 0] == A, u[x, L] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {x > 0, y > 0, L > 0}]], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {A \left (-i L \log \left (1-e^{-\frac {\pi (x-i y)}{L}}\right )+i L \log \left (1-e^{-\frac {\pi (x+i y)}{L}}\right )+\pi (L-y)\right )}{\pi L}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2) = 0; 
bc_left_edge := u(0, y) = 0; 
bc_top_edge:= u(x, L) = 0; 
bc_bottom_edge:= u(x, 0) = A; 
bc:=bc_left_edge ,bc_top_edge,bc_bottom_edge; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc], HINT = boundedseries(x = infinity)) assuming x>0,y>0,L>0),output='realtime'));
 

\[u \left ( x,y \right ) =-{\frac {Ay}{L}}+A+\sum _{n=1}^{\infty }-2\,{\frac {A}{\pi \,n}{{\rm e}^{-{\frac {n\pi \,x}{L}}}}\sin \left ( {\frac {n\pi \,y}{L}} \right ) }\]

Hand solution

Let \begin {equation} u\left ( x,y\right ) =U\left ( x,y\right ) +v\left ( y\right ) \tag {1} \end {equation} Where \(U\) satisfies \(\nabla ^{2}U=0\) but with bottom edge boundary conditions zero, and \(v\left ( y\right ) \) satisfies the nonhomogeneous boundary conditions \(v\left ( 0\right ) =A,v\left ( L\right ) =0\). This implies \[ v\left ( y\right ) =A\left ( 1-\frac {y}{L}\right ) \] Substituting (1) back in \(\nabla ^{2}u=0\) results in\[ \nabla ^{2}U=0 \] But with boundary condition on bottom edge as \(U=0\). Now we can use separation of variables. Let \(U=X\left ( x\right ) Y\left ( x\right ) \). Substituting this in the above gives\[ \frac {X^{\prime \prime }}{X}+\frac {Y^{\prime \prime }}{Y}=0 \] We want the eigenvalue problem to be in the \(Y\) direction. Hence\[ \frac {Y^{\prime \prime }}{Y}=-\frac {X^{\prime \prime }}{X}=-\lambda \] Therefore the eigenvalue problem is\begin {align*} Y^{\prime \prime }+\lambda Y & =0\\ Y\left ( 0\right ) & =0\\ Y\left ( L\right ) & =0 \end {align*}

This has eigenvalues \(\lambda _{n}=\left ( \frac {n\pi }{L}\right ) ^{2},n=1,2,\cdots \) with eigenfunctions \(Y_{n}\left ( x\right ) =\sin \left ( \sqrt {\lambda _{n}}y\right ) \). The \(X\) ode is\begin {align*} X_{n}^{\prime \prime }-\lambda _{n}X_{n} & =0\\ X_{n}\left ( 0\right ) & =0 \end {align*}

Since \(\lambda _{n}>0\) then the solution is \(X_{n}\left ( y\right ) =c_{1_{n}}e^{\sqrt {\lambda _{n}}x}+c_{2_{n}}e^{-\sqrt {\lambda _{n}}x}\). Since \(X_{n}\left ( x\right ) \) is bounded, then \(c_{1_{n}}=0\) and the \(X_{n}\left ( x\right ) =c_{2_{n}}e^{-\sqrt {\lambda _{n}}x}\). Hence by superposition the solution is\begin {align*} U\left ( x,y\right ) & =\sum _{n=1}^{\infty }X_{n}\left ( x\right ) Y_{n}\left ( y\right ) \\ & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \sqrt {\lambda _{n}}y\right ) e^{-\sqrt {\lambda _{n}}x}\\ & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}y\right ) e^{-\frac {n\pi }{L}x} \end {align*}

Substituting the above in (1) gives\begin {equation} u\left ( x,y\right ) =A\left ( 1-\frac {y}{L}\right ) +\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}y\right ) e^{-\frac {n\pi }{L}x}\tag {2} \end {equation} At \(x=0\) the above gives\begin {align*} 0 & =A\left ( 1-\frac {y}{L}\right ) +\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}y\right ) \\ A\left ( \frac {y}{L}-1\right ) & =\sum _{n=1}^{\infty }B_{n}\sin \left ( \frac {n\pi }{L}y\right ) \end {align*}

Therefore \(B_{n}\) are the Fourier sine coefficients of \(A\left ( \frac {y}{L}-1\right ) \)\begin {align*} B_{n} & =\frac {2}{L}\int _{0}^{L}A\left ( \frac {y}{L}-1\right ) \sin \left ( \frac {n\pi }{L}y\right ) dy\\ & =\frac {2A}{L}\int _{0}^{L}\left ( \frac {y}{L}-1\right ) \sin \left ( \frac {n\pi }{L}y\right ) dy\\ & =-\frac {2A}{L}\frac {L}{n\pi }\\ & =-\frac {2A}{n\pi } \end {align*}

Hence the solution (2) becomes\[ u\left ( x,y\right ) =A\left ( 1-\frac {y}{L}\right ) -\frac {2A}{\pi }\sum _{n=1}^{\infty }\frac {1}{n}\sin \left ( \frac {n\pi }{L}y\right ) e^{-\frac {n\pi }{L}x}\]

____________________________________________________________________________________

4.1.1.13 [292] Right edge at infinity

problem number 292

Added March 20, 2019.

Solve Laplace equation \[ u_{xx}+u_{yy} = 0 \] Inside a rectangle \(0 \leq y \leq L, 0 \leq x \leq \infty \), with following boundary conditions \begin {align*} u(0,y) &= 0 \\ u(x,L) &= e^{-x} \\ u(x,0) &= 0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[0, y] == 0, u[x, L] == Exp[-x], u[x, 0] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {x > 0, y > 0, L > 0}]], 60*10]];
 

\[\left \{\left \{u(x,y)\to \begin {array}{cc} \{ & \begin {array}{cc} \int _0^{\infty }\frac {2 \text {csch}(L K[1]) K[1] \sin (x K[1]) \sinh (y K[1])}{\pi K[1]^2+\pi }dK[1] & x\geq 0\land y\geq 0\land L>0 \\ \text {Indeterminate} & \text {True} \\\end {array} \\\end {array}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2) = 0; 
bc_left_edge := u(0, y) = 0; 
bc_top_edge:= u(x, L) = exp(-x); 
bc_bottom_edge:= u(x, 0) = 0; 
bc:=bc_left_edge ,bc_top_edge,bc_bottom_edge; 
#I need to find out how Maple obtained the above solution. It seems to have unknown constant in it 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc],u(x,y)) assuming x>0,y>0,L>0),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }-{\frac {1}{\pi \,n \left ( \pi \,n+L \right ) }\sin \left ( {\frac {n\pi \,y}{L}} \right ) \left ( {\it \_C5} \left ( n \right ) \left ( -{\pi }^{2}{n}^{2}+{L}^{2} \right ) {{\rm e}^{-{\frac {n\pi \,x}{L}}}}+ \left ( \left ( -2\,\pi \,n-4\,L \right ) \left ( -1 \right ) ^{n}+{\it \_C5} \left ( n \right ) \left ( \pi \,n+L \right ) ^{2} \right ) {{\rm e}^{{\frac {n\pi \,x}{L}}}}-2\, \left ( - \left ( -1 \right ) ^{n}{{\rm e}^{-x}}+{\it \_C5} \left ( n \right ) \left ( \pi \,n+L \right ) \right ) L \right ) }+{\frac {y{{\rm e}^{-x}}}{L}}\]

Hand solution

Let \(u=X\left ( x\right ) Y\left ( x\right ) \). Substituting this in \(\nabla ^{2}u=0\)\[ \frac {X^{\prime \prime }}{X}+\frac {Y^{\prime \prime }}{Y}=0 \] We want the eigenvalue problem to be in the \(X\) direction. Hence\[ \frac {X^{\prime \prime }}{X}=-\frac {Y^{\prime \prime }}{Y}=-\lambda \] Therefore the eigenvalue problem is\begin {align*} X^{\prime \prime }+\lambda X & =0\\ X\left ( 0\right ) & =0\\ \left \vert X\left ( x\right ) \right \vert & <\infty \end {align*}

case \(\lambda <0\)

Solution is \(X\left ( x\right ) =c_{1}\cosh \left ( \sqrt {-\lambda }x\right ) +c_{2}\sinh \left ( \sqrt {-\lambda }x\right ) \). Since \(X\left ( 0\right ) =0\) then \(c_{1}=0\). Solution becomes \(X\left ( x\right ) =c_{2}\sinh \left ( \sqrt {-\lambda }x\right ) \). Since \(\sinh \) is not bounded on \(x>0\) as \(x\rightarrow \infty \) then \(c_{2}=0\). Therefore \(\lambda <0\) is not eigenvalue.

case \(\lambda =0\)

Solution is \(X\left ( x\right ) =c_{1}x+c_{2}\). At \(x=0\) this gives \(c_{2}=0\).  Hence solution is \(X\left ( x\right ) =c_{1}x\). This is bounded as \(x\rightarrow \infty \) only when \(c_{1}=0\). Therefore \(\lambda =0\) is not eigenvalue.

case \(\lambda >0\)

Let \(\lambda =\alpha ^{2},\alpha >0\). Then solution is \(X\left ( x\right ) =c_{1}\cos \left ( \alpha x\right ) +c_{2}\sin \left ( \alpha x\right ) \). At \(x=0\) this results in \(0=c_{1}\). Hence the eigenvalues are \(\lambda =\alpha ^{2}\) for all real positive real numbers and eigenfunctions are \[ X_{\alpha }\left ( x\right ) =\sin \left ( \alpha x\right ) \] For the \(Y\) ode, \begin {align*} Y^{\prime \prime }-\alpha ^{2}Y & =0\\ Y\left ( 0\right ) & =0 \end {align*}

The solution is \(Y_{\alpha }\left ( y\right ) =c_{1}e^{\alpha y}+c_{2}e^{-\alpha y}\). Since \(Y\left ( 0\right ) =0\) then \(c_{2}=-c_{1}\) and the solution becomes \(Y_{\alpha }\left ( y\right ) =c_{1}\left ( e^{\alpha y}-e^{-\alpha y}\right ) =c_{1}\sinh \left ( \alpha y\right ) \). Hence the solution is generalized linear combination of \(Y\left ( y\right ) X\left ( x\right ) \) given by Fourier integral (since eigenvalues are continuous now and not discrete)\begin {align} u\left ( x,y\right ) & =\int _{0}^{\infty }A\left ( \alpha \right ) Y_{\alpha }\left ( y\right ) X_{\alpha }\left ( x\right ) d\alpha \nonumber \\ & =\int _{0}^{\infty }A\left ( \alpha \right ) \sinh \left ( \alpha y\right ) \sin \left ( \alpha x\right ) d\alpha \tag {1} \end {align}

When \(y=L\), then above becomes\[ e^{-x}=\int _{0}^{\infty }\left ( A\left ( \alpha \right ) \sinh \left ( \alpha L\right ) \right ) \sin \left ( \alpha x\right ) d\alpha \] Hence the coefficient\(\ A\left ( \alpha \right ) \sinh \left ( \alpha L\right ) \) is given by\begin {align*} A\left ( \alpha \right ) \sinh \left ( \alpha L\right ) & =\frac {2}{\pi }\int _{0}^{\infty }e^{-x}\sin \left ( \alpha x\right ) dx\\ & =\frac {2}{\pi }\frac {\alpha }{1+\alpha ^{2}} \end {align*}

Therefore \(A\left ( \alpha \right ) =\frac {2}{\pi \sinh \left ( \alpha L\right ) }\frac {\alpha }{1+\alpha }\). The solution (1) becomes\[ u\left ( x,y\right ) =\frac {2}{\pi }\int _{0}^{\infty }\frac {\alpha \sinh \left ( \alpha y\right ) \sin \left ( \alpha x\right ) }{\left ( 1+\alpha ^{2}\right ) \sinh \left ( \alpha L\right ) }d\alpha \]

____________________________________________________________________________________

4.1.1.14 [293] Right edge at infinity

problem number 293

Added April 4, 2019.

Second midterm exam problem, Math 4567, UMN. Spring 2019.

Solve Laplace equation \[ u_{xx}+u_{yy} = 0 \] Inside a rectangle \(0 \leq y \leq 1, 0 \leq x \leq \infty \), with following boundary conditions \begin {align*} u(0,y) &= 0 \\ u(x,1) &= f(x) \\ u(x,0) &= 0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[0, y] == 0, u[x, 1] == f[x], u[x, 0] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {x > 0, y > 0}]], 60*10]];
 

\[\left \{\left \{u(x,y)\to \begin {array}{cc} \{ & \begin {array}{cc} \int _0^{\infty }\frac {2 \text {csch}(K[1]) \left (\int _0^{\infty } f(x) \sin (x K[1]) \, dx\right ) \sin (x K[1]) \sinh (y K[1])}{\pi }dK[1] & x\geq 0\land y\geq 0 \\ \text {Indeterminate} & \text {True} \\\end {array} \\\end {array}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2) = 0; 
bc_left_edge := u(0, y) = 0; 
bc_top_edge:= u(x, 1) = f(x); 
bc_bottom_edge:= u(x, 0) = 0; 
bc:=bc_left_edge ,bc_top_edge,bc_bottom_edge; 
#Maple can not solve it when using boundedseries(x = infinity) 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc],u(x,y)) assuming x>0,y>0),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }\sin \left ( n\pi \,y \right ) \left ( 2\,{\frac {{{\rm e}^{n\pi \,x}} \left ( -1 \right ) ^{n}f \left ( 0 \right ) }{\pi \,n}}-{{\rm e}^{n\pi \,x}}{\it \_C5} \left ( n \right ) +{\it \_C5} \left ( n \right ) {{\rm e}^{-n\pi \,x}} \right ) +\int _{0}^{x}\!\sum _{n=1}^{\infty }\sin \left ( n\pi \,y \right ) \left ( 2\,{\frac {{{\rm e}^{n\pi \, \left ( x-\tau \right ) }} \left ( -1 \right ) ^{n}{\frac {{\rm d}^{2}}{{\rm d}{\tau }^{2}}}f \left ( \tau \right ) }{\pi \,n}}-{{\rm e}^{n\pi \, \left ( x-\tau \right ) }}{\it \_C5} \left ( n \right ) +{\it \_C5} \left ( n \right ) {{\rm e}^{-n\pi \, \left ( x-\tau \right ) }} \right ) \,{\rm d}\tau +yf \left ( x \right ) \]

____________________________________________________________________________________

4.1.1.15 [294] Laplace PDE in 2D Cartessian with boundary condition as Dirac function

problem number 294

Added December 20, 2018

Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve Laplace equation for \(u(x,y)\) \[ \frac {\partial ^2 u}{\partial x^2} + \frac {\partial ^2 u}{\partial y^2} = 0 \] With boundary condition \begin {align*} u(x,0) &= \delta (x) \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = u[x, 0] == DiracDelta[x]; 
sol =  AbsoluteTiming[TimeConstrained[Simplify[DSolve[{pde, bc}, u[x, y], x, y]], 60*10]];
 

\[\left \{\left \{u(x,y)\to \begin {array}{cc} \{ & \begin {array}{cc} \frac {y}{\pi \left (x^2+y^2\right )} & y\geq 0 \\ \text {Indeterminate} & \text {True} \\\end {array} \\\end {array}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
bc  := u(x, 0) = Dirac(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc],u(x,y),method=Fourier)),output='realtime')); 
sol:=convert(sol,Int);
 

\[u \left ( x,y \right ) =1/2\,{\frac {\int _{-\infty }^{\infty }\!{{\rm e}^{s \left ( ix-y \right ) }}\,{\rm d}s}{\pi }}\]

____________________________________________________________________________________

4.1.1.16 [295] One side homogeneous

problem number 295

Added December 20, 2018

Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve Laplace equation for \(u(x,y)\) \[ u_{xx}+u_{yy} = 0 \] With boundary condition \begin {align*} u(0,y)&=0 \\ u(\pi ,y) &= \sinh (\pi ) \cos (y) \\ u(x,0) &= \sin (x) \\ u(x,\pi ) &= -\sinh (x) \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[0, y] == 0, u[Pi, y] == Sinh[Pi]*Cos[y], u[x, 0] == Sin[x], u[x, Pi] == -Sinh[x]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], x, y], 60*10]];
 

\[\left \{\left \{u(x,y)\to \underset {K[1]=1}{\overset {\infty }{\sum }}\text {csch}(\pi K[1]) \left (\delta (K[1]-1) \sin (x K[1]) \sinh ((\pi -y) K[1])+\frac {2 K[1] \sinh (\pi ) \left (\left (1+(-1)^{K[1]}\right ) \left (K[1]^2+1\right ) \sin (y K[1]) \sinh (x K[1])+(-1)^{K[1]} \left (K[1]^2-1\right ) \sin (x K[1]) \sinh (y K[1])\right )}{\pi \left (K[1]^4-1\right )}\right )\right \}\right \}\]

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2) = 0; 
bc_left_side   :=  u(0,y) = 0; 
bc_right_side  := u(Pi,y) = sinh(Pi)*cos(y); 
bc_bottom_side := u(x,0)  = sin(x); 
bc_top_side    := u(x,Pi) = -sinh(x); 
bc  := bc_left_side,bc_right_side,bc_bottom_side,bc_top_side; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y))),output='realtime'));
 

\[u \left ( x,y \right ) ={\frac {1}{{{\rm e}^{2\,\pi }}-1} \left ( \left ( {{\rm e}^{2\,\pi }}-1 \right ) \sum _{n=1}^{\infty }{\frac { \left ( -1 \right ) ^{n}n \left ( {{\rm e}^{2\,\pi }}-1 \right ) {{\rm e}^{ \left ( n-1 \right ) \pi -ny}}\sin \left ( nx \right ) \left ( {{\rm e}^{2\,ny}}-1 \right ) }{\pi \, \left ( {n}^{2}+1 \right ) \left ( {{\rm e}^{2\,\pi \,n}}-1 \right ) }}+ \left ( {{\rm e}^{2\,\pi }}-1 \right ) \sum _{n=2}^{\infty }2\,{\frac {\sin \left ( ny \right ) {{\rm e}^{n \left ( \pi -x \right ) }}\sinh \left ( \pi \right ) n \left ( \left ( -1 \right ) ^{n}+1 \right ) \left ( {{\rm e}^{2\,nx}}-1 \right ) }{\pi \, \left ( {{\rm e}^{2\,\pi \,n}}-1 \right ) \left ( {n}^{2}-1 \right ) }}+\sin \left ( x \right ) \left ( {{\rm e}^{-y+2\,\pi }}-{{\rm e}^{y}} \right ) \right ) }\]

____________________________________________________________________________________

4.1.1.17 [296] In right half plane

problem number 296

PDE example 18 from Maple help page

see march_20_2019_11_pm.tex for start of solution. Not completed yet

Solve Laplace equation \[ u_{xx} + u_{yy} = 0 \] With boundary conditions \begin {align*} u(0,y) &= \frac {\sin y}{y} \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = u[0, y] == Sin[y]/y; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> 0 < x], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {-2 y \sinh (x) \sin (y)-2 x \cosh (x) \cos (y)+x}{x^2+y^2}\right \}\right \}\]

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
bc  := u(0,y)=sin(y)/y; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y)) assuming x>0),output='realtime'));
 

\[u \left ( x,y \right ) ={\frac {\sin \left ( ix-y \right ) +{\it \_F2} \left ( y-ix \right ) \left ( y-ix \right ) }{ix-y}}+{\it \_F2} \left ( ix+y \right ) \]

____________________________________________________________________________________

4.1.1.18 [297] Right edge at infinity

problem number 297

Solve Laplace equation \[ u_{xx} + u_{yy} =0 \] With boundary conditions \begin {align*} u(0,y) &= \sin y \\ u(x,0) &= 0 \\ u(x,a) &= 0 \\ u(\infty ,y) &= 0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0; 
bc  = {u[x, 0] == 0, u[x, a] == 0, u[0, y] == Sin[y]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> a > 0], 60*10]];
 

Failed

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,y),x$2)+diff(u(x,y),y$2)=0; 
bc  := u(x,0)=0, u(x,a)=0, u(0,y)=sin(y); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve({pde, bc}, u(x,y)) assuming a>0),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }{\frac {1}{\pi \,n+a} \left ( -2\,\pi \,\begin {cases}-1 & a=\pi \,n\\-{\frac { \left ( -1 \right ) ^{n}\sin \left ( a \right ) }{-\pi \,n+a}} & \text {otherwise}\end {cases}{{\rm e}^{{\frac {n\pi \,x}{a}}}}n+{\it \_C5} \left ( n \right ) \left ( \pi \,n+a \right ) \left ( {{\rm e}^{-{\frac {n\pi \,x}{a}}}}-{{\rm e}^{{\frac {n\pi \,x}{a}}}} \right ) \right ) \sin \left ( {\frac {n\pi \,y}{a}} \right ) }\]

____________________________________________________________________________________

4.1.1.19 [298] Dirichlet problem Upper half

problem number 298

Taken from Mathematica DSolve help pages

Solve for \(u( x,y) \) \begin {align*} u_{xx}+ y_{yy} =0 \end {align*}

Boundary conditions \(u(x,0)=1\) for \(-\frac {1}{2}\leq x \leq \frac {1}{2}\) and \(x=0\) otherwise. This is called UnitBox in Mathematica.

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = u[x, 0] == UnitBox[x]; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y},Assumptions -> {y > 0, -Infinity < x < Infinity}], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {\tan ^{-1}\left (\frac {\frac {1}{2}-x}{y}\right )+\tan ^{-1}\left (\frac {x+\frac {1}{2}}{y}\right )}{\pi }\right \}\right \}\]

Maple

restart; 
pde := diff(u(x,y),x$2)+ diff(u(x,y),y$2)=0; 
bc  := u(x,0) =piecewise( x< -1/2 or x>1/2,0, 1); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y)) assuming y>0,-infinity<x,x<infinity),output='realtime'));
 

\[u \left ( x,y \right ) =-{\it \_F2} \left ( ix-y \right ) +\begin {cases}0 & iy+x<-1/2\\1 & iy+x\leq 1/2\\0 & 1/2<iy+x\end {cases}+{\it \_F2} \left ( ix+y \right ) \]

____________________________________________________________________________________

4.1.1.20 [299] Right half-plane

problem number 299

Taken from Mathematica DSolve help pages

Solve for \(u( x,y) \) \begin {align*} u_{xx}+ y_{yy} =0 \end {align*}

Boundary conditions \(u(0,y)=\sinc (y)\).

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = u[0, y] == Sinc[y]; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y},Assumptions -> {x > 0, -Infinity < y < Infinity}], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {-2 y \sinh (x) \sin (y)-2 x \cosh (x) \cos (y)+x}{x^2+y^2}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x,y),x$2)+ diff(u(x,y),y$2)=0; 
bc  := u(0,y) =sin(y)/y; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y))assuming x>0,y>-infinity,y<infinity),output='realtime'));
 

\[u \left ( x,y \right ) ={\frac {\sin \left ( ix-y \right ) +{\it \_F2} \left ( y-ix \right ) \left ( y-ix \right ) }{ix-y}}+{\it \_F2} \left ( ix+y \right ) \]

____________________________________________________________________________________

4.1.1.21 [300] First quadrant

problem number 300

Taken from Mathematica DSolve help pages

Solve for \(u( x,y) \) \begin {align*} u_{xx}+ y_{yy} =0 \end {align*}

Boundary conditions \begin {align*} u(x,0) &= - \frac {1}{(x-2)^2+3}\\ u(0,y) &= \frac {1}{(y-3)^2+1}\\ \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[x, 0] == -((x - 2)^2 + 3)^(-1), u[0, y] == 1/((y - 3)^2 + 1)}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y},Assumptions -> {x > 0, y > 0}], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {2 \left (\frac {3 \left (y \left (3 \pi (x+1) \left (2 x^2 \left (y^2+12\right )+x^4-4 x^3-4 x \left (y^2+10\right )+y^4-16 y^2+100\right )+x \left (2 x^2 \left (y^2-10\right )+x^4+y^4+20 y^2-260\right ) \log \left (x^2+y^2\right )+x \left (2 x^2 \left (y^2 \left (6 \tan ^{-1}(3)-\log (10)\right )+10 \left (\log (10)+6 \tan ^{-1}(3)\right )\right )+x^4 \left (6 \tan ^{-1}(3)-\log (10)\right )-20 y^2 \left (\log (10)+6 \tan ^{-1}(3)\right )+y^4 \left (6 \tan ^{-1}(3)-\log (10)\right )+260 \log (10)+360 \tan ^{-1}(3)\right )\right )-\left (x^4 \left (y^2+6\right )-x^2 \left (y^4-92 y^2+60\right )+x^6-y^6+6 y^4+60 y^2-1000\right ) \tan ^{-1}\left (\frac {y}{x}\right )\right )}{\left (x^2-2 x+y^2-6 y+10\right ) \left (x^2+2 x+y^2-6 y+10\right ) \left (x^2-2 x+y^2+6 y+10\right ) \left (x^2+2 x+y^2+6 y+10\right )}-\frac {3 \left (x^4 \left (y^2+5\right )-x^2 \left (y^4+46 y^2-35\right )+x^6-y^6+5 y^4-35 y^2+343\right ) \tan ^{-1}\left (\frac {x}{y}\right )+x \left (2 \pi \left (2 x^2 \left (\sqrt {3} y^3-3 y^2-7 \sqrt {3} y-3\right )+x^4 \left (\sqrt {3} y+3\right )+\sqrt {3} y^5-9 y^4+14 \sqrt {3} y^3-6 y^2-35 \sqrt {3} y+147\right )+3 y \left (2 x^2 \left (y^2+7\right )+x^4+y^4-14 y^2-63\right ) \log \left (x^2+y^2\right )+y \left (2 x^2 \left (y^2 \left (4 \sqrt {3} \tan ^{-1}\left (\frac {2}{\sqrt {3}}\right )-3 \log (7)\right )-7 \left (\log (343)+4 \sqrt {3} \tan ^{-1}\left (\frac {2}{\sqrt {3}}\right )\right )\right )+x^4 \left (4 \sqrt {3} \tan ^{-1}\left (\frac {2}{\sqrt {3}}\right )-3 \log (7)\right )+14 y^2 \left (\log (343)+4 \sqrt {3} \tan ^{-1}\left (\frac {2}{\sqrt {3}}\right )\right )+y^4 \left (4 \sqrt {3} \tan ^{-1}\left (\frac {2}{\sqrt {3}}\right )-3 \log (7)\right )+189 \log (7)-140 \sqrt {3} \tan ^{-1}\left (\frac {2}{\sqrt {3}}\right )\right )\right )}{\left (2 x^2 \left (y^2+15\right )+x^4-8 x^3-8 x \left (y^2+7\right )+y^4+2 y^2+49\right ) \left (2 x^2 \left (y^2+15\right )+x^4+8 x^3+8 x \left (y^2+7\right )+y^4+2 y^2+49\right )}\right )}{3 \pi }\right \}\right \}\]

Maple

restart; 
pde := diff(u(x,y),x$2)+ diff(u(x,y),y$2)=0; 
bc  := u(x, 0) = (-1/((x - 2)^2 + 3)), u(0, y) = 1/((y - 3)^2 + 1); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y))assuming x>0,y>0),output='realtime'));
 

sol=()

____________________________________________________________________________________

4.1.1.22 [301] Neumann problem upper half-plane

problem number 301

Taken from Mathematica DSolve help pages

Solve for \(u( x,y) \) \begin {align*} \nabla ^2 u(x,y)=0 \end {align*}

Boundary conditions \(\frac {\partial u}{\partial y}(x,0)=\text {UnitBox[x]}\) where \(\text {UnitBox[x]}\) is \(1\) for \(-\frac {1}{2}\leq x \leq \frac {1}{2}\) and \(0\) otherwise. This is called UnitBox in Mathematica.

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = Derivative[0, 1][u][x, 0] == UnitBox[x]; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y},Assumptions -> y>0], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {-2 x \log \left ((1-2 x)^2+4 y^2\right )+\log \left ((1-2 x)^2+4 y^2\right )+2 x \log \left ((2 x+1)^2+4 y^2\right )+\log \left ((2 x+1)^2+4 y^2\right )+4 y \tan ^{-1}\left (\frac {x+\frac {1}{2}}{y}\right )+4 y \cot ^{-1}\left (\frac {2 y}{1-2 x}\right )-4-2 \log (4)}{4 \pi }\right \}\right \}\]

Maple

restart; 
pde := diff(u(x,y),x$2)+ diff(u(x,y),y$2)=0; 
bc:=eval(diff(u(x,y),y),y=0)= piecewise( x< -1/2 or x>1/2,0, 1); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y))assuming y>0),output='realtime')); 
sol:=convert(sol,Int);
 

\[u \left ( x,y \right ) ={\frac {-i/2}{\pi } \left ( \int _{-\infty }^{\infty }\!{\frac {{{\rm e}^{1/2\,s \left ( 2\,ix-i-2\,y \right ) }}}{{s}^{2}}}\,{\rm d}s-\int _{-\infty }^{\infty }\!{\frac {{{\rm e}^{1/2\,s \left ( 2\,ix+i-2\,y \right ) }}}{{s}^{2}}}\,{\rm d}s \right ) }\] used convert(sol,Int).

____________________________________________________________________________________

4.1.1.23 [302] Dirichlet problem in a rectangle

problem number 302

Taken from Mathematica DSolve help pages

Solve for \(u( x,y) \) \begin {align*} \frac {\partial ^2 u}{\partial x^2}+\frac {\partial ^2 u}{\partial y^2}=0 \end {align*}

Boundary conditions \(u(x, 0) = x^2 (1 - x), u(x, 2) = 0, u(0, y) = 0, u(1, y) = 0\).

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[x, 0] == x^2*(1 - x), u[x, 2] == 0, u[0, y] == 0, u[1, y] == 0}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}], 60*10]]; 
sol =  sol /. K[1] -> n
 

\[\left \{\left \{u(x,y)\to \underset {n=1}{\overset {\infty }{\sum }}-\frac {4 \left (1+2 (-1)^n\right ) \text {csch}(2 n \pi ) \sin (n \pi x) \sinh (n \pi (2-y))}{n^3 \pi ^3}\right \}\right \}\]

Maple

restart; 
pde := diff(u(x,y),x$2)+ diff(u(x,y),y$2)=0; 
bc  := u(x, 0) = x^2*(1 - x),u(x, 2) = 0, u(0, y) = 0, u(1, y) = 0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc],u(x,y))),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }8\,{\frac {\sin \left ( n\pi \,x \right ) \left ( -{{\rm e}^{-\pi \,n \left ( y-4 \right ) }}+{{\rm e}^{n\pi \,y}} \right ) \left ( \left ( -1 \right ) ^{n}+1/2 \right ) }{{n}^{3}{\pi }^{3} \left ( {{\rm e}^{4\,\pi \,n}}-1 \right ) }}\]

____________________________________________________________________________________

4.1.1.24 [303] Strip in upper half

problem number 303

Added December 20, 2018.

Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve for \(u( x,y) \) \begin {align*} \frac {\partial ^2 u}{\partial x^2}+\frac {\partial ^2 u}{\partial y^2}=0 \end {align*}

Boundary conditions \begin {align*} u(x, 0) &= 0 \\ u(x, b) &= h(x) \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[x, 0] == 0, u[x, b] == h[x]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> {0 < y < b, b > 0}], 60*10]];
 

\[\left \{\left \{u(x,y)\to \frac {\int _{-\infty }^{\infty }e^{i x K[1]} \text {csch}(b K[1]) \sinh (y K[1]) \int _{-\infty }^{\infty }e^{-i x K[1]} h(x)dxdK[1]}{2 \pi }\right \}\right \}\]

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2)=0; 
bc  := u(x,0)=0,u(x,b)=h(x); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc],u(x,y)) assuming 0<y, y<b, b>0),output='realtime')); 
sol:=convert(sol,Int);
 

\[u \left ( x,y \right ) =1/2\,{\frac {1}{\pi \,b} \left ( -\int _{-\infty }^{\infty }\!{\frac {\int _{-\infty }^{\infty }\!h \left ( x \right ) {{\rm e}^{-ixs}}\,{\rm d}x{{\rm e}^{s \left ( ix+b-y \right ) }}}{{{\rm e}^{2\,sb}}-1}}\,{\rm d}sb-\int _{-\infty }^{\infty }\!{\frac {\int _{-\infty }^{\infty }\!h \left ( x \right ) {{\rm e}^{-ixs}}\,{\rm d}x{{\rm e}^{s \left ( ix+2\,b \right ) }}}{{{\rm e}^{2\,sb}}-1}}\,{\rm d}sy+\int _{-\infty }^{\infty }\!{\frac {\int _{-\infty }^{\infty }\!h \left ( x \right ) {{\rm e}^{-ixs}}\,{\rm d}x{{\rm e}^{s \left ( ix+b+y \right ) }}}{{{\rm e}^{2\,sb}}-1}}\,{\rm d}sb+y \left ( 2\,h \left ( x \right ) \pi +\int _{-\infty }^{\infty }\!{\frac {\int _{-\infty }^{\infty }\!h \left ( x \right ) {{\rm e}^{-ixs}}\,{\rm d}x{{\rm e}^{isx}}}{{{\rm e}^{2\,sb}}-1}}\,{\rm d}s \right ) \right ) }\]

____________________________________________________________________________________

4.1.1.25 [304] in Rectangle, right edge at infinity

problem number 304

Added December 20, 2018.

Example 23, Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve for \(u( x,y) \) \begin {align*} \frac {\partial ^2 u}{\partial x^2}+\frac {\partial ^2 u}{\partial y^2}=0 \end {align*}

Boundary conditions \begin {align*} u(x, 0) &= 0 \\ u(x, a) &= 0\\ u(0,y) &= \sin (y) \\ u(\infty ,y) &=0 \end {align*}

Mathematica

ClearAll["Global`*"]; 
pde =  Laplacian[u[x, y], {x, y}] == 0; 
bc  = {u[x, 0] == 0, u[x, a] == 0, u[0, y] == Sin[y]}; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc}, u[x, y], {x, y}, Assumptions -> a > 0], 60*10]];
 

Failed

Maple

restart; 
pde := diff(u(x, y), x$2)+diff(u(x, y), y$2) = 0; 
bc_left_edge:=u(0, y) = sin(y); 
bc_lower_edge:=u(x, 0) = 0; 
bc_top_edge:=u(x,a)=0; 
bc:=bc_left_edge,bc_lower_edge,bc_top_edge; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,bc ], u(x, y)) assuming a>0),output='realtime'));
 

\[u \left ( x,y \right ) =\sum _{n=1}^{\infty }{\frac {1}{\pi \,n+a}\sin \left ( {\frac {n\pi \,y}{a}} \right ) \left ( -2\,\begin {cases}-1 & a=\pi \,n\\-{\frac { \left ( -1 \right ) ^{n}\sin \left ( a \right ) }{-\pi \,n+a}} & \text {otherwise}\end {cases}{{\rm e}^{{\frac {n\pi \,x}{a}}}}\pi \,n+{\it \_C5} \left ( n \right ) \left ( \pi \,n+a \right ) \left ( {{\rm e}^{-{\frac {n\pi \,x}{a}}}}-{{\rm e}^{{\frac {n\pi \,x}{a}}}} \right ) \right ) }\]

____________________________________________________________________________________