### 15 Helmholtz PDE in Cartesian coordinates

_______________________________________________________________________________________

#### 15.1 Dirichlet problem for the Helmholtz equation in a rectangle

problem number 111

Taken from Mathematica DSolve help pages.

Solve for $$u\left ( x,y\right )$$

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

Boundary conditions

\begin{align*} u(x,0) &= \text{UnitTriangle[x-2]} \\ u(x,2) &= 0 \\ u(0,y) &= 0 \\ u(4,y) &=0 \end{align*}

Mathematica

$\left \{\left \{u(x,y)\to \frac{1}{2} \underset{n=1}{\overset{\infty }{\sum }}\frac{128 \left (\cos \left (\frac{n \pi }{8}\right )+\cos \left (\frac{3 n \pi }{8}\right )\right ) \text{csch}\left (\frac{1}{2} \sqrt{n^2 \pi ^2-80}\right ) \sin ^3\left (\frac{n \pi }{8}\right ) \sin \left (\frac{n \pi x}{4}\right ) \sinh \left (\frac{1}{4} \sqrt{n^2 \pi ^2-80} (2-y)\right )}{n^2 \pi ^2}\right \}\right \}$

Maple

$u \left ( x,y \right ) =\sum _{n=1}^{\infty }32\,{\frac{ \left ( 1/2\,\sin \left ( 1/2\,\sqrt{-{\pi }^{2}{n}^{2}+80} \right ) \left ( \sin \left ( 1/2\,\pi \,n \right ) -1/2\,\sin \left ( 1/4\,\pi \,n \right ) -1/2\,\sin \left ( 3/4\,\pi \,n \right ) \right ) \cos \left ( 1/4\,\sqrt{-{\pi }^{2}{n}^{2}+80}y \right ) +\cos \left ( 1/2\,\sqrt{-{\pi }^{2}{n}^{2}+80} \right ) \sin \left ( 1/4\,\pi \,n \right ) \cos \left ( 1/4\,\pi \,n \right ) \sin \left ( 1/4\,\sqrt{-{\pi }^{2}{n}^{2}+80}y \right ) \left ( \cos \left ( 1/4\,\pi \,n \right ) -1 \right ) \right ) \sin \left ( 1/4\,n\pi \,x \right ) }{\sin \left ( 1/2\,\sqrt{-{\pi }^{2}{n}^{2}+80} \right ){n}^{2}{\pi }^{2}}}$

_______________________________________________________________________________________

#### 15.2 With no boundary conditions speciﬁed

problem number 112

Solve for $$u\left ( x,y\right )$$
$\text{DSolve}\left [\left \{u^{(0,2)}(x,y)+u^{(2,0)}(x,y)+5 u(x,y)=0\right \},u(x,y),\{x,y\}\right ]$ why? It solved earlier with BC?
$u \left ( x,y \right ) ={\it \_C1}\,{{\rm e}^{\sqrt{{\it \_c}_{{1}}}x}}{\it \_C3}\,\sin \left ( \sqrt{{\it \_c}_{{1}}+5}y \right ) +{\it \_C1}\,{{\rm e}^{\sqrt{{\it \_c}_{{1}}}x}}{\it \_C4}\,\cos \left ( \sqrt{{\it \_c}_{{1}}+5}y \right ) +{\frac{{\it \_C2}\,{\it \_C3}\,\sin \left ( \sqrt{{\it \_c}_{{1}}+5}y \right ) }{{{\rm e}^{\sqrt{{\it \_c}_{{1}}}x}}}}+{\frac{{\it \_C2}\,{\it \_C4}\,\cos \left ( \sqrt{{\it \_c}_{{1}}+5}y \right ) }{{{\rm e}^{\sqrt{{\it \_c}_{{1}}}x}}}}$