Evaluate $I_{n}=\int\frac{\cos nx}{5-4\cos x}=$

I stumbled across the following integral:- $$I_{n}=\int\frac{\cos nx}{5-4\cos x}dx$$ where $n$ is a positive integer.

I have no idea how to proceed....I tried integration by parts and even writing $\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$

I couldn't make much headway..... Any ideas on how to proceed would be appreciated.

EDIT:

This question is different from @amWhy has marked..I want to evaluate indefinite integral ..Not the definite one.

• – Christian Blatter Feb 25 '17 at 12:09
• For general natural number $\;n\;$ there doesn't seem to be a solution in terms of elementary functions. For the $\;n=1,2,3,4\;$ it is a reasonably nasty-like integral, but for $\;n\ge5\;$ it gets more and more nigthmarish... Next time try no to stumble across ugly things lke that one. – DonAntonio Feb 25 '17 at 12:40
• Did anyone notice that the $dx$ is missing? – Nilabro Saha Feb 25 '17 at 15:28
• @NilabroSaha - while in this case, the $dx$ probably should be there, there are many variations of the notation for integrals. Leaving off the differential when what it should be is understood is actually quite common. – Paul Sinclair Feb 25 '17 at 15:52
• Probably the original problem was about $\int_{0}^{\pi}(\ldots)\,dx$. That is simple to compute, please see here: math.stackexchange.com/questions/2159720/… – Jack D'Aurizio Feb 25 '17 at 16:02

Hint:

It is just a piece of cake of creating the reduction formula:

$\int\dfrac{\cos nx}{5-4\cos x}~dx$

$=\int\dfrac{2\cos x\cos((n-1)x)}{5-4\cos x}~dx-\int\dfrac{\cos((n-2)x)}{5-4\cos x}~dx$ (according to http://mathworld.wolfram.com/Multiple-AngleFormulas.html)

$=\dfrac{1}{2}\int\dfrac{4\cos x\cos((n-1)x)}{5-4\cos x}~dx-\int\dfrac{\cos((n-2)x)}{5-4\cos x}~dx$

$=\dfrac{1}{2}\int\dfrac{(4\cos x-5+5)\cos((n-1)x)}{5-4\cos x}~dx-\int\dfrac{\cos((n-2)x)}{5-4\cos x}~dx$

$=-\dfrac{1}{2}\int\cos((n-1)x)~dx+\dfrac{5}{2}\int\dfrac{\cos((n-1)x)}{5-4\cos x}~dx-\int\dfrac{\cos((n-2)x)}{5-4\cos x}~dx$

$=-\dfrac{\sin((n-1)x)}{2(n-1)}+\dfrac{5}{2}\int\dfrac{\cos((n-1)x)}{5-4\cos x}~dx-\int\dfrac{\cos((n-2)x)}{5-4\cos x}~dx$