How to evaluate $\int_{0}^{2\pi} \frac{\cos{3\theta}}{5-4\cos{\theta}}\,d{\theta}$ by using complex integration?
I assume $z=e^{i{\theta}}$, $\frac{1}{iz}dz=d{\theta}$, $$\cos{\theta}=\frac{z+z^{-1}}{2} \quad\mbox{and}\quad \cos3{\theta}=\frac{(z+z^{-1})(z^2+z^{-2}-1)}{2}.$$ Hence $$\frac{1}{2i}\oint_{|z|=1} \frac{{(z+z^{-1})(z^2+z^{-2}-1)}}{(5-4\frac{z+z^{-1}}{2})z}\,dz$$ and I'm stuck in this. Could you give me a hints or solution?
You are on the right track. Now you should use the Residue theorem and find the residues of the integrand at 0 and at $1/2$ (the poles inside the unit circle. The final result should be $\frac{\pi}{12}$. $$\int_{0}^{2\pi} \frac{\cos 3\theta }{5-4\cos{\theta}}\,d{\theta}= \frac{i}{4}\int_{|z|=1}\frac{z^6+1 }{z^3(z-\frac{1}{2})(z-2)}\,dz=-\frac{\pi}{2}\left(\mbox{Res}(f,0)+\mbox{Res}(f,1/2)\right)$$ where $f$ is the integrand function.