As in problem three, we have a general solution (before imposing the boundary condition) given by

http://www.math.toronto.edu/courses/apm346h1/20159/PDE-textbook/Chapter6/S6.4.html#mjx-eqn-eq-6.4.10. Now we must differentiate this general solution in order to make use of the boundary conditions. This yields: \begin{equation}

u_r(r. \theta{}) = \sum_{n=1}^{\infty}nr^{n-1}(A_n\cos(n\theta{}) + C_n\sin(n\theta{})) \end{equation}

Evaluating this at a, as per the boundary condition: \begin{equation}

u_r(a, \theta{}) = \sum_{n=1}^{\infty}na^{n-1}(A_n\cos(n\theta{}) + C_n\sin(n\theta{})) = f(\theta) \end{equation}

Using the Fourier method, we find the forms of the coefficients to be: \begin{equation}

A_n = \frac{1}{\pi{}na^{n-1}}\int_0^{2\pi{}}f(\theta{}')\cos(n\theta{}')d\theta{}' = \frac{1}{\pi{}na^{n-1}}\Big[\int_0^{\pi{}}\cos(n\theta{}')d\theta{}' - \int_{\pi}^{2\pi{}}\cos(n\theta{}')d\theta{}'\Big] = 0 \end{equation}

and

\begin{equation}

C_n = \frac{1}{\pi{}na^{n-1}}\int_0^{2\pi{}}f(\theta{}')\sin(n\theta{}')d\theta{}' = \frac{1}{\pi{}na^{n-1}}\Big[\int_0^{\pi{}}\sin(n\theta{}')d\theta{}' - \int_{\pi}^{2\pi{}}\sin(n\theta{}')d\theta{}'\Big] \longrightarrow \end{equation} \begin{equation} = \frac{1}{\pi{}na^{n-1}}\Big[\frac{1-\cos(n\pi)}{n}-\frac{\cos(n\pi)-\cos(2n\pi)}{n}\Big]= \frac{1}{\pi{}na^{n-1}} \frac{2(1-\cos(n\pi{}))}{n}\end{equation}

So: \begin{equation}

C_n = \frac{2(1-\cos(n\pi{}))}{\pi{}n^{2}a^{n-1}}

\end{equation}

As in the previous problem, only terms with odd n survive. This results in: \begin{equation}

C_n = \frac{4}{\pi{}n^{2}a^{n-1}} \end{equation}

Now, plugging these coefficients back into the general solution, we arrive at the solution: \begin{equation}

u(r, \theta{}) = \frac{4}{\pi{}} \sum_{n \geq 1, odd} \frac{r^n\sin(n\theta{})}{n^{2}a^{n-1}} \end{equation}