Prove that $\frac{1}{2\pi}\int_0^{2\pi}{|f(re^{i\theta})|^2}d\theta=\sum_{n=0}^{\infty}{|a_n|^2r^{2n}}$ I don't know where to start with this one:

Let $f(z)=\sum_{n=0}^{\infty}{a_nz^n}$ be a series with radius of convergence $1$.
a) Prove that $\frac{1}{2\pi}\int_0^{2\pi}{|f(re^{i\theta})|^2}d\theta=\sum_{n=0}^{\infty}{|a_n|^2r^{2n}}$ for all $0<r<1$.

If I plug the $f(z)$ expression into the integral, I have the square of a sum and I don't know if it's the easiest way to solve it. I'd appreciate any hint.
Thanks for your time.
 A: Apply this for $r < 1$ and $\theta\in\mathbb{R}$.
$$|f(re^{i\theta}|^2 = \sum_{n=0}^\infty\sum_{m=0}^\infty
a_m\overline{a_n}r^{m+n} e^{im\theta} e^{-in\theta}.$$
A: Plancherel's Theorem is one option. 
Start with
\begin{align*}
f(re^{i\theta}) = \sum_{n} a_n r^n e^{i n\theta}
\end{align*}
For $r < 1$, the series converges uniformly on $[-\pi,\pi]$. Therefore you can integrate term by term to get 
$$
\frac{1}{2\pi} \int_{-\pi}^{\pi} f(re^{i\theta}) e^{-i n' \theta} d\theta = \sum_n a_n r^n \frac{1}{2\pi} \int_{-\pi}^{\pi} e^{-i n' \theta} e^{i n \theta} d\theta = a_{n'} r^{n'}
$$
because the last integral is zero unless $n=n'$, in which case it equals 1. 
So we have
$$
a_n r^n = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(re^{i\theta}) e^{-i n \theta} d\theta = \frac{1}{2\pi} \int_{-\pi}^{\pi} g(\theta) e^{-i n \theta} d\theta = \widehat{g}(n)
$$
where $g(\theta)=f(re^{i\theta})$. 
Now Plancherel gives 
\begin{align*}
\sum_n |a_n r^n|^2 = \sum_n |\widehat{g}(n)|^2 = \frac{1}{2\pi} \int_{-\pi}^{\pi} |g(\theta)|^2 d\theta = \frac{1}{2\pi} \int_{-\pi}^{\pi} |f(re^{i\theta})|^2 d\theta
\end{align*}
See also Rudin's book Real and Complex Analysis Theorem 10.22. 
