Solving the Laplace equation in polar coodinates

harmonic functionspartial differential equationssolution-verification

So, I have the Laplace equation to solve in polar coordinates. I have the following details:

\begin{equation}
\Delta u=0
\end{equation}

with boundary conditions

\begin{cases}
u(r,0)=u(r,\pi/2)=0\\
u(1,\theta)=-\frac{2\theta}{\pi}\\
\end{cases}

and $r, \theta$ are in the domain $\Omega := (0, 1) \times \Big(0, \frac\pi 2 \Big)$.

We start by setting up the equation in differentials.
Make a seperation of variables Ansatz $u = R\Theta, R=R(r) \neq R(\theta), \Theta = \Theta(\theta) \neq \Theta(r)$ and use the definition of the Laplacian in polar coordinates in the plane:

\begin{equation}
\left(\frac{\partial^2}{\partial r^2}+\frac{1}{r}\frac{\partial}{\partial r}+\frac{1}{r^2}\frac{\partial^2}{\partial\theta^2}\right)R\Theta=0
\end{equation}

We rearrange

\begin{align}
\left(\frac{\partial^2}{\partial r^2}+\frac{1}{r}\frac{\partial}{\partial r}\right)R\Theta+\frac{1}{r^2}\frac{\partial^2}{\partial\theta^2}R\Theta&=0 \\
\Theta\left(\frac{\partial^2}{\partial r^2}+\frac{1}{r}\frac{\partial}{\partial r}\right)R+R\frac{1}{r^2}\frac{\partial^2}{\partial\theta^2}\Theta&=0
\end{align}

and multiply by $r^2$
$$
\Theta\left(r^2\frac{\partial^2}{\partial r^2}+r\frac{\partial}{\partial r}\right)R+R\frac{\partial^2}{\partial\theta^2}\Theta=0
$$

divide by $R \Theta$
\begin{equation}
\left(\frac{r^2\frac{\partial^2R}{\partial r^2}+r\frac{\partial R}{\partial r}}{R}\right) + \frac{\frac{\partial^2\Theta}{\partial\theta^2}}{\Theta}= 0.
\end{equation}

Since this has to hold $\forall \: r, \theta$, but $R, \Theta$ are independent of the "other" coordinate, both summands have to be constant:
$$
\left(\frac{r^2\frac{\partial^2R}{\partial r^2}+r\frac{\partial R}{\partial r}}{R}\right)=-\frac{\frac{\partial^2\Theta}{\partial\theta^2}}{\Theta}=k^2
$$

This gives two ODEs:

\begin{equation}
\begin{array}
fr^2R''+rR'-k^2R=0 \\
\Theta''+k^2\Theta=0
\end{array}
\end{equation}

We solve the first:

\begin{equation}
\begin{array}
fr^2R''+rR'-k^2R=0 \\
R''+\frac{1}{r}R'-\frac{k^2}{r^2}R=0
\end{array}
\end{equation}

We follow this earlier post of mine to solve this Euler-Laplace equation and obtain it solutions:

\begin{equation}
R_1(r)=r^{\pm k} \wedge R_2(r)=r^{\pm k}\ln r
\end{equation}

For the second, we solve it using the characteristic determinant

\begin{equation}
\begin{array}
f\Theta''+k^2\Theta=0\\
m=\pm\frac{1}{2}\sqrt{-4k^2}\rightarrow m=\pm ik
\end{array}
\end{equation}

This gives the solution to the second ODE:

$$
f\Theta(\theta)=Ae^{ik}+Be^{-ik}
$$

To comply with the boundary condition $u(r, 0) = u (r, \pi/2) = 0$ there are no cosine terms, thus:
$$
\Theta(\theta)=A \sin(ik\theta)
$$

Since $u=R\Theta$ we combine the two and get:

\begin{equation}
u(r,\theta)=(r^{\pm k} +r^{\pm k}\ln r )A \sin(ik\theta)
\end{equation}

Using boundary condition $u(r, 0) = u (r, \pi/2) = 0$ I get, disregarding for the radial part of the function (can one do that?)

\begin{equation}
\begin{array}
aA \sin(ik\pi/2)=0\\
ik\pi/2=n\pi \\
k=\frac{2n}{i}
\end{array}
\end{equation}

Proceeding to the second B.C. $u(1,\theta)=-\frac{2\theta}{\pi}$

\begin{equation}
\begin{array}
aA\sin(2n\theta)\big(r^{2n/i}+r^{2n/i}\ln r\big)=-\frac{2\theta}{\pi}\\
A=-\frac{2 r^{2 i n}\theta \csc(2 n \theta)}{\pi}
\end{array}
\end{equation}

This gives the final solution:

\begin{equation}
u(r,\theta)=-\frac{2}{\pi}\big(r^{2 i n}\theta \sin(2n\theta)\csc(2 n \theta)\big)(r^{\pm \frac{2n}{i}} +r^{\pm \frac{2n}{i}}\ln r )
\end{equation}

and it looks like this:

enter image description here

But this solution does not agree with the examinators' solution:

$u(r,\theta)=\frac{2}{\pi}\sum_{k=1}^\infty\frac{(-1)^k}{k}r^{2k}\sin(2k\theta)$

Is there an error here, that the readers can see?

Thanks

Best Answer

Essentially bundling @mattos comments into an answer, we have to solve the two ODEs carefully.

Let's consider the ODE for $R$ first. As observed, it is the classic second order Cauchy-Euler equation. Following the procedure outlined in the Wikipedia article, you find that for the Ansatz $R(r) = r^m$ you get the indicial equation $$m^2 -k^2 = 0$$ with the obvious roots $m = \pm k$. In this case, the solution is $$R(r) = c_1 r^{-k} + c_2 r^k.$$ Although it is not directly mentioned in the task, you probably want a bounded solution, especially for $r \to 0$, thus you set $c_1 = 0$. This assumes that $k>0$, the case $k <0$ is symmetric (then, $c_2 = 0$). See below why the distinction into $k < 0$ or $k>0$ is valid in general and does not lead to loss of generality.

Now the second ODE: By inspection / knowledge of the eigenfunctions of the Laplacian / properties of $\sin, \cos$ it is immediately clear that $$\Theta '' = -k^2\theta$$ is solved by the Ansatz $$\Theta(\theta) = c_3 \sin(k\theta) + c_4 \cos(k \theta).$$ As you already mentioned, the cosine drops out because of the boundary condition $u(r, 0) \overset{!}{=} 0$ i.e., $c_4 = 0$. The second boundary condition in $\theta$, $u(r, \pi/2) \overset{!}{=} 0$ gives not directly a restriction for $c_3$, but instead for the yet unspecified constant $k$. For $\sin(k \pi/2) = 0$ to be fulfilled, you need that $k = 2 \cdot i , i \in \mathbb Z$ ($i$ is here not the complex unit). This brings us basically to the last comment by @mattos:

\begin{align} k &= 2 i\\ R(r) &=c_2 r^{2i} \\ \Theta(\theta) &= c_3 \sin(2i\theta) \end{align} Because of the product form $u(r, \theta) = R(r) \Theta(\theta)$ you can bundle the remaining constants $c_2, c_3$ into one: $$u(r, \theta) = \underbrace{\tilde c_i}_{=c_2 \cdot c_3} r^{2i} \sin(2i\theta). $$

The general solution is then a linear (the Laplace equation is linear) combination of the above: $$ u(r, \theta) = \sum_{i=-\infty}^{\infty} \tilde c_i r^{2i} \sin(2i\theta). $$ Since $\sin(-x) = -\sin(x)$ we can restrict ourselves to $i \in \mathbb N_0$ and define $$c_i := \tilde c_i - \tilde c_{-i}.$$ This is equivalent to the previous mentioned distinction for $k>0$ (our choice) or the symmetric case with $k < 0$. Furthermore, we should rule out $i=0$ since this corresponds to the trivial solution which also cannot satisfy the boundary condition $$u(1, \theta) \overset{!}{=} -\frac{2\theta}{\pi}.$$

Thus we have $$ u(r, \theta) = \sum_{i=1}^{\infty} c_i r^{2i} \sin(2i\theta). $$

Now it gets a slightly more involved again. The boundary condition $u(1, \theta) \overset{!}{=} -\frac{2\theta}{\pi}$ determines the unknown coefficients $c_i$ through $$ u(r=1, \theta) = \sum_{i=1}^{\infty} c_i \sin(2i\theta). $$ Now comes the trick: Since the $\sin(2i \theta)$ are orthogonal, it holds that $$ \int_0^{\pi/2} \sin(2i\theta) \sin(2j\theta) \mathrm d \theta = \frac{\pi}{4} \delta_{ij}$$ with $\delta_{ij}$ being the Kronecker delta. This is extremely helpful: To get the $c_i$'th coefficient, you multiply $$u(r=1, \theta) = \sum_{i=1}^{\infty} c_i \sin(2i\theta) = -\frac{2\theta}{\pi} $$ with $\sin(2i\theta)$ and integrate $\theta$ from $0$ to $\pi/2$ which "singles out" $c_i \cdot \frac{\pi}{4} $ on the LHS: \begin{align} c_i \cdot \frac{\pi}{4} &= \int_0^{\pi/2} -\frac{2\theta}{\pi} \sin(2i\theta) \mathrm d \theta \\ \Leftrightarrow c_i&= - \frac{8}{\pi^2} \int_0^{\pi/2} \theta \sin(2i\theta) \mathrm d \theta \\ \Leftrightarrow c_i&= - \frac{8}{\pi^2} \Bigg[ \frac{\sin(2i\theta) - 2i \theta \cos(2i\theta) }{(2i)^2} \Bigg]_0^{\pi/2} \\ \Leftrightarrow c_i&= - \frac{2}{(i\pi)^2 } \bigg( 0 - 2i \pi/2 (-1)^i - \Big( 0 - 0 \cdot 1) \bigg) \\ \Leftrightarrow c_i&= \frac{2(-1)^i}{i \pi} \end{align}

and thus finally $$ u(r, \theta) = \frac{2}{\pi} \sum_{i=1}^{\infty} \frac{(-1)^i}{i} r^{2i} \sin(2i\theta). $$