General solution for \eqref{4-1} is, due to boundary condition and consideration of regularity at zero,
\begin{equation}\label{4-4}
u=\frac{1}{2} A_0+
\sum_n r^n\Bigl( A_n\cos n\theta \Bigr).\end{equation}
Plugging in \eqref{4-3} and using even continuation
\begin{equation}\begin{split}
9^n A_n&=\frac{2}{\pi}\int_0^\pi (\pi-\theta)\cos n\theta\,d\theta
=\frac{2}{\pi}\int_0^\pi\theta'\cos n(\theta'-\pi)\,d\theta'\\
&=\frac{2}{n\pi}\int_0^\pi\sin n(\theta'-\pi)\,d\theta'\\
&=\left\{\begin{split}&0&& \text{ n even},\\ &\frac{4}{\pi n^2}&& \text{ n odd.}\end{split}\right.
\end{split}\label{4-5}\end{equation}
Combining \eqref{4-4}, \eqref{4-5}:
$$u=\frac{4}{\pi}\sum_k \Bigl(\frac{r}{9}\Bigr)^{2k+1} \frac{\cos(2k+1)\theta}{(2k+1)^2}.$$