How to solve explicitly the Dirichlet problem (in dimension 2) with boundary data $f(e^{i\theta}) := ( \sin(\theta) - \cos(2\theta))^2$ 
Solve explicitly the Dirichlet problem on the unit ball $B_1(0) \subseteq \mathbb{R}^2$
\begin{cases}
\Delta u = 0 \\
u|_{\partial B_1(0)} = f 
\end{cases}
with $f(e^{i\theta}) := ( \sin(\theta) - \cos(2\theta))^2$

Using the theorem I studied, the solution inside the unit ball is of the form
$$u(re^{i\phi})=\frac{1}{2\pi} \int_0^{2\pi} \frac{1-r^2}{1-2r\cos({\theta - \phi}) + r^2} \ f(e^{i\theta})d\theta$$
so I need to evaluate the following integral:
$$\int_0^{2\pi} \frac{( \sin(\theta) - \cos(2\theta))^2}{1-2r\cos({\theta - \phi}) + r^2} \ d\theta$$
I would appreciate any hint or other ways to solve this problem.
 A: In this situation, it is easier to deal with the following expression for the Poisson Kernel:
$$P_r(\vartheta)=\sum_\mathbb Z e^{in\vartheta}r^{|n|}$$
Using this, and
$$u(re^{i\phi})=\frac{1}{2\pi}\int_0^{2\pi} P_r(\phi-\vartheta)f(e^{i\vartheta})$$
The result follows easily:
$$u(re^{i\phi})=\sum_\mathbb{Z} \left(\frac{1}{2\pi}\int_0^{2\pi}f(e^{i\vartheta})e^{-in\vartheta}d\vartheta\right)r^{|n|}e^{in\phi}$$
It is not hard to see that
$$f(e^{i\phi})=1+\sin(\phi)-\frac12\cos(2\phi)-\sin(3\phi)+\frac12\cos(4\phi)$$
Splitting real and immaginary part we get (since $u$ is real):
$$u(re^\phi)=\frac{1}{2\pi}\int_0^{2\pi}f(e^{i \vartheta})d\vartheta+ \sum_0^\infty
 \left(\frac{1}{\pi}\int_0^{2\pi}f(e^{i\vartheta})\cos(n\vartheta)d\vartheta\right)r^n\cos(n\phi)+
\sum_{n=1}^\infty \left(\frac{1}{\pi}\int_{n=1}^{2\pi}f(e^{i\vartheta})\sin(n\vartheta)d\vartheta\right)r^n\sin(n\phi)$$
Using the usual orthogonality relations between $\sin(nx),\cos(mx)$, one gets
$$u(re^{i\phi})=1+r\sin(\phi)-\frac12r^2\cos(2\phi)-r^2\sin(3\phi)+r^4\frac12\cos(4\phi)$$
