I'm trying to solve this integral:
$$ I = \int\limits_{|z|=r} {z^{n-1} |p(z)|^2 \, dz} \; \big| p(z) = \sum\limits_{k=0}^n a_k z^k,$$
where $a_k$ is constant.
My attempt:
Parametrizing:
$$ I = \int\limits_0^{2\pi} r^{n-1} e^{in\theta} e^{i\theta} \left|\sum\limits_{k=0}^n a_k r^k e^{ik\theta}\right|^2 r i e^{i\theta} \, d\theta $$
which looks worse but it simplifies a little. Also, as $a_k$ is constant, I assumed that it does not deppend on the coefficent k, which I'm not sure if it's good.
$$ \to i r^n \int\limits_0^{2\pi} e^{in\theta} |a_k|^2 \left|\sum\limits_{k=0}^{n} r^k e^{ik\theta}\right|^2 \, d\theta $$
Considering the geometric sum:
$$ \to i r^n \int\limits_0^{2\pi} e^{in\theta} |a_k|^2 \left| \frac{(1-(re^{i\theta})^k)}{(1-(re^{i\theta}))}\right|^2 \, d\theta $$
And the problem comes when I expand $e^{ix} = \cos(x) + i\sin(x)$, to get the modulus. I get:
$$ \left|\frac{(1-(re^{i\theta})^k)}{(1-(re^{i\theta}))}\right| = \sqrt{\frac{1+r^{2n}-2r^n\cos(n\theta)}{1+r^2 -2r \cos \theta}} $$
which is very similar to Cosine Theorem, i.e.: $a^2=b^2+c^2-2bc\cos\theta$. In this case $b=1$, $c=r$, but I can't deduce how to simplify it more, in order to integrate. I guess it will simplify somewhere somehow.
Any help or hint is highly appreciated.
Let $w=\frac{z}{r}$ and then $$ \bar{p}(z)=\sum_{k=0}^n\bar{a}_kr^k\bar{w}^k=\sum_{k=0}^n\bar{a}_kr^kw^{-k}. $$ So \begin{eqnarray} I&=&\int\limits_{|z|=r} {z^{n-1} |p(z)|^2 dz}\\ &=&\int_{|w|=1}r^{n}w^{n-1}\sum_{j,k=0}^na_j\bar{a}_kr^{j+k}w^{j-k}dw\\ &=&\int_{|w|=1}r^{n}\sum_{j,k=0}^na_j\bar{a}_kr^{j+k}w^{n-1+j-k}dw\\ &=& \int_{|w|=1}r^{n}(\frac{r^na_0\bar{a}_n}{w}+\cdots)\\ &=&r^{2n}a_0\bar{a}_{n}\cdot2\pi i\\ &=&2\pi ir^{2n}a_0\bar{a}_n. \end{eqnarray} Here $$ \int_{|w|=1}\frac1wdw=2\pi i. $$