# How find this $\int_{0}^{\pi}\frac{\cos{(nx)}}{\cos{x}+a}dx$

Fin the integral $$I_{n}=\int_{0}^{\pi}\dfrac{\cos{(nx)}}{\cos{x}+a}dx$$ where $n\in {\mathbb N}\,,\ a>1$

My try: let $$I_{n}-I_{n-1}=\int_{0}^{\pi}\dfrac{\cos{(nx)}-\cos{(n-1)x}}{\cos{x}+a}dx$$ and note $$\cos{x}-\cos{y}=-2\sin{\dfrac{x+y}{2}}\sin{\dfrac{x-y}{2}}$$ so $$I_{n}-I_{n-1}=-2\int_{0}^{\pi}\dfrac{\sin{(nx-\dfrac{x}{2})}\sin{\dfrac{x}{2}}}{\cos{x}+a}dx$$

Then I can't ,Thank you for your help.

• I suggest you look at I(n)+I(n-2), apply Cos[x]+Cos[y]. In the result, replace Cos[x] by [(a+Cos[x])-a] and simplify. You will end with a relation between I(n),I(n-1) and I(n-2). I do not know how much this would help but it could be an interesting track. Let me know. – Claude Leibovici Nov 1 '13 at 10:23

A little complex analysis helps. First, by the evenness of $\cos$, we have

$$I_n = \frac12 \int_{-\pi}^\pi \frac{\cos (nx)}{a+\cos x}\,dx,$$

and by Euler's formula, we have $\cos (nx) = \operatorname{Re} e^{inx}$, so

$$I_n = \frac12 \operatorname{Re} \int_{-\pi}^\pi \frac{e^{inx}}{a+\cos x}\,dx.$$

Since the imaginary part is odd, the integral is real, and we can omit the $\operatorname{Re}$.

Now we write $z = e^{ix}$, then we have

$$\cos x = \frac12(z+z^{-1});\quad e^{inx} = z^n;\quad dx = \frac{dz}{iz};$$

so we obtain

$$I_n = \int_{\lvert z\rvert = 1} \frac{z^n}{2a + z + z^{-1}}\, \frac{dz}{iz} = 2\pi\cdot\frac{1}{2\pi i}\int_{\lvert z\rvert = 1} \frac{z^n}{z^2 + 2az + 1}\,dz.$$

We need the zeros of the denominator $z^2 + 2az + 1 = (z+a-\sqrt{a^2-1})(z+a+\sqrt{a^2-1})$ to apply the Cauchy integral formula. Of the zeros, $-a+\sqrt{a^2-1}$ lies inside the unit disk, and $-a-\sqrt{a^2-1}$ outside the closed unit disk. With $f(z) = \frac{z^n}{z+a+\sqrt{a^2-1}}$, the Cauchy integral formula yields

\begin{align} I_n &= 2\pi\cdot\frac{1}{2\pi i}\int_{\lvert z\rvert = 1} \frac{f(z)}{z+a-\sqrt{a^2-1}}\,dz\\ &= 2\pi\cdot f(-a+\sqrt{a^2-1})\\ &= \frac{\pi}{\sqrt{a^2-1}}(\sqrt{a^2-1}-a)^n.\tag{1} \end{align}

• You could simplify the evaluation by noting that $\displaystyle I_n = \frac{1}{2} \text{Re} \int_{- \pi}^{\pi} \frac{e^{inx}}{a+ \cos x} \ dx$. – Random Variable Nov 1 '13 at 12:09
• That's a good idea, thanks. – Daniel Fischer Nov 1 '13 at 12:15