# Integration of a trigonometric function

I am having some difficulties with the calculation of the following integral. Can somebody help me please?

$$\int \frac{dx}{1+a\cos x},\text{ for }0<a<1$$

Thank you in advance

-
How many times are you going to ask the same question? – Mike Nov 7 '12 at 13:51
It is not the same question. It is another exercise.. – user43418 Nov 7 '12 at 13:52
It's the same basic integral rewritten. You've now had 3 people give you the same answer on 3 separate questions. – Mike Nov 7 '12 at 13:57

## 3 Answers

Hint 1: $\cos x=\frac{1-t^2}{1+t^2}$ which $t=\tan\frac{x}{2}$.

Hint 2: $t=\tan\frac{x}{2}\Rightarrow dt=\frac{1}{2}\sec^2\frac{x}{2}dx=\frac{1}{2}(t^2+1)dx$.

-
How do you replace the dx in integral expression ? I have a similar integral to calculate – Carpediem Nov 7 '12 at 13:55
So we have: $\int \frac{\frac{2}{t^2+1}}{1+a\frac{1-t^2}{1+t^2}}$ – user43418 Nov 7 '12 at 14:09

Detailed hint:

Wikipedia calls this the The Weierstrass Substitutiion: when $t=\tan(\theta/2)$, \begin{align} \sin(\theta)&=\frac{2t}{1+t^2}\\ \cos(\theta)&=\frac{1-t^2}{1+t^2}\\ \tan(\theta)&=\frac{2t}{1-t^2}\\ \mathrm{d}\theta&=\frac{2\mathrm{d}t}{1+t^2} \end{align}

-

Substitute, $t = \tan \left(\dfrac x2\right)$. So $x = 2\tan^{-1}t$ and $dx = \dfrac{2dt}{1+t^2}$. And the integral becomes,

\begin{align*}\int\dfrac{\dfrac{2}{1+t^2}}{1+\dfrac{a(1-t^2)}{1+t^2}}dt &=\dfrac2{(1+a)}\int\dfrac1{1+\left[t\dfrac{\sqrt{1-a}}{\sqrt{1+a}}\right]^2}dt &\color{blue}{u =\left[t\frac{\sqrt{1-a}}{\sqrt{1+a}}\right]\Rightarrow dt = \frac{\sqrt{1+a}}{\sqrt{1-a}}du }\\ &=\dfrac2{(1+a)}\frac{\sqrt{1+a}}{\sqrt{1-a}}\int\dfrac1{1+u^2}du &\color{blue}{\int\dfrac1{1+u^2}du= \tan^{-1}u}\\ \\&=\dfrac2{(1+a)}\frac{\sqrt{1+a}}{\sqrt{1-a}}\tan^{-1}u\\\\ &=\dfrac2{\sqrt{1-a^2}}\tan^{-1}u&\color{blue}{u =\left[t\frac{\sqrt{1-a}}{\sqrt{1+a}}\right]}\\ \\ &=\dfrac{2\tan^{-1}\left[\frac{\sqrt{1-a}}{\sqrt{1+a}}\circ\tan \left(\dfrac x2\right)\right]}{\sqrt{1-a^2}}\\\\ \end{align*}

$$\displaystyle\Large\therefore \boxed{\int \dfrac1{1+acosx}dx =\dfrac{2\tan^{-1}\left[\frac{\sqrt{1-a}}{\sqrt{1+a}}\circ\tan \left(\dfrac x2\right)\right]}{\sqrt{1-a^2}} }$$

-