Laplace's equation in polar coords Question: Suppose that the function u(r, $\phi$) satisfies Laplace’s equation for plane polar co-ordinates (r, $\phi$) i.e.
$$ ∇^2u = \frac{1}{r} \frac{∂}{∂r}(\frac{r∂u}{∂r}) + \frac{1}{r^2}\frac{∂^2u}{∂\phi^2} = 0 $$
￼￼￼￼Writing u(r,$\phi$) = P(r)Q($\phi$), show that the most general solution that is a bounded solution in this region and that satisfies u(r, 0) = u(r, π/2) = 0 for all r > a is
$$
u(r,\phi) = \sum_{k=1}^∞ A_kr^{−2k} sin2k\phi.
$$
Hence find the unique solution in this region that satisfies the above conditions, $u(a, \phi) = u_0$ for $0<\phi<π/4$ and  $u(a,\phi)=−u_0$ for $π/4<\phi<π/2, $
where $u_0$ is a constant.
Now, I'm able to show the first part by going through the various steps and ending up with the general solution in the form
$$
u(r,\phi) = a_o + b_0lnr + \sum_{n=1}^∞ (A_nr^n + B_nr^{-n})(C_ncos(n\phi)+D_nsin(n\phi))
$$
After applying boundary conditions $u(r, 0) = 0$, I end up with $a_0 = b_0 = 0$ and $C_n = 0$ leaving
$$
u(r,\phi) = \sum_{n=1}^∞ (A_nr^n + B_nr^{-n})D_nsin(n\phi)
$$
Applying $u(r, π) = 0$, I find that $r^n\to\infty$ in the expansion, so therefore $A_n = 0$. Further, $sin(\frac{nπ}{2}) = 0$ when $ n = 2k$. Letting $A_k = B_k D_k$, we have
$$
u(r,\phi) = \sum_{k=1}^∞ A_kr^{-2k}sin(2k\phi)
$$
However, with the second part, i.e. finding the unique solution, would I be correct in finding $A_k$ separately for $ 0 < \phi < π/4 $ and $ π/4 < \phi < π/2 $ by using Fourier sine series, or would I be better off (still using Fourier) integrating from 0 to π/2? I'm also not quite sure what to use as f(x) when integrating.
 A: The functions
$$
  \sin 2\phi,\; \sin 4\phi,\; \sin 8\phi,\; \ldots,\; \sin 2n\phi,\;\ldots
$$
are the unique eigenfunctions of the $L^{2}[0,\pi/2]$ Sturm-Liouville problem
$$
       -\frac{d^{2}}{d\phi^{2}}f = \lambda f, \;\;\; f(0)=f(\pi/2) = 0.
$$
As such, these functions automatically form a complete orthogonal set of functions in $L^{2}[0,\pi/2]$. Because of this, you'll be able to satisfy an arbitrary condition at $r=a$:
$$
         \sum_{n=1}^{\infty} A_{n}a^{-2n}\sin 2n\phi=\left\{\begin{array}{cc}u_{0} & 0 < \phi < \phi/4, \\ -u_{0} & \pi/4 < \phi < \pi/2\end{array}.\right.
$$
Furthermore, by orthogonality of these eigenfunctions on $[0,\pi/2]$,
$$
       A_{n}a^{-2n}\frac{\pi}{4} = A_{n}a^{-2n}\int_{0}^{\pi/2}\sin^{2}2n\phi\,d\phi = u_{0}\int_{0}^{\pi/4}\sin 2n\phi\,d\phi-u_{0}\int_{\pi/4}^{\pi/2}\sin 2n\phi\,d\phi.
$$
In this case, the eigenvalues $\lambda=2^{2},4^{2},6^{2},\ldots$ of the Sturm-Liouville problem on $[0,\pi/2]$ dictates the powers $1/r^{2},1/r^{4},1/r^{6},\ldots$, as well as the orthogonal eigenfunction expansion. More explicitly, if
$$    
u(r,\phi) = \sum_{k=1}^{\infty}A_{k}r^{2k}\sin 2k\phi,
$$
and $u(a, \phi)$ is known (as it is here) for $0\le \phi \le \pi/2$, then the automatic orthogonality of the eigenfunctions of the polar equation leads to
$$
    \int_{0}^{\pi/2}u(a,\phi)\sin 2n\phi d\phi = \sum_{k=1}^{\infty}A_{k}a^{2k}\int_{0}^{\pi/2}\sin 2k\phi \sin 2n\phi d\phi = A_{n}a^{2n}\int_{0}^{\pi/2}\sin^{2}2n\phi d\phi
$$
for all $n \ge 1$. The series at $r=a$ converges to the desired function except at $0,\pi/4,\pi/2$, where it converges to $0$.  
