# How to solve this integral using the method of residues?

Using the method of residues, verify the following.
$$\int_0^{\pi} \frac{d \theta}{(3+2cos \theta)^2} = \frac{3 \pi \sqrt{5}}{25}$$

I tried doing this but can't get the correct answer, here is my attempt:
first I substituted $cos \theta = \frac{z+ \frac{1}{z}}{2}$ and $d \theta = \frac{dz}{iz}$ and got $\int_0^{\pi} \frac{dz}{iz(3+z+\frac{1}{z})^2}$

then I multiplied top and bottom my $iz$ so that the $i$ moves to the top and on the bottom I'll have $z^2$ so I can distribute it into the rest of it and get $-i \int_0^{\pi} \frac{zdz}{(3z+z^2+1)^2}$

the denominator has two zeroes at $-\frac{3}{2} \pm \sqrt{\frac{5}{4}}$, since the denominator is squared the function has poles here of order two.

The I used Cauchy's Residue theorem but first I needed to find the residue at $-\frac{3}{2} + \sqrt{\frac{5}{4}}$ because only this pole is inside the unit circle.

I found the residue using theorem 1 on pdf page 324/579 from this textbook http://english-c.tongji.edu.cn/_SiteConf/files/2014/05/05/file_53676237d7159.pdf

After finding the residue using that formula and applying cauchy's residue theorem I do not get an answer close to $\frac{3 \pi \sqrt{5}}{25}$

I am not sure how to handle the fact that the integral is from $0$ to $\pi$ rather then from $0$ to $2\pi$, and I am not sure if I made any mistakes when finding the poles and residues.

• Application of the residue theorem requires a closed contour. Starting with the original integral, note that the integrand is even. Thus, $\int_0^\pi =\frac12 \int_{-\pi}^\pi$. – Mark Viola May 16 '17 at 16:22
• @MarkViola, ok, does it look like I found the correct poles and that they are both of order 2 because that's where I might have made a mistake, that was a typo I had $(3z+z^2+1)^2$ on my paper when doing it – idknuttin May 16 '17 at 16:24
• Yes, the poles are correct. – Mark Viola May 16 '17 at 16:26
• Well I did it your way (after using the periodicity) and crunched out the residue and got the answer stated. – ancientmathematician May 16 '17 at 16:31
• @MarkViola You should turn your comment into an answer. – zhw. May 16 '17 at 16:46

Note $$\int_0^{\pi} \frac{d \theta}{(3+2cos \theta)^2} = \frac12\int_0^{2\pi} \frac{d \theta}{(3+2cos \theta)^2}.$$ Let $z=e^{i\theta}$ and hence one has \begin{eqnarray} &&\int_0^{\pi} \frac{d \theta}{(3+2cos \theta)^2}\\ &=&\frac12\int_0^{2\pi} \frac{d \theta}{(3+2cos \theta)^2}\\ &=&\frac12\int_{|z|=1}\frac{1}{(3+z+z^{-1})^2}\frac{dz}{iz}\\ &=&\frac12\int_{|z|=1}\frac{z}{(z^2+3z+1)^2}dz\\ &=&\pi\text{Res}(f(z),z=\frac{1}{2}(-3+\sqrt5))\\ &=& \frac{3 \pi \sqrt{5}}{25} \end{eqnarray} where $f(z)=\frac{z}{(z^2+3z+1)^2}$ has a pole at $z=\frac{1}{2}(-3+\sqrt5)$.

• thank you, I kept checking over my work and realized I made an algebraic mistake. – idknuttin May 16 '17 at 17:08
• You're welcome. – xpaul May 16 '17 at 17:26

By the substitution $\theta=2\varphi$ and the cosine duplication formula we have

$$I = \int_{0}^{\pi}\frac{d\theta}{(3+2\cos\theta)^2} = 2\int_{0}^{\pi/2}\frac{d\varphi}{(1+4\cos^2\varphi)^2} \tag{1}$$ and by the substitution $\varphi=\arctan t$ the problem boils down to evaluating $$2\int_{0}^{+\infty}\frac{(1+t^2)}{(5+t^2)^2}\,dt = \int_{-\infty}^{+\infty}\frac{(1+t^2)}{(5+t^2)^2}\,dt.\tag{2}$$ The meromorphic function $f(t)=\frac{(1+t^2)}{(5+t^2)^2}$ has a double pole at $t=\pm i\sqrt{5}$ and behaves like $\frac{1}{t^2}$ for $|t|\to +\infty$. By the residue theorem it follows that:

$$I = 2\pi i\,\text{Res}(f(t),t=i\sqrt{5}) =2\pi i\lim_{t\to i\sqrt{5}}\frac{d}{dt}\frac{(1+t^2)}{(t+i\sqrt{5})^2}=\color{red}{\frac{3\pi}{5\sqrt{5}}}\tag{3}$$ as wanted, after a straightforward computation.

There also is a simple geometric approach. $\rho(\theta)=\frac{p}{1+\varepsilon\cos\theta}$ is the polar equation of an ellipse with respect to a focus. Since the area in polar coordinates is given by $\frac{1}{2}\int_{0}^{2\pi}\rho(\theta)^2\,d\theta$, $I$ just depends on the area of an ellipse ($\pi ab$) with a given eccentricity and a given semi-latus rectum. This proves the more general $$\int_{0}^{\pi}\frac{d\theta}{(u+v\cos\theta)^2} = \frac{\pi u}{\left(u^2-v^2\right)^{3/2}} \tag{4}$$ as soon as $0<v<u$.