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}$$

To elaborate on Pantelis Damianou's answer
$$
\newcommand{\cis}{\operatorname{cis}}
\begin{align}
\int_0^\pi\frac{\cos(nx)}{5+4\cos(x)}\mathrm{d}x
&=\frac12\int_{-\pi}^\pi\frac{\cos(nx)}{5+4\cos(x)}\mathrm{d}x\\
&=\frac12\int_{-\pi}^\pi\frac{\cis(nx)}{5+2(\cis(x)+\cis(-x))}\mathrm{d}x\\
&=\frac12\int_{-\pi}^\pi\frac{\cis(x)\cis(nx)}{2\cis^2(x)+5\cis(x)+2}\mathrm{d}x\\
&=\frac{1}{2i}\int_{-\pi}^\pi\frac{\cis(nx)}{2\cis^2(x)+5\cis(x)+2}\mathrm{d}\cis(x)\\
&=\frac{1}{2i}\oint\frac{z^n}{2z^2+5z+2}\mathrm{d}z
\end{align}
$$
where the integral is counterclockwise around the unit circle and $\cis(x)=e^{ix}$.
Factor $2z^2+5z+2$ and use partial fractions. However, I only get a singularity at $z=-\frac12$ (and one at $z=-2$, but that is outside the unit circle, so of no consequence).
Now that a complete solution has been posted, I will finish this using residues:
$$
\begin{align}
\frac{1}{2i}\oint\frac{z^n}{2z^2+5z+2}\mathrm{d}z
&=\frac{1}{6i}\oint\left(\frac{2}{2z+1}-\frac{1}{z+2}\right)\,z^n\,\mathrm{d}z\\
&=\frac{1}{6i}\oint\frac{z^n}{z+1/2}\mathrm{d}z\\
&=\frac{\pi}{3}\left(-\frac12\right)^n
\end{align}
$$
