How to solve $\int_{0}^{2\pi} \frac{\cos(50x)}{5+4\cos(x)} dx\,?$ I encountered this integral and tried to solve it. As you can expect I could not solve this and thought I will ask it here.
The integral is:
$$\int_{0}^{2\pi} \frac{\cos(50x)}{5+4\cos(x)}\, dx$$
I don't know a way or I know it but I can't see which way or method I have to use.
If you know it then please help. If I see the technique once I will understand it.
 A: You may use this formula:
\begin{equation}\int_0^{2\pi}\frac{\cos mx}{p-q\cos x}\, dx=\frac{2\pi}{\sqrt{p^2-q^2}}\left(\frac{p-\sqrt{p^2-q^2}}{q}\right)^m\qquad\hbox{for}\qquad |q|<p
\end{equation}
The complete proof can be seen here.
Your integral can be evaluated by setting $m=50$, $p=5$, and $q=-4$.
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
&\color{#66f}{\large\int_{0}^{2\pi}{\cos\pars{50x} \over 5 + 4\cos\pars{x}}\,\dd x}
=\Re\int_{0}^{2\pi}{\expo{50x\ic} \over 5 + 4\cos\pars{x}}\,\dd x
\\[5mm]&=\Re\oint_{\verts{z}\ =\ 1}{z^{50} \over 5 + 4\pars{z^{2} + 1}/\pars{2z}}
\,{\dd z \over \ic z}
=2\,\Im\oint_{\verts{z}\ =\ 1}{z^{50} \over 4z^{2} + 10z + 4}\,\dd z
\\[5mm]&=2\,\Im\oint_{\verts{z}\ =\ 1}{z^{50} \over 4\pars{z + 1/2}\pars{z + 2}}
\,\dd z
=2\,\Im\bracks{2\pi\ic\,{\pars{-1/2}^{50} \over 4\pars{-1/2 + 2}}}
={\pi \over 3 \times 2^{49}}
\\[5mm]&=\color{#66f}{\large{\pi \over 1688849860263936}}
\approx {\tt 1.86 \times 10^{-15}}
\end{align}
