(H.Priestley Exercise 5.7)
Let $f \in H(D(0,R))$ and $f=\sum_{n=0}^{\infty} c_{n} z^n$
Using the integral formula for $c_n$ and the fact that $\int_\gamma f(z)z^{n-1}dz=0 \quad\forall n\ge1$
Show that $$c_n=\frac{r^{-n}}{\pi} \int_0^{2\pi}Re[f(re^{i\theta})]e^{-in\theta}d\theta$$
I have tried this:
$\frac{1}{(1-x)^2}=\sum_{k=0}^{\infty}(k+1)x^k$
so on $\gamma(1,r)$ (?? as maybe f is not holomorphic there)
$\int_{\gamma(1,r)} \frac{f(z)}{(1-z)^{2}}=\int f(z) (\sum_{k=0}^{\infty}(k+1)z^k)dz=\sum_{k=0}^{\infty} (k+1)\int_{\gamma(1,r)}f(z)z^{k}dz = 0 ??$
and also =$ \sum_{n,k=0,}^{\infty} (k+1) \int c_n z^{n+k} dz=\sum_{n,k=0,}^{\infty} (k+1) \int\int \frac{1}{2i\pi} \frac {f(w)}{w^{n+1}}z^{n+k}dwdz??$
at which point I get confused ...
First of all, we can choose $\gamma$ to be parametrized by $re^{i\theta}$ for $\theta \in [0,2\pi]$. So We know that \begin{align} c_n &= \frac{1}{2\pi i} \int_\gamma \frac{f(z)}{z^{n+1}}\,dz\\ &=\frac{1}{2\pi i} \int_0^{2\pi} \frac{f(re^{i\theta})}{(re^{i\theta})^{n+1}}ire^{i\theta}\,d\theta\\ &= \frac{r^{-n}}{2\pi} \int_0^{2\pi} f(re^{i\theta})e^{-in\theta}\,d\theta \end{align} just by expanding the definition of contour integral and doing some basic manipulation. We're already kinda close.
Based on the hint, we have \begin{align} 0&= \int_\gamma f(z)z^{n-1}\,dz\\ &= \int_0^{2\pi}f(re^{i\theta})r^{n-1}e^{(n-1)i\theta}ire^{i\theta}\,d\theta\\ &=\frac{r^{-n}}{2\pi}\int_0^{2\pi}f(re^{i\theta})e^{ni\theta}\,d\theta \end{align} because we can multiply by whatever constants we want as the whole integral is 0. Now, conjugation is continuous and linear, so it passes through integrals. It also leaves the real values alone. So we have $$ 0= \frac{r^{-n}}{2\pi}\int_0^{2\pi}\overline{f(re^{i\theta})}e^{-ni\theta}\,d\theta $$
So we can add this to the other integral without changing its value. After some factoring, we get $$ \frac{r^{-n}}{2\pi} \int_0^{2\pi} \Big(f(re^{i\theta}) + \overline{f(re^{i\theta})}\Big)e^{-in\theta}\,d\theta=\frac{r^{-n}}{2\pi} \int_0^{2\pi} 2\text{Re}[f(re^{i\theta})]e^{-in\theta}\,d\theta $$
So in conclusion, we have $$ c_n = \frac{r^{-n}}{\pi} \int_0^{2\pi} \text{Re}[f(re^{i\theta})]e^{-in\theta}\,d\theta $$