Evaluate the following integrals and show the details of your work.
$$\int_0^{2\pi} \frac{\cos^2\theta}{5 - 4\cos\theta}\, d\theta$$
So generally my approach is to find the roots because I need them to evaluate the residues which I can then use in the residue theorem.
So first thing's first is to find the roots...
The denominator factors to: $5(1-\frac{4\cos\theta}{5})$
But when does $\cos\theta = 5/4$ so that $1 - \frac{4 \cos \theta}{5} = 0$
My book says the answer is: $\frac{5\pi}{12}$ FWIW but I'm not sure how to get here.
Let\begin{align}f(z)&=\frac1z\cdot\frac{\left(\frac{z+1/z}2\right)^2}{5-4\frac{z+1/z}2}\\&=-\frac{(z^2+1)^2}{2(z-2)\left(z-\frac12\right)z^2}.\end{align}With this choice of $f$, and since$$(\forall\theta\in[0,2\pi]):\cos\theta=\frac{e^{i\theta}+e^{-i\theta}}2,$$we have\begin{align}\int_0^{2\pi}\frac{\cos^2\theta}{5-4\cos\theta}\,\mathrm d\theta&=\frac1i\oint_{|z|=1}f(z)\,\mathrm dz\\&=2\pi\sum_{|\xi|<1}\operatorname{res}_{z=\xi}f(z)\\&=2\pi\left(\operatorname{res}_{z=0}f(z)+\operatorname{res}_{z=1/2}f(z)\right)\\&=2\pi\left(-\frac5{16}+\frac{25}{48}\right)\\&=2\pi\frac5{24}\\&=\frac{5\pi}{12}.\end{align}