# Evaluating $\int_0^{2\pi} \frac {cos(\theta)}{5-3cos(\theta)}$ using residue theorem

I am to evaluate the following integral using residue theorem:

$$\int_0^{2\pi} \frac {cos(\theta)}{5-3cos(\theta)}$$

I know that I need to perform substitution with the following:

$$d\theta = \frac 1{iz}$$

$$cos{\theta} = \frac 12(z+\frac1z)$$

Which yields: $$\frac 1i=\int_{|z|=1} \frac{z+\frac1z}{-3z^2+10z-3}$$

Finding the roots for the denominator yields two roots at 1/3 and 3. Only 1/3 falls within our unit circle so we ignore the root at 3.

This is where I am a little stuck. I was taught to use the shortcut here to calculate the residue where I would leave the numerator $$p(z)$$ as is and take the derivative of the denominator $$q'(z)$$ then plug in the value of the singularity $$z=\frac13$$ but this approach doesn't give me the correct answer which I know is $$\frac\pi6$$

Am I making a mistake in setting up the problem? Thanks!

• $z+\frac{1}{z}$ has a singularity at $z=0$, too. – Jack D'Aurizio Feb 21 '18 at 20:56
• By exploiting the symmetry of the cosine function you may also write the original integral as $$12\int_{0}^{\pi/2}\frac{\cos^2\theta}{25-9\cos^2\theta}\,d\theta$$ which becomes an elementary integral after the substitution $\theta=\arctan t$. – Jack D'Aurizio Feb 21 '18 at 21:00

\begin{align} \int_0^{2\pi}\frac{\cos(\theta)}{5-3\cos(\theta)}\,d\theta&=\oint_{|z|=1}\frac{\frac12(z+z^{-1})}{5-\frac32(z+z^{-1})}\frac1{iz}\,dz\\\\ &=i\oint_{|z|=1}\frac{z^2+1}{z(3z^2-10z+3)}\,dz\\\\ &=i\oint_{|z|=1}\frac{z^2+1}{z(3z-1)(z-3)}\,dz\\\\ &=-2\pi \text{Res}\left(\frac{z^2+1}{z(3z-1)(z-3)}, z=0,1/3\right)\\\\ &=-2\pi \left(\frac13-\frac5{12}\right)\\\\ &=\frac\pi6 \end{align}
• Thank you! Quick question, why did you bring out the $\frac1i$ from the first line as $i$ in front of the integral instead of $\frac1i$? – J. Paredes Feb 22 '18 at 1:53
• You're welcome. My pleasure. Note that $\frac1i =-i$. – Mark Viola Feb 22 '18 at 2:24