Using the Residue Theorem to Prove that $\int^{2\pi}_{0} \frac{1}{(a+\cos\theta)^{2}} d \theta=\frac{2\pi a}{(a^{2}-1)^{3/{2}}}.$ How do you evaluate the following integral? Here we take $a>1$.
$$\int^{2\pi}_{0} \frac{1}{(a+\cos\theta)^{2}} d \theta=\frac{2\pi a}{(a^{2}-1)^{\frac{3}{2}}}.$$
I know I have to use the Residue Theorem, however, I am stuck on which contour to use, and also how to find the pole of the function. Any hints are greatly appreciated.
 A: Use the contour $|z| = 1$
First change the cosines into exponential forms.
$$\large\int \frac {1}{(a+\frac{e^{it}}{2} + \frac{e^{-it}}{2})^2} \ d\theta$$
$$z = e^{i\theta}\\ d\theta = \frac {1}{iz} dz$$
$$\large \oint_{|z| = 1} \frac {1}{iz(a+\frac{z}{2} + \frac{z^{-1}}{2})^2} \ dz$$
Which simplifies to:
$$\large \oint_{|z| = 1} \frac {4z}{i(z^2 + 2az+ 1)^2} \ dz\\
\oint_{|z| = 1} \frac {4z}{i(z+ a + \sqrt {a^2-1})^2(z+ a - \sqrt {a^2-1})^2} \ dz$$
Has one pole inside the contour.
The residual at $z = -a+\sqrt {a^2 - 1} = 2\pi i \frac {d}{dz} \frac {4z}{i(z+ a + \sqrt {a^2-1})^2}$ evaluated at $z =  -a+\sqrt {a^2 - 1}$
A: You do not have to use the residue theorem.   For example, the $t=\tan(\theta/2)$-substitution works
$$
\begin{align*}
\int_0^{2\pi}\frac1{(a+\cos\theta)^2}\,\mathrm{d}\theta&=\int_{-\pi}^{\pi}\frac1{(a+\cos\theta)^2}\,\mathrm{d}\theta\\
&=\int_{-\infty}^\infty\frac1{\left(a+\frac{1-t^2}{1+t^2}\right)^2}\,\frac{2\,\mathrm{d}t}{1+t^2}\\
&=2\int_{-\infty}^\infty\frac{1+t^2}{((a+1)+(a-1)t^2)^2}\,\mathrm{d}t
\end{align*}
$$
Partial fraction decomposition of the integrand
$$
\frac{1+t^2}{((a+1)+(a-1)t^2)^2}
=\frac1{(a-1)((a+1)+(a-1)t^2)}-\frac2{(a-1)((a+1)+(a-1)t^2)^2}
$$
Now combining
$$
\int_{-\infty}^\infty\frac1{(a+1)+(a-1)t^2}\,\mathrm{d}t=\left[\frac{1}{\sqrt{a^2-1}}\arctan\left(t\sqrt{\frac{a-1}{a+1}}\right)\right]_{-\infty}^\infty=\frac{\pi}{\sqrt{a^2-1}}
$$
and
$$
\int_{-\infty}^\infty\frac2{((a+1)+(a-1)t^2)^2}\,\mathrm{d}t
=\left[\frac{t}{(a+1)((a+1)+(a-1)t^2)}+\frac{1}{(a+1)\sqrt{a^2-1}}\arctan\left(t\sqrt{\frac{a-1}{a+1}}\right)\right]_{-\infty}^\infty=\frac{\pi}{(a+1)\sqrt{a^2-1}}
$$
gives the desired answer.
But if you want to use contour integration, see Doug M's answer.
