Find the solution of $$\Delta u = u_{rr} + \frac{1}{r}u_r + \frac{1}{r^2}u_{\theta\theta} = 0$$ for $1 \leq r \leq 2, 0 \leq \theta \leq \pi/2$ where the boundary conditions are as follows:
$$u(r,0)=u(r,\pi/2) = 0$$ $$u(1,\theta) = 0, u(2,\theta) = \sin(3\theta)$$
Hopefully someone can complete the last step for me because i have some trouble finding the coefficient $A_n$. The solution integrated some terms but i am a bit lost. Help would be appreciated to explain.
Let $u(r,\theta) = f(r)g(\theta)$. Substitute
\begin{align} &\qquad f''g + \frac{1}{r} f'g + \frac{1}{r^2}fg'' = 0 \\ &\implies (r^2f'' + rf')g = -fg'' \\ &\implies -\frac{g''}{g} = \frac{r^2f'' + rf'}{f} = \lambda \end{align}
Solve $g'' = -\lambda g$ first to get $$ g(\theta) = A\sin \big(\sqrt{\lambda} \theta\big) + B\cos\big(\sqrt{\lambda}\theta\big) $$
Using boundary conditions $$ g(0) = B = 0 \implies g(\theta) = A\sin\big(\sqrt{\lambda}\theta\big) $$ $$ g\left(\frac{\pi}{2}\right) = A\sin\left(\sqrt{\lambda}\frac{\pi}{2}\right) = 0 \implies \sqrt{\lambda}\frac{\pi}{2} = n\pi \implies \lambda = 4n^2 $$ $$ \therefore g_n(\theta) = A_n\sin(2n\theta), \quad n = 1,2,\dots $$
Now solve $$ r^2f'' + rf' - 4n^2f = 0 $$
By Euler's equation $$ f_n(r) = C_n r^{2n} + D_n r^{-2n} $$ $$ f(1) = 0 \implies C_n + D_n = 0 \implies C_n = -D_n $$ $$ \therefore u(r,\theta) = \sum_{n=1}^{\infty} A_n (r^{2n}-r^{-2n})\sin(2n\theta) $$
Using the homogeneous B.C $$ u(2,\theta) = \sum_{n=1}^{\infty} A_n (2^{2n} - 2^{-2n})\sin(2n\theta) $$
$A_n = ?$
Sidenote: Thanks to Dylan as he is the one who typed out the whole pde solution of mine in latex
Here's the last step
$$ \sin(3\theta) = \sum_{n=1}^{\infty}A_n (2^{2n}-2^{-2n})\sin(2n\theta) $$
$A_n(2^{2n}-2^{-2n}) = c_n$ is just a coefficient of the Fourier (even) sine series of $\sin(3\theta)$. You can proceed just like any other Fourier series.
\begin{align} A_n(2^{2n}-2^{-2n}) &= \frac{2}{\pi/2}\int_0^{\pi/2} \sin(3\theta) \sin(2n\theta) d\theta \\ &= \frac{2}{\pi} \int_0^{\pi/2}\cos\big((2n-3)\theta\big) - \cos\big((2n+3)\theta\big)\ d\theta \\ &= \frac{2}{\pi} \left[\frac{\sin\big((2n-3)\frac{\pi}{2}\big)}{2n-3} - \frac{\sin\big((2n+3)\frac{\pi}{2}\big)}{2n+3} \right] \\ &= \frac{2}{\pi} \left[ \frac{(-1)^n}{2n-3} + \frac{(-1)^n}{2n+3} \right] \end{align}