### 12 Laplace PDE in Polar coordinates

_______________________________________________________________________________________

#### 12.1 Laplace PDE inside quarter-circle (Haberman 2.5.5 (c))

problem number 103

This is problem 2.5.5 part (c) from Richard Haberman applied partial diﬀerential equations, 5th edition

Solve Laplace equation $\frac{\partial ^2 u}{\partial r^2} + \frac{1}{r }\frac{\partial u}{\partial r} + \frac{1}{r^2} \frac{\partial ^2 u}{\partial \theta ^2} =0$

Inside quarter circle of radius 1 with $$0 \leq \theta \leq \frac{\pi }{2}$$ and $$0 \leq r \leq 1$$, with following boundary conditions

\begin{align*} u(r,0) &= 0 \\ u(r,\frac{\pi }{2}) &= 0 \\ \frac{\partial u}{\partial r}(1,\theta ) &= f(\theta ) \\ \end{align*}

Mathematica

$\text{DSolve}\left [\left \{\frac{u^{(0,2)}(r,\theta ) u^{(1,0)}(r,\theta )}{r^3}+u^{(2,0)}(r,\theta )=0,\left \{u^{(1,0)}(1,\theta )=f(\theta ),u\left (r,\frac{\pi }{2}\right )=0,u(r,0)=0\right \}\right \},u(r,\theta ),\{r,\theta \},\text{Assumptions}\to \left \{0\leq r\leq 1\land 0\leq \theta \leq \frac{\pi }{2}\right \}\right ]$

Maple

$u \left ( r,\theta \right ) =\sum _{n=1}^{\infty } \left ( 2\,{\frac{\int _{0}^{\pi /2}\!f \left ( \theta \right ) \sin \left ( 2\,n\theta \right ) \,{\rm d}\theta{r}^{2\,n}\sin \left ( 2\,n\theta \right ) }{\pi \,n}} \right )$

Hand solution

The Laplace PDE in polar coordinates is  $$r^{2}\frac{\partial ^{2}u}{\partial r^{2}}+r\frac{\partial u}{\partial r}+\frac{\partial ^{2}u}{\partial \theta ^{2}}=0\tag{A}$$ With boundary conditions \begin{align} u\left ( r,0\right ) & =0\nonumber \\ u\left ( r,\frac{\pi }{2}\right ) & =0\tag{B}\\ u\left ( 1,\theta \right ) & =f\left ( \theta \right ) \nonumber \end{align}

Assuming the solution can be written as $u\left ( r,\theta \right ) =R\left ( r\right ) \Theta \left ( \theta \right )$ And substituting this assumed solution back into the (A) gives$r^{2}R^{\prime \prime }\Theta +rR^{\prime }\Theta +R\Theta ^{\prime \prime }=0$ Dividing the above by $$R\Theta \neq 0$$ gives\begin{align*} r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R}+\frac{\Theta ^{\prime \prime }}{\Theta } & =0\\ r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R} & =-\frac{\Theta ^{\prime \prime }}{\Theta } \end{align*}

Since each side depends on diﬀerent independent variable and they are equal, they must be equal to same constant. say $$\lambda$$. $r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R}=-\frac{\Theta ^{\prime \prime }}{\Theta }=\lambda$ This results in the following two ODE’s. The boundaries conditions in (B) are also transferred to each ODE. This gives\begin{align} \Theta ^{\prime \prime }+\lambda \Theta & =0\nonumber \\ \Theta \left ( 0\right ) & =0\tag{1}\\ \Theta \left ( \frac{\pi }{2}\right ) & =0\nonumber \end{align}

And\begin{align} r^{2}R^{\prime \prime }+rR^{\prime }-\lambda R & =0\tag{2}\\ \left \vert R\left ( 0\right ) \right \vert & <\infty \nonumber \end{align}

Starting with (1). Consider the Case $$\lambda <0$$. The solution in this case will be $\Theta =A\cosh \left ( \sqrt{\lambda }\theta \right ) +B\sinh \left ( \sqrt{\lambda }\theta \right )$ Applying ﬁrst B.C. gives $$A=0$$. The solution becomes $$\Theta =B\sinh \left ( \sqrt{\lambda }\theta \right )$$. Applying second B.C. gives $0=B\sinh \left ( \sqrt{\lambda }\frac{\pi }{2}\right )$ But $$\sinh$$ is zero only when $$\sqrt{\lambda }\frac{\pi }{2}=0$$ which is not the case here. Therefore $$B=0$$ and hence trivial solution. Hence $$\lambda <0$$ is not an eigenvalue.

Case $$\lambda =0$$ The ODE becomes $$\Theta ^{\prime \prime }=0$$ with solution $$\Theta =A\theta +B$$. First B.C. gives $$0=B$$. The solution becomes $$\Theta =A\theta$$. Second B.C. gives $$0=A\frac{\pi }{2}$$, hence $$A=0$$ and trivial solution. Therefore $$\lambda =0$$ is not an eigenvalue.

Case $$\lambda >0$$ The ODE becomes $$\Theta ^{\prime \prime }+\lambda \Theta =0$$ with solution $\Theta =A\cos \left ( \sqrt{\lambda }\theta \right ) +B\sin \left ( \sqrt{\lambda }\theta \right )$ The ﬁrst B.C. gives $$0=A$$. The solution becomes $\Theta =B\sin \left ( \sqrt{\lambda }\theta \right )$ And the second B.C. gives $0=B\sin \left ( \sqrt{\lambda }\frac{\pi }{2}\right )$ For non-trivial solution $$\sin \left ( \sqrt{\lambda }\frac{\pi }{2}\right ) =0$$ or $$\sqrt{\lambda }\frac{\pi }{2}=n\pi$$ for $$n=1,2,3,\cdots$$. Hence the eigenvalues are\begin{align*} \sqrt{\lambda _{n}} & =2n\\ \lambda _{n} & =4n^{2}\qquad n=1,2,3,\cdots \end{align*}

And the eigenfunctions are $$\Theta _{n}\left ( \theta \right ) =B_{n}\sin \left ( 2n\theta \right ) \qquad n=1,2,3,\cdots \tag{3}$$ Now the $$R$$ ODE is solved. There is one case to consider, which is $$\lambda >0$$ based on the above. The ODE is\begin{align*} r^{2}R^{\prime \prime }+rR^{\prime }-\lambda _{n}R & =0\\ r^{2}R^{\prime \prime }+rR^{\prime }-4n^{2}R & =0\qquad n=1,2,3,\cdots \end{align*}

This is Euler ODE. Let $$R\left ( r\right ) =r^{p}$$. Then $$R^{\prime }=pr^{p-1}$$ and $$R^{\prime \prime }=p\left ( p-1\right ) r^{p-2}$$. This gives\begin{align*} r^{2}\left ( p\left ( p-1\right ) r^{p-2}\right ) +r\left ( pr^{p-1}\right ) -4n^{2}r^{p} & =0\\ \left ( \left ( p^{2}-p\right ) r^{p}\right ) +pr^{p}-4n^{2}r^{p} & =0\\ r^{p}p^{2}-pr^{p}+pr^{p}-4n^{2}r^{p} & =0\\ p^{2}-4n^{2} & =0\\ p & =\pm 2n \end{align*}

Hence the solution is$R\left ( r\right ) =Cr^{2n}+D\frac{1}{r^{2n}}$ Applying the condition that $$\left \vert R\left ( 0\right ) \right \vert <\infty$$ implies $$D=0$$, and the solution becomes$$R_{n}\left ( r\right ) =C_{n}r^{2n}\qquad n=1,2,3,\cdots \tag{4}$$ Using (3,4) the solution $$u_{n}\left ( r,\theta \right )$$ is\begin{align*} u_{n}\left ( r,\theta \right ) & =R_{n}\Theta _{n}\\ & =C_{n}r^{2n}B_{n}\sin \left ( 2n\theta \right ) \\ & =B_{n}r^{2n}\sin \left ( 2n\theta \right ) \end{align*}

Where $$C_{n}B_{n}$$ was combined into one constant $$B_{n}$$. (No need to introduce new symbol). The ﬁnal solution is\begin{align*} u\left ( r,\theta \right ) & =\sum _{n=1}^{\infty }u_{n}\left ( r,\theta \right ) \\ & =\sum _{n=1}^{\infty }B_{n}r^{2n}\sin \left ( 2n\theta \right ) \end{align*}

Now the nonhomogeneous condition is applied to ﬁnd $$B_{n}$$.$\frac{\partial }{\partial r}u\left ( r,\theta \right ) =\sum _{n=1}^{\infty }B_{n}\left ( 2n\right ) r^{2n-1}\sin \left ( 2n\theta \right )$ Hence $$\frac{\partial }{\partial r}u\left ( 1,\theta \right ) =f\left ( \theta \right )$$ becomes$f\left ( \theta \right ) =\sum _{n=1}^{\infty }2B_{n}n\sin \left ( 2n\theta \right )$ Multiplying by $$\sin \left ( 2m\theta \right )$$ and integrating gives\begin{align} \int _{0}^{\frac{\pi }{2}}f\left ( \theta \right ) \sin \left ( 2m\theta \right ) d\theta & =\int _{0}^{\frac{\pi }{2}}\sin \left ( 2m\theta \right ) \sum _{n=1}^{\infty }2B_{n}n\sin \left ( 2n\theta \right ) d\theta \nonumber \\ & =\sum _{n=1}^{\infty }2nB_{n}\int _{0}^{\frac{\pi }{2}}\sin \left ( 2m\theta \right ) \sin \left ( 2n\theta \right ) d\theta \tag{5} \end{align}

When $$n=m$$ then\begin{align*} \int _{0}^{\frac{\pi }{2}}\sin \left ( 2m\theta \right ) \sin \left ( 2n\theta \right ) d\theta & =\int _{0}^{\frac{\pi }{2}}\sin ^{2}\left ( 2n\theta \right ) d\theta \\ & =\int _{0}^{\frac{\pi }{2}}\left ( \frac{1}{2}-\frac{1}{2}\cos 4n\theta \right ) d\theta \\ & =\frac{1}{2}\left [ \theta \right ] _{0}^{\frac{\pi }{2}}-\frac{1}{2}\left [ \frac{\sin 4n\theta }{4n}\right ] _{0}^{\frac{\pi }{2}}\\ & =\frac{\pi }{4}-\left ( \frac{1}{8n}\left ( \sin \frac{4n}{2}\pi \right ) -\sin \left ( 0\right ) \right ) \end{align*}

And since $$n$$ is integer, then $$\sin \frac{4n}{2}\pi =\sin 2n\pi =0$$ and the above becomes $$\frac{\pi }{4}$$.

Now for the case when $$n\neq m$$ using $$\sin A\sin B=\frac{1}{2}\left ( \cos \left ( A-B\right ) -\cos \left ( A+B\right ) \right )$$ then\begin{align*} \int _{0}^{\frac{\pi }{2}}\sin \left ( 2m\theta \right ) \sin \left ( 2n\theta \right ) d\theta & =\int _{0}^{\frac{\pi }{2}}\frac{1}{2}\left ( \cos \left ( 2m\theta -2n\theta \right ) -\cos \left ( 2m\theta +2n\theta \right ) \right ) d\theta \\ & =\frac{1}{2}\int _{0}^{\frac{\pi }{2}}\cos \left ( 2m\theta -2n\theta \right ) d\theta -\frac{1}{2}\int _{0}^{\frac{\pi }{2}}\cos \left ( 2m\theta +2n\theta \right ) d\theta \\ & =\frac{1}{2}\int _{0}^{\frac{\pi }{2}}\cos \left ( \left ( 2m-2n\right ) \theta \right ) d\theta -\frac{1}{2}\int _{0}^{\frac{\pi }{2}}\cos \left ( \left ( 2m+2n\right ) \theta \right ) d\theta \\ & =\frac{1}{2}\left [ \frac{\sin \left ( \left ( 2m-2n\right ) \theta \right ) }{\left ( 2m-2n\right ) }\right ] _{0}^{\frac{\pi }{2}}-\frac{1}{2}\left [ \frac{\sin \left ( \left ( 2m+2n\right ) \theta \right ) }{\left ( 2m+2n\right ) }\right ] _{0}^{\frac{\pi }{2}}\\ & =\frac{1}{4\left ( m-n\right ) }\left [ \sin \left ( \left ( 2m-2n\right ) \theta \right ) \right ] _{0}^{\frac{\pi }{2}}-\frac{1}{4\left ( m+n\right ) }\left [ \sin \left ( \left ( 2m+2n\right ) \theta \right ) \right ] _{0}^{\frac{\pi }{2}}\\ & =\frac{1}{4\left ( m-n\right ) }\left [ \sin \left ( \left ( 2m-2n\right ) \frac{\pi }{2}\right ) -0\right ] -\frac{1}{4\left ( m+n\right ) }\left [ \sin \left ( \left ( 2m+2n\right ) \frac{\pi }{2}\right ) -0\right ] \end{align*}

Since $$2m-2n\frac{\pi }{2}=\pi \left ( m-n\right )$$ which is integer multiple of $$\pi$$ and also $$\left ( 2m+2n\right ) \frac{\pi }{2}$$ is integer multiple of $$\pi$$ then the whole term above becomes zero. Therefore (5) becomes$\int _{0}^{\frac{\pi }{2}}f\left ( \theta \right ) \sin \left ( 2m\theta \right ) d\theta =2mB_{m}\frac{\pi }{4}$ Hence$B_{n}=\frac{2}{\pi n}\int _{0}^{\frac{\pi }{2}}f\left ( \theta \right ) \sin \left ( 2n\theta \right ) d\theta$ Summary: the ﬁnal solution is$u\left ( r,\theta \right ) =\frac{2}{\pi }\sum _{n=1}^{\infty }\frac{1}{n}\left [ \int _{0}^{\frac{\pi }{2}}f\left ( \theta \right ) \sin \left ( 2n\theta \right ) d\theta \right ] \left ( r^{2n}\sin \left ( 2n\theta \right ) \right )$

_______________________________________________________________________________________

#### 12.2 Laplace PDE inside semi-circle

problem number 104

Solve Laplace equation $\frac{\partial ^2 u}{\partial r^2} + \frac{1}{r }\frac{\partial u}{\partial r} + \frac{1}{r^2} \frac{\partial ^2 u}{\partial \theta ^2} =0$

Inside semi-circle of radius 1 with $$0 \leq \theta \leq \pi$$ and $$0 \leq r \leq 1$$, with following boundary conditions

\begin{align*} u(r,0) &= 0 \\ u(r,\pi ) &= 0 \\ u(0,\theta ) &= 0 \\ u(1,\theta ) &= f(\theta ) \end{align*}

Mathematica

$\text{DSolve}\left [\left \{\frac{u^{(0,2)}(r,\theta ) u^{(1,0)}(r,\theta )}{r^3}+u^{(2,0)}(r,\theta )=0,\{u(r,0)=0,u(r,\pi )=0,u(0,\theta )=0,u(1,\theta )=f(\theta )\}\right \},u(r,\theta ),\{r,\theta \},\text{Assumptions}\to \{0\leq r\leq 1\land 0\leq \theta \leq \pi \}\right ]$

Maple

$u \left ( r,\theta \right ) =\sum _{n=1}^{\infty } \left ( 2\,{\frac{ \left ( \int _{0}^{\pi }\!\sin \left ( n\theta \right ) f \left ( \theta \right ) \,{\rm d}\theta{r}^{n}-1/2\,{\it \_C5} \left ( n \right ) \pi \, \left ({r}^{n}-{r}^{-n} \right ) \right ) \sin \left ( n\theta \right ) }{\pi }} \right )$

Hand solution

The Laplace PDE in polar coordinates is  $$r^{2}\frac{\partial ^{2}u}{\partial r^{2}}+r\frac{\partial u}{\partial r}+\frac{\partial ^{2}u}{\partial \theta ^{2}}=0\tag{A}$$ With\begin{align} \frac{\partial u}{\partial r}\left ( a,\theta \right ) & =0\nonumber \\ u\left ( b,\theta \right ) & =g\left ( \theta \right ) \tag{B} \end{align}

Assuming the solution can be written as $u\left ( r,\theta \right ) =R\left ( r\right ) \Theta \left ( \theta \right )$ And substituting this assumed solution back into the (A) gives$r^{2}R^{\prime \prime }\Theta +rR^{\prime }\Theta +R\Theta ^{\prime \prime }=0$ Dividing the above by $$R\Theta$$ gives\begin{align*} r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R}+\frac{\Theta ^{\prime \prime }}{\Theta } & =0\\ r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R} & =-\frac{\Theta ^{\prime \prime }}{\Theta } \end{align*}

Since each side depends on diﬀerent independent variable and they are equal, they must be equal to same constant. say $$\lambda$$. $r^{2}\frac{R^{\prime \prime }}{R}+r\frac{R^{\prime }}{R}=-\frac{\Theta ^{\prime \prime }}{\Theta }=\lambda$ This results in the following two ODE’s. The boundaries conditions in (B) are also transferred to each ODE. This results in\begin{align} \Theta ^{\prime \prime }+\lambda \Theta & =0\tag{1}\\ \Theta \left ( -\pi \right ) & =\Theta \left ( \pi \right ) \nonumber \\ \Theta ^{\prime }\left ( -\pi \right ) & =\Theta ^{\prime }\left ( \pi \right ) \nonumber \end{align}

And\begin{align} r^{2}R^{\prime \prime }+rR^{\prime }-\lambda R & =0\tag{2}\\ R^{\prime }\left ( a\right ) & =0\nonumber \end{align}

Starting with (1) Case $$\lambda <0$$ The solution is$\Theta \left ( \theta \right ) =A\cosh \left ( \sqrt{\lambda }\theta \right ) +B\sinh \left ( \sqrt{\lambda }\theta \right )$ First B.C. gives\begin{align*} \Theta \left ( -\pi \right ) & =\Theta \left ( \pi \right ) \\ A\cosh \left ( -\sqrt{\lambda }\pi \right ) +B\sinh \left ( -\sqrt{\lambda }\pi \right ) & =A\cosh \left ( \sqrt{\lambda }\pi \right ) +B\sinh \left ( \sqrt{\lambda }\pi \right ) \\ A\cosh \left ( \sqrt{\lambda }\pi \right ) -B\sinh \left ( \sqrt{\lambda }\pi \right ) & =A\cosh \left ( \sqrt{\lambda }\pi \right ) +B\sinh \left ( \sqrt{\lambda }\pi \right ) \\ 2B\sinh \left ( \sqrt{\lambda }\pi \right ) & =0 \end{align*}

But $$\sinh \left ( \sqrt{\lambda }\pi \right ) =0$$ only at zero and $$\lambda \neq 0$$, hence $$B=0$$ and the solution becomes\begin{align*} \Theta \left ( \theta \right ) & =A\cosh \left ( \sqrt{\lambda }\theta \right ) \\ \Theta ^{\prime }\left ( \theta \right ) & =A\sqrt{\lambda }\cosh \left ( \sqrt{\lambda }\theta \right ) \end{align*}

Applying the second B.C. gives\begin{align*} \Theta ^{\prime }\left ( -\pi \right ) & =\Theta ^{\prime }\left ( \pi \right ) \\ A\sqrt{\lambda }\cosh \left ( -\sqrt{\lambda }\pi \right ) & =A\sqrt{\lambda }\cosh \left ( \sqrt{\lambda }\pi \right ) \\ A\sqrt{\lambda }\cosh \left ( \sqrt{\lambda }\pi \right ) & =A\sqrt{\lambda }\cosh \left ( \sqrt{\lambda }\pi \right ) \\ 2A\sqrt{\lambda }\cosh \left ( \sqrt{\lambda }\pi \right ) & =0 \end{align*}

But $$\cosh \left ( \sqrt{\lambda }\pi \right ) \neq 0$$ hence $$A=0$$. Therefore trivial solution and $$\lambda <0$$ is not an eigenvalue.

Case $$\lambda =0$$ The solution is $$\Theta =A\theta +B$$. Applying the ﬁrst B.C. gives\begin{align*} \Theta \left ( -\pi \right ) & =\Theta \left ( \pi \right ) \\ -A\pi +B & =\pi A+B\\ 2\pi A & =0\\ A & =0 \end{align*}

And the solution becomes $$\Theta =B_{0}$$. A constant. Hence $$\lambda =0$$ is an eigenvalue.

Case $$\lambda >0$$

The solution becomes\begin{align*} \Theta & =A\cos \left ( \sqrt{\lambda }\theta \right ) +B\sin \left ( \sqrt{\lambda }\theta \right ) \\ \Theta ^{\prime } & =-A\sqrt{\lambda }\sin \left ( \sqrt{\lambda }\theta \right ) +B\sqrt{\lambda }\cos \left ( \sqrt{\lambda }\theta \right ) \end{align*}

Applying ﬁrst B.C. gives\begin{align} \Theta \left ( -\pi \right ) & =\Theta \left ( \pi \right ) \nonumber \\ A\cos \left ( -\sqrt{\lambda }\pi \right ) +B\sin \left ( -\sqrt{\lambda }\pi \right ) & =A\cos \left ( \sqrt{\lambda }\pi \right ) +B\sin \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ A\cos \left ( \sqrt{\lambda }\pi \right ) -B\sin \left ( \sqrt{\lambda }\pi \right ) & =A\cos \left ( \sqrt{\lambda }\pi \right ) +B\sin \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ 2B\sin \left ( \sqrt{\lambda }\pi \right ) & =0 \tag{3} \end{align}

Applying second B.C. gives\begin{align} \Theta ^{\prime }\left ( -\pi \right ) & =\Theta ^{\prime }\left ( \pi \right ) \nonumber \\ -A\sqrt{\lambda }\sin \left ( -\sqrt{\lambda }\pi \right ) +B\sqrt{\lambda }\cos \left ( -\sqrt{\lambda }\pi \right ) & =-A\sqrt{\lambda }\sin \left ( \sqrt{\lambda }\pi \right ) +B\sqrt{\lambda }\cos \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ A\sqrt{\lambda }\sin \left ( \sqrt{\lambda }\pi \right ) +B\sqrt{\lambda }\cos \left ( \sqrt{\lambda }\pi \right ) & =-A\sqrt{\lambda }\sin \left ( \sqrt{\lambda }\pi \right ) +B\sqrt{\lambda }\cos \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ A\sqrt{\lambda }\sin \left ( \sqrt{\lambda }\pi \right ) & =-A\sqrt{\lambda }\sin \left ( \sqrt{\lambda }\pi \right ) \nonumber \\ 2A\sin \left ( \sqrt{\lambda }\pi \right ) & =0 \tag{4} \end{align}

Equations (3,4) can be both zero only if $$A=B=0$$ which gives trivial solution, or when $$\sin \left ( \sqrt{\lambda }\pi \right ) =0$$. Therefore taking $$\sin \left ( \sqrt{\lambda }\pi \right ) =0$$ gives a non-trivial solution. Hence\begin{align*} \sqrt{\lambda }\pi & =n\pi \qquad n=1,2,3,\cdots \\ \lambda _{n} & =n^{2}\qquad n=1,2,3,\cdots \end{align*}

Hence the solution for $$\Theta$$ is$$\Theta =A_{0}+\sum _{n=1}^{\infty }A_{n}\cos \left ( n\theta \right ) +B_{n}\sin \left ( n\theta \right ) \tag{5}$$ Now the $$R$$ equation is solved

The case for $$\lambda =0$$ gives\begin{align*} r^{2}R^{\prime \prime }+rR^{\prime } & =0\\ R^{\prime \prime }+\frac{1}{r}R^{\prime } & =0\qquad r\neq 0 \end{align*}

As was done in last problem, the solution to this is$R\left ( r\right ) =A\ln \left \vert r\right \vert +C$ Since $$r>0$$ no need to keep worrying about $$\left \vert r\right \vert$$ and is removed for simplicity. Applying the B.C. gives$R^{\prime }=A\frac{1}{r}$ Evaluating at $$r=a$$ gives$0=A\frac{1}{a}$ Hence $$A=0$$, and the solution becomes$R\left ( r\right ) =C_{0}$ Which is a constant.

Case $$\lambda >0$$ The ODE in this case is $r^{2}R^{\prime \prime }+rR^{\prime }-n^{2}R=0\qquad n=1,2,3,\cdots$ Let $$R=r^{p}$$, the above becomes\begin{align*} r^{2}p\left ( p-1\right ) r^{p-2}+rpr^{p-1}-n^{2}r^{p} & =0\\ p\left ( p-1\right ) r^{p}+pr^{p}-n^{2}r^{p} & =0\\ p\left ( p-1\right ) +p-n^{2} & =0\\ p^{2} & =n^{2}\\ p & =\pm n \end{align*}

Hence the solution is$R_{n}\left ( r\right ) =Cr^{n}+D\frac{1}{r^{n}}\qquad n=1,2,3,\cdots$ Applying the boundary condition $$R^{\prime }\left ( a\right ) =0$$ gives\begin{align*} R_{n}^{\prime }\left ( r\right ) & =nC_{n}r^{n-1}-nD_{n}\frac{1}{r^{n+1}}\\ 0 & =R_{n}^{\prime }\left ( a\right ) \\ & =nC_{n}a^{n-1}-nD_{n}\frac{1}{a^{n+1}}\\ & =nC_{n}a^{2n}-nD_{n}\\ & =C_{n}a^{2n}-D_{n}\\ D_{n} & =C_{n}a^{2n} \end{align*}

The solution becomes\begin{align*} R_{n}\left ( r\right ) & =C_{n}r^{n}+C_{n}a^{2n}\frac{1}{r^{n}}\qquad n=1,2,3,\cdots \\ & =C_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \end{align*}

Hence the complete solution for $$R\left ( r\right )$$ is$$R\left ( r\right ) =C_{0}+\sum _{n=1}^{\infty }C_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \tag{6}$$ Using (5),(6)  gives\begin{align*} u_{n}\left ( r,\theta \right ) & =R_{n}\Theta _{n}\\ u\left ( r,\theta \right ) & =\left [ C_{0}+\sum _{n=1}^{\infty }C_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \right ] \left [ A_{0}+\sum _{n=1}^{\infty }A_{n}\cos \left ( n\theta \right ) +B_{n}\sin \left ( n\theta \right ) \right ] \\ & =D_{0}+\sum _{n=1}^{\infty }A_{n}\cos \left ( n\theta \right ) C_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) +\sum _{n=1}^{\infty }B_{n}\sin \left ( n\theta \right ) C_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \end{align*}

Where $$D_{0}=C_{0}A_{0}$$. To simplify more, $$A_{n}C_{n}$$ is combined to $$A_{n}$$ and $$B_{n}C_{n}$$ is combined to $$B_{n}$$. The full solution is$u\left ( r,\theta \right ) =D_{0}+\sum _{n=1}^{\infty }A_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \cos \left ( n\theta \right ) +\sum _{n=1}^{\infty }B_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \sin \left ( n\theta \right )$ The ﬁnal nonhomogeneous B.C. is applied.\begin{align*} u\left ( b,\theta \right ) & =g\left ( \theta \right ) \\ g\left ( \theta \right ) & =D_{0}+\sum _{n=1}^{\infty }A_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \cos \left ( n\theta \right ) +\sum _{n=1}^{\infty }B_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \sin \left ( n\theta \right ) \end{align*}

For $$n=0$$, integrating both sides give\begin{align*} \int _{-\pi }^{\pi }g\left ( \theta \right ) d\theta & =\int _{-\pi }^{\pi }D_{0}d\theta \\ D_{0} & =\frac{1}{2\pi }\int _{-\pi }^{\pi }g\left ( \theta \right ) d\theta \end{align*}

For $$n>0$$, multiplying both sides by $$\cos \left ( m\theta \right )$$ and integrating gives\begin{align*} \int _{-\pi }^{\pi }g\left ( \theta \right ) \cos \left ( m\theta \right ) d\theta & =\int _{-\pi }^{\pi }D_{0}\cos \left ( m\theta \right ) d\theta \\ & +\int _{-\pi }^{\pi }\sum _{n=1}^{\infty }A_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \cos \left ( m\theta \right ) \cos \left ( n\theta \right ) d\theta \\ & +\int _{-\pi }^{\pi }\sum _{n=1}^{\infty }B_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \cos \left ( m\theta \right ) \sin \left ( n\theta \right ) d\theta \end{align*}

Hence\begin{align} \int _{-\pi }^{\pi }g\left ( \theta \right ) \cos \left ( m\theta \right ) d\theta & =\int _{-\pi }^{\pi }D_{0}\cos \left ( m\theta \right ) d\theta \nonumber \\ & +\sum _{n=1}^{\infty }A_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \int _{-\pi }^{\pi }\cos \left ( m\theta \right ) \cos \left ( n\theta \right ) d\theta \nonumber \\ & +\sum _{n=1}^{\infty }B_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \int _{-\pi }^{\pi }\cos \left ( m\theta \right ) \sin \left ( n\theta \right ) d\theta \tag{7} \end{align}

But \begin{align*} \int _{-\pi }^{\pi }\cos \left ( m\theta \right ) \cos \left ( n\theta \right ) d\theta & =\pi \qquad n=m\neq 0\\ \int _{-\pi }^{\pi }\cos \left ( m\theta \right ) \cos \left ( n\theta \right ) d\theta & =0\qquad n\neq m \end{align*}

And$\int _{-\pi }^{\pi }\cos \left ( m\theta \right ) \sin \left ( n\theta \right ) d\theta =0\qquad$ And$\int _{-\pi }^{\pi }D_{0}\cos \left ( m\theta \right ) d\theta =0$ Then (7) becomes\begin{align} \int _{-\pi }^{\pi }g\left ( \theta \right ) \cos \left ( n\theta \right ) d\theta & =\pi A_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \nonumber \\ A_{n} & =\frac{1}{\pi }\frac{\int _{-\pi }^{\pi }g\left ( \theta \right ) \cos \left ( n\theta \right ) d\theta }{b^{n}+\frac{a^{2n}}{b^{n}}} \tag{8} \end{align}

Again, multiplying both sides by $$\sin \left ( m\theta \right )$$ and integrating gives\begin{align*} \int _{-\pi }^{\pi }g\left ( \theta \right ) \sin \left ( m\theta \right ) d\theta & =\int _{-\pi }^{\pi }D_{0}\sin \left ( m\theta \right ) d\theta \\ & +\int _{-\pi }^{\pi }\sum _{n=1}^{\infty }A_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \sin \left ( m\theta \right ) \cos \left ( n\theta \right ) d\theta \\ & +\int _{-\pi }^{\pi }\sum _{n=1}^{\infty }B_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \sin \left ( m\theta \right ) \sin \left ( n\theta \right ) d\theta \end{align*}

Hence\begin{align} \int _{-\pi }^{\pi }g\left ( \theta \right ) \sin \left ( m\theta \right ) d\theta & =\int _{-\pi }^{\pi }D_{0}\sin \left ( m\theta \right ) d\theta \nonumber \\ & +\sum _{n=1}^{\infty }A_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \int _{-\pi }^{\pi }\sin \left ( m\theta \right ) \cos \left ( n\theta \right ) d\theta \nonumber \\ & +\sum _{n=1}^{\infty }B_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \int _{-\pi }^{\pi }\sin \left ( m\theta \right ) \sin \left ( n\theta \right ) d\theta \tag{9} \end{align}

But \begin{align*} \int _{-\pi }^{\pi }\sin \left ( m\theta \right ) \sin \left ( n\theta \right ) d\theta & =\pi \qquad n=m\neq 0\\ \int _{-\pi }^{\pi }\sin \left ( m\theta \right ) \sin \left ( n\theta \right ) d\theta & =0\qquad n\neq m \end{align*}

And$\int _{-\pi }^{\pi }\sin \left ( m\theta \right ) \cos \left ( n\theta \right ) d\theta =0$ And$\int _{-\pi }^{\pi }D_{0}\sin \left ( m\theta \right ) d\theta =0$ Then (9) becomes\begin{align*} \int _{-\pi }^{\pi }g\left ( \theta \right ) \sin \left ( n\theta \right ) d\theta & =\pi B_{n}\left ( b^{n}+\frac{a^{2n}}{b^{n}}\right ) \\ B_{n} & =\frac{1}{\pi }\frac{\int _{-\pi }^{\pi }g\left ( \theta \right ) \sin \left ( n\theta \right ) d\theta }{b^{n}+\frac{a^{2n}}{b^{n}}} \end{align*}

This complete the solution. Summary\begin{align*} u\left ( r,\theta \right ) & =D_{0}+\sum _{n=1}^{\infty }A_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \cos \left ( n\theta \right ) +\sum _{n=1}^{\infty }B_{n}\left ( r^{n}+\frac{a^{2n}}{r^{n}}\right ) \sin \left ( n\theta \right ) \\ D_{0} & =\frac{1}{2\pi }\int _{-\pi }^{\pi }g\left ( \theta \right ) d\theta \\ A_{n} & =\frac{1}{\pi }\frac{\int _{-\pi }^{\pi }g\left ( \theta \right ) \cos \left ( n\theta \right ) d\theta }{b^{n}+\frac{a^{2n}}{b^{n}}}\\ B_{n} & =\frac{1}{\pi }\frac{\int _{-\pi }^{\pi }g\left ( \theta \right ) \sin \left ( n\theta \right ) d\theta }{b^{n}+\frac{a^{2n}}{b^{n}}} \end{align*}

_______________________________________________________________________________________

#### 12.3 Laplace PDE inside circular annulus, Neumann boundary conditions using unspeciﬁed functions (Haberman 2.5.8 (b))

problem number 105

This is problem 2.5.8 part (b) from Richard Haberman applied partial diﬀerential equations, 5th edition

Solve Laplace equation $\frac{\partial ^2 u}{\partial r^2} + \frac{1}{r }\frac{\partial u}{\partial r} + \frac{1}{r^2} \frac{\partial ^2 u}{\partial \theta ^2} =0$

Inside circular annulus $$a<r<b$$ subject to the following boundary conditions

\begin{align*} \frac{\partial u}{\partial r}(a,\theta ) &= 0 \\ u(b,0) &= g(\theta ) \end{align*}

Mathematica

$\text{DSolve}\left [\left \{\frac{u^{(0,2)}(r,\theta )}{r^2}+\frac{u^{(1,0)}(r,\theta )}{r}+u^{(2,0)}(r,\theta )=0,\left \{u^{(1,0)}(a,\theta )=0,u(b,\theta )=g(\theta )\right \}\right \},u(r,\theta ),\{r,\theta \},\text{Assumptions}\to a<r\leq b\right ]$

Maple

$u \left ( r,\theta \right ) ={\it invfourier} \left ({\frac{{\it fourier} \left ( g \left ( \theta \right ) ,\theta ,s \right ){{\rm e}^{-s \left ( \ln \left ( b \right ) -\ln \left ( r \right ) \right ) }}}{{{\rm e}^{2\, \left ( \ln \left ( a \right ) -\ln \left ( b \right ) \right ) s}}+1}},s,\theta \right ) +{\it invfourier} \left ({\frac{{\it fourier} \left ( g \left ( \theta \right ) ,\theta ,s \right ){{\rm e}^{s \left ( 2\,\ln \left ( a \right ) -\ln \left ( b \right ) -\ln \left ( r \right ) \right ) }}}{{{\rm e}^{2\, \left ( \ln \left ( a \right ) -\ln \left ( b \right ) \right ) s}}+1}},s,\theta \right )$ But has unresolved Invfourier and Fourier calls

_______________________________________________________________________________________

#### 12.4 Laplace PDE inside circular annulus, Dirichlet boundary conditions using speciﬁed functions

problem number 106

Solve Laplace equation $\frac{\partial ^2 u}{\partial r^2} + \frac{1}{r }\frac{\partial u}{\partial r} + \frac{1}{r^2} \frac{\partial ^2 u}{\partial \theta ^2} =0$

Inside circular annulus $$1<r<2$$ subject to the following boundary conditions

\begin{align*} u(1,\theta ) &= 0 \\ u(2,\theta ) &= \sin \theta \end{align*}

Mathematica

$\left \{\left \{u(r,\theta )\to \begin{array}{cc} \{ & \begin{array}{cc} \frac{2 \left (r^2-1\right ) \sin (\theta )}{3 r} & 1\leq r\leq 2 \\ \text{Indeterminate} & \text{True} \\\end{array} \\\end{array}\right \}\right \}$

Maple

$u \left ( r,\theta \right ) =2/3\,{\frac{\sin \left ( \theta \right ) \left ({r}^{2}-1 \right ) }{r}}$

_______________________________________________________________________________________

#### 12.5 Laplace PDE outside a disk, periodic boundary conditions

problem number 107

Solve Laplace equation in polar coordinates outside a disk

Solve for $$u\left ( r,\theta \right )$$

\begin{align*} \frac{\partial ^{2}u}{\partial r^{2}}+\frac{1}{r}\frac{\partial u}{\partial r} +\frac{1}{r^{2}}\frac{\partial ^{2}u}{\partial \theta ^{2}} & =0\\ a & \leq r \\ 0 & <\theta \leq 2\pi \end{align*}

Boundary conditions

\begin{align*} u\left ( a,\theta \right ) & =f\left ( \theta \right ) \\ \left \vert u\left ( 0,\theta \right ) \right \vert & <\infty \\ u\left ( r,0\right ) & =u\left ( r,2\pi \right ) \\ \frac{\partial u}{\partial \theta }\left ( r,0\right ) & =\frac{\partial u}{\partial \theta }\left ( r,2\pi \right ) \end{align*}

Mathematica

$\text{DSolve}\left [\left \{\frac{u^{(0,2)}(r,\theta )}{r^2}+\frac{u^{(1,0)}(r,\theta )}{r}+u^{(2,0)}(r,\theta )=0,\left \{u(a,\theta )=f(\theta ),u(r,-\pi )=u(r,\pi ),u^{(0,1)}(r,-\pi )=u^{(0,1)}(r,\pi )\right \}\right \},u(r,\theta ),\{r,\theta \},\text{Assumptions}\to \{a>0,r>a\}\right ]$

Maple

$u \left ( r,\theta \right ) =1/2\,{\frac{1}{\pi } \left ( 2\,\sum _{n=1}^{\infty } \left ({\frac{\int _{-\pi }^{\pi }\!\sin \left ( n\theta \right ) f \left ( \theta \right ) \,{\rm d}\theta \sin \left ( n\theta \right ) +\int _{-\pi }^{\pi }\!f \left ( \theta \right ) \cos \left ( n\theta \right ) \,{\rm d}\theta \cos \left ( n\theta \right ) }{\pi } \left ({\frac{r}{a}} \right ) ^{-n}} \right ) \pi +\int _{-\pi }^{\pi }\!f \left ( \theta \right ) \,{\rm d}\theta \right ) }$