# Finding the integral $\int_0^\pi\dfrac{d\theta}{(2+\cos\theta)^2}$ by complex analysis

Trying to find the integral $\int_0^\pi\dfrac{d\theta}{(2+\cos\theta)^2}$ by complex analysis, I let $z = \exp(i\theta)$, $dz = i \exp(i\theta)d\theta$, so $d\theta=\dfrac{dz}{iz}$. I am trying therefore to find the integral $$\dfrac{1}{2iz} \oint_C \dfrac{dz}{\bigg(2 + \dfrac{z}{2} + \dfrac{1}{2z}\bigg)^2}.$$ I am unsure of which contour I should use, and how to proceed besides that. Could anyone help?

-
How is this mathematical-physics? – mrf Feb 20 '13 at 9:29

$$\int_0^\pi \frac{d\theta}{(2+\cos \theta)^2} = \frac12 \int_{-\pi}^\pi \frac{d\theta}{(2+\cos \theta)^2}.$$
Then use the same substitution as the one you tried. You get your contour for free. (If $\theta$ varies from $-\pi$ to $\pi$, then $e^{i\theta}$ will cover the unit circle exactly once.)