TITLE: 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}}}.$
QUESTION [5 upvotes]: 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.

REPLY [3 votes]: 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.