Show that $\frac{1}{2\pi}\int_0^{2\pi} |f(re^{it})|^2\,dt=\sum\limits_{n=0}^\infty |a_n|^2 r^{2n}$

Suppose $f(z)=\sum\limits_{n=0}^\infty a_nz^n$ on $D_R(0)$, $R>0$ (i.e. series converges on this disk), and $0\leq r<R$. Show that $$\dfrac{1}{2\pi}\int_0^{2\pi} |f(re^{it})|^2\,dt=\sum\limits_{n=0}^\infty |a_n|^2 r^{2n}$$

Proof: \begin{equation*} \begin{aligned} \dfrac{1}{2\pi}\int_0^{2\pi} |f(re^{it})|^2\,dt & = \dfrac{1}{2\pi}\int_0^{2\pi} \left|\sum\limits_{n=0}^\infty a_n(re^{it})^n\right|^2\,dt \\ & = \dfrac{1}{2\pi}\int_0^{2\pi} \left|\sum\limits_{n=0}^\infty a_nr^ne^{itn}\right|^2\,dt \\ & = \dfrac{1}{2\pi}\int_0^{2\pi} \sum\limits_{n=0}^\infty |a_n|^2\cdot |r^n|^2 \cdot |e^{itn}|^2\,dt \\ & = \dfrac{1}{2\pi}\sum\limits_{n=0}^\infty |a_n|^2\cdot r^{2n} \int_0^{2\pi} \,dt \\ & = \dfrac{1}{2\pi}\sum\limits_{n=0}^\infty |a_n|^2\cdot r^{2n} \cdot 2\pi \\ & = \sum\limits_{n=0}^\infty |a_n|^2 r^{2n} \\ \end{aligned} \end{equation*}

I know that I jumped the gun from lines 2 and 3. Is there a way to justified what I did or is there any addition steps I need to take?

• Yes, use $|z|^2 = \overline{z} z$ and get a double summation. Many of the products are orthogonal and so integrate out. – copper.hat Feb 14 '18 at 5:12