Question: Compute $\int_{|z|=1}|z^5-1|^2|dz|$.
My attempt: Let $z=e^{i\theta}$, then $|dz|=|ie^{i\theta}|d\theta=1$. So,
\begin{align} \int_{|z|=1}|z^5-1|^2|dz| &= \int_0^{2\pi}|e^{i5\theta}-1|^2d\theta\\ &= \int_0^{2\pi}[\cos^25\theta-2\cos5\theta+1+\sin^25\theta]d\theta\\ &= \int_0^{2\pi}(2-2\cos5\theta)d\theta\\ &= [2\theta-\frac{2}{5}\sin5\theta]|_0^{2\pi}\\ &= 4\pi-\frac{2}{5}\sin10\pi\\ &= 4 \pi \end{align}
I suppose I was thinking I made some algebra/calculus error somewhere because I got the same answer when I computed $\int_{|z|=1}|z-1|^2|dz|$, but I couldn't find an error.
The exact same computation holds for any non-zero integer $n$ (negative as well).