Complex analysis integration question Let $f(z) = A_0 + A_1z + A_2z^2 + \ldots + A_nz^n$ be a complex polynomial of degree $n > 0$.
Show that $\frac{1}{2\pi i} \int\limits_{|z|=R} \! z^{n-1} |f(z)|^2 dz = A_0 \bar{A_n}R^{2n}$.
 A: Denote by $\bar f$ the polynomial obtained from $f$ by conjugating its coefficients $A_k$. When $|z|^2=z\bar z=R^2$ then
$$|f(z)|^2=f(z)\,\overline{f(z)}=f(z)\bar f(\bar z)=f(z)\bar f\Bigl({R^2\over z}\Bigr)\ .$$
Now
$$z^{n-1}\bar f\Bigl({R^2\over z}\Bigr)=\bar A_n{R^{2n}\over z} + q(z)\ ,$$
where $q$ is a certain polynomial. It follows that
$${1\over2\pi i}\int\nolimits_{\partial D_R} z^{n-1}|f(z)|^2\ dz={1\over2\pi i}\int\nolimits_{\partial D_R} f(z)\Bigl(\bar A_n{R^{2n}\over z} + q(z)\Bigr)\ dz=A_0\bar A_n R^{2n}\ ,$$
because $f(z)=A_0+ z\, p(z)$ for some polynomial $p$.
A: Let $\Gamma = \{z: |z| = R\}$. Recall that
$$ \int_{\Gamma} z^k \, dz = \begin{cases} 0 & k \neq -1 \\ 2\pi i & k = -1 \end{cases}$$
Now, when we multiply out $|f(z)|^2$ in terms of $z$ and $\overline{z}$, we are ultimately evaluating an integral of the following form:
$$ \frac{1}{2\pi i} \int_{\Gamma} \sum_j B_j z^{p_j} \overline{z}^{k_j} \, dz = \frac{1}{2\pi i} \int_{\Gamma} \sum_j B_j z^{p_j-k_j} R^{2k_j} \, dz$$
for some powers $p_j, k_j$. Then, since we know that $z^k$ integrates to $0$ unless $k = -1$, then we require that $p_j - k_j = -1$. Since the whole integrand is multiplied by $z^{n-1}$ originally, then it must be that $p_j = 0, k_j = n$, so the only term that does not vanish is the one that has the term that was formed from multiplied the $A_0$ term with the $\overline{A}_n\overline{z}^n$ term. Therefore, in summary,
$$ \frac{1}{2\pi i} \int_{\Gamma} z^{n-1} |f(z)|^2 \, dz = \frac{1}{2\pi i} \int_{\Gamma} A_0\overline{A}_n R^{2n} z^{-1} \, dz$$
which evaluates to your desired result.
