I'm trying to evaluate this integral using the Residue theorem (It doesn't look to hard) $$\int_{0}^{2\pi}\frac{ dx}{(a+b\cos(x))^2}$$ (where $a>b>0$ ) I do the standard substitution of $z=e^x$ and get $dx=-idz/z$ and $\cos(x)=\frac{z+z^{-1}}{2} $, put it in my integral and, with a little algebra, get
$$ -4i \oint_{|z|=1} \frac{zdz}{(bz^2+2az+b)^2} \,$$
But when I try find the poles I end up getting:
$$ z_{1,2}=\frac{-2a\pm \sqrt{4a^2-4b^2}}{2b} \overset{\mathrm{c=a/b}}{=}-c\pm \sqrt{c^2-1}$$
but now I can't find which pole is inside the contour and which isn't becouse:
for $z_1$
$ -c+\sqrt{c^2-1}<1$
$\sqrt{c^2-1}<1+c$
$c^2-1<1+2c+c^2 $
$-2<2c$
and since our $c>1$ this pole is inside the contour. On the other hand for $z_2$ we have
$-c-\sqrt{c^2-1}<1$
$-\sqrt{c^2-1}<c+1\implies \sqrt{c^2-1}>-c-1 $
since $c>1>0$ this is equal to saying $-5<6$ or $-6<5$ it will always be true! Is that a problem (is it a sign of a mistake) or is the pole at $z_2$ also inside the contour?
$z_2\not\in B(0,1)$. Indeed, if $z_2\in B(0,1)$ then $$|z_2|<1$$ $$c+\sqrt{c^2-1}<1$$ $$1+\sqrt{c^2-1}<c+\sqrt{c^2-1}<1$$ $$\sqrt{c^2-1}<0$$ which is a contradiction.