For any natural number $n$, how would one calculate the integral
$$ \int_{0}^{2 \pi} |1 - ae^{i\theta}|^n \ d \theta $$
where $a$ is a complex number such that $|a| = 1$. I real just need $n$ to be even, but I'm not sure how much this changes anything. I also don't know how necessary $a =1$ is in the problem either. I can see this function is the distance from 1 to a circle of radius $a$ but not sure how to compute this integral.
Hint:
If $|a|=1$, $a=e^{i\phi}$ and this phase factor can just be dropped (you are integrating over a whole period). Hence WLOG $a=1$.
Then for even $n$,
$$|1-e^{i\theta}|^{2m}=((1-\cos\theta)^2+\sin^2\theta)^m=2^m(1-\cos\theta)^m=4^m\sin^{2m}\frac\theta2.$$
Use https://en.wikipedia.org/wiki/List_of_definite_integrals#Definite_integrals_involving_trigonometric_functions (fifth row).
For $|a|\ne 1$, the computation remains possible but requires the expansion of $(a^2+1-2a\cos\theta)^m$ and you end up with a linear combination of integrals of even powers of the cosine (the odd powers cancel out).