How to solve $\int_0^\pi{\frac{\cos{nx}}{5 + 4\cos{x}}}dx$? How can I solve the following integral?
$$\int_0^\pi{\frac{\cos{nx}}{5 + 4\cos{x}}}dx, n \in \mathbb{N}$$

Of course it can be solved easily with complex residues. Since $\cos x$  is even you replace it with 1/2 the integral from $0$ to $ 2 \pi$. Then you make the substitution $z=e^{i\theta}$. You end-up with an integral over the unit circle.  You end-up with a function which has singularities only at $0$ and $-\frac{1}{2}$. Then find the residues.
