Evaluate $\int_0^{2\pi}{dx/(1+\epsilon \cos{x})}$ Please give hints or help to solve this integral, $\epsilon^2<1$
$$\int_0^{2\pi}\frac{dx}{1+\epsilon\cos x}$$
 A: To evaluate $I:=\int_0^{2\pi}\frac{dx}{1+\epsilon\cos x}=\int_0^\pi\frac{2dx}{1+\epsilon\cos x}$ take $t:=\tan\frac{x}{2}$ so$$I=\int_0^\infty\frac{4dt}{1+\epsilon+(1-\epsilon)t^2},$$which diverges unless $|\epsilon|<1$, whence$$I=\left[\frac{4}{\sqrt{1-\epsilon^2}}\arctan\left(t\sqrt{\frac{1-\epsilon}{1+\epsilon}}\right)\right]_0^\infty=\frac{2\pi}{\sqrt{1-\epsilon^2}}.$$As a sanity check, this result is obviously correct in the case $\epsilon=0$.
A: Hint:


*

*$$\cos x = \dfrac{1 - t^2}{1 + t^2}$$
where
$$t = \tan\frac x2.$$


*Substitute $u = \tan\dfrac x2$.

A: Let $a^2<1$, then
$$I=\int_{9}^{2\pi} \frac{dx}{1+a \cos x}= 2 \int_{0}^{\pi} \frac{dx}{1+a\cos x}~~~~(1)$$
$$I=2\int_{0}^{\pi}\frac{dx}{1-a \cos x}~~~~(2)$$
Adding (1) and (2), we get
$$2I=4\int_{0}^{\pi}\frac{dx}{1-a^2\cos^2 x} =8 \int_{9}^{\pi/2} \frac{sec^2 xdx}{sec^2 x-a^2}=8\int_{0}^{\pi/2} \frac{sec^2 x dx}{\tan^2x+1-a^2}.$$
$$I=4\int_{0}^{\infty} \frac{ du}{u^2+(1-a^2)}=\frac{4}{\sqrt{1-a^2}}  
\left . \tan^{-1} \frac{u}{\sqrt{1-a^2}}\right|_{0}^{\infty}=\frac{2\pi}{\sqrt{1-a^2}} $$
