Let $\sum_{n\geq 0} a_n z^n$ be a power series with radius of convergence greater or equal to 1. Let $0<r<1$, show that for all $n \geq 1$, $$a_{n}=\frac{1}{\pi r^n}\int_{0}^{2\pi} Re(f(re^{i\theta}))e^{-ni\theta}d\theta$$.
I know that :
$$\int_{0}^{2\pi}f(re^{i\theta})e^{-ni\theta}d\theta=\int_{0}^{2\pi}(\sum_{p=0}^{+\infty}a_p r^p e^{i(p-n)\theta})d\theta=\sum_{p=0}^{+\infty}a_p r^p \int_{0}^{2\pi}e^{i(p-n)\theta}d\theta$$
as we can exchange the sum and the integral because $\sum_{p=0}^{+\infty}a_p r^p e^{i(p-n)\theta}$ is converges normally. Noticing that $\int_{0}^{2\pi}e^{i(p-n)\theta}d\theta =0 $ if $p\neq n$ and $2\pi$ if $p=n$, we obtain :
$$2\pi r^n a_n = \int_{0}^{2\pi}f(re^{i\theta})e^{-ni\theta}d\theta$$
Then I think i should make a change of variable $\alpha = 2\pi - \theta$ in this integral but I wasn't able to conclude.