Integral of holomorphic function as sum I have a function $f(z)$ which can be represented as a power series for any $z$ inside a disc of radius R $\left(\text{i.e, for any } z\in D(a,R)\right)$. I have to show that for $0\leq r<R$ it's true that
$$\int_0^{2\pi}\lvert f(a+re^{it})\lvert^2dt=2\pi\sum_{n=0}^\infty\lvert a_n \lvert^2r^{2n}$$
$\textbf{My guess:}$
As $f$ is representable as power series, I have tried:
$$\int_0^{2\pi}\lvert f(a+re^{it}) \lvert^2 \, dt = \int_0^{2\pi} \left\lvert\sum_{n=0}^\infty a_nr^ne^{itn} \right\lvert^2 \, dt =\cdots(\text{manipulating})\cdots=\sum_{n=0}^\infty \lvert a_n\lvert^2 r^{2n} \int_0^{2\pi}e^{2int} \, dt$$
But from that point on, whatever I try I do not manage to get the $2\pi$ to get it out of the sum. Maybe I am going in the right direction and I making mistakes, I do not know. I have tried to get $e^{2int}$ in the form of $sin$ and $cos$, but I still do not get it.
 A: Hint. $f(re^{i\theta}) \bar{f(re^{i\theta}})=|f(re^{i\theta})|^2$ . Τhen you use the power series of f inside the integral $$\int_{-\pi}^{\pi} \left( \sum_{n=0}^{\infty}a_n r^ne^{in\theta}\right)\left( \sum_{n=0}^{\infty}\bar{a_n} r^ne^{-in\theta}\right)d\theta$$  You multiply the normal series and its conjugate. That is $$\int_{0}^{2\pi} (a_0+a_1re^{i\theta}+a_2r^2e^{2i\theta}+...)(\bar{a_0}+\bar{a_1}re^{-i\theta}+\bar{a_2}r^2e^{-2i\theta}+...)d\theta $$ (Do the multiplication for the first 3 terms ) What you get is this: $$\int_{0}^{2\pi} \sum_{n=0}^{\infty} a_n \bar{a_n} r^n r^n e^{in\theta} e^{-in\theta} + \sum_{n=0}^{\infty} b_n r^ne^{i n\theta} d\theta$$ Now because the series converges uniformly in your disc you can change the order of summation and integration in the 1st integral which is $$\int_{0}^{2\pi} \sum_{n=0}^{\infty} |a_n|^2r^{2n}  d\theta$$  or $$\sum_{n=0}^{\infty} |a_n|^2r^{2n}\int_{0}^{2\pi}1 d\theta$$ which gives us $2\pi \sum_{n=0}^{\infty} |a_n|^2r^{2n} $. Now about the second integral ,which is $$\int_{0}^{2\pi} \sum_{n=0}^{\infty} b_nr^ne^{in\theta}$$ you just need to see that you integrate a $2\pi$ -periodic function over $[0,2\pi]$ so every integral is zero because of periodicity. These $b_n$ terms are nothing but combinations of $a_n$ terms multiplicated with $\bar{a_m}$ for $m\ne n$ . If you do the calculations for the 1st three terms you will see what happens and what remains is zero because of periodicity so you have the result. 
