<s>[INST] Proving that $\int_0^{2\pi}\frac{ 1-a\cos\theta}{1-2a\cos\theta + a²} \mathrm d\theta = 0$ for $|a|>1$ 
Let $|a|>1$. Show that $$\int_0^{2\pi}\frac{ 1-a\cos\theta}{1-2a\cos\theta + a²} \mathrm d\theta = 0$$

I'm also trying to solve this problem. I wasn't sure if I was supposed to start a new thread or contribute to previous asked questions about this integral.
I have some ideas that we could do something like this
$$ -i \oint _{|z|=1} \frac{1-az}{(z-2a) }dz = \int_{\theta=0}^{\theta=2\pi} \frac{1-a e^{i\theta}}{e^{i\theta}-2a } e^{i\theta}d\theta = \int_{\theta=0}^{\theta=2\pi} \frac{1-a e^{i\theta}}{1-2ae^{-i\theta} }d\theta \quad (2)$$
Then we have that the real part of $(2)$ is almost equal to the desired integral, except for the $a^2$ in the denominator.
An inequality to the right for the desired integral is then given from the real part of $(2)$. All we want to find is an inequality to the left for the desired integral. That hopefully and easily could be calculated with help of
$$ \oint _{|z-z_0|=r}(z-z_0)dz = \frac{0 \quad n \neq -1}{2\pi i \quad n = -1}  $$
Any suggestions?
 [/INST] The standard complex analysis approach is to make the substitution $z = e^{i\theta}$. This will map $[0,2\pi]$ onto the unit circle traversed counter-clockwise once. Using Euler's formulas,
$$ \cos \theta = \frac{e^{i\theta}+e^{-i\theta}}2 = \frac{z+z^{-1}}{2}.$$
We also have $dz = ie^{i\theta}\,d\theta$, i.e.
$$d\theta = \frac1{iz}dz.$$
Doing all this we get
\begin{align}
\int_0^{2\pi}\frac{ 1-a\cos\theta}{1-2a\cos\theta + a^2} d\theta &=
\int_{|z| = 1} \frac{ 1-a(z+z^{-1})/2}{1-a(z+z^{-1})+ a^2} \cdot \frac{1}{iz} dz \\
&= \frac1{2i} \int_{|z| = 1} \frac{2z- a(z^2+1)}{z(z-a(z^2+1)+ a^2z)} dz.
\end{align}
Note that $z(z-a(z^2+1)+ a^2z) = z(1-az)(z-a)$, so the integrand has simple poles at $z = 0$, $z = a$ and $z = 1/a$.
If $|a| < 1$, we get
\begin{align}
\int_0^{2\pi}\frac{ 1-a\cos\theta}{1-2a\cos\theta + a^2} d\theta 
&= \pi \left( \operatorname{Res}\limits_{z=0} \frac{2z- a(z^2+1)}{z(1-az)(z-a)} +
 \operatorname{Res}\limits_{z=a} \frac{2z- a(z^2+1)}{z(1-az)(z-a)} \right) \\
&= \pi \left( \frac{-a}{-a} + \frac{2a- a(a^2+1)}{a(1-a^2)} \right) \\
&= \pi ( 1 + 1 ) = 2\pi.
\end{align}
I'll leave the case $|a| > 1$ to you.
</s>