# Thread: Clueless in front of an integral (it's not a complicated one though)

1. ## Clueless in front of an integral (it's not a complicated one though)

The problem states to use the substitution $\displaystyle t=\tan \left( \frac{x}{2} \right)$ or equivalently $\displaystyle x=2 \arctan (t)$ with the integral $\displaystyle \int \frac{dx}{1+\cos (x)}$. I know that the derivative of the $\displaystyle \arctan$ function is $\displaystyle \frac{1}{1+x^2}$ which is very similar to the integral I must calculate, but I don't understand why we bother with a coefficient of $\displaystyle 2$ here... Also, even if it's quite similar, I don't know how to do it. Can you help me a bit? Maybe there's something to do with $\displaystyle \sqrt{\cos (x)}$...

2. Originally Posted by arbolis
The problem states to use the substitution $\displaystyle t=\tan \left( \frac{x}{2} \right)$ or equivalently $\displaystyle x=2 \arctan (t)$ with the integral $\displaystyle \int \frac{dx}{1+\cos (x)}$. I know that the derivative of the $\displaystyle \arctan$ function is $\displaystyle \frac{1}{1+x^2}$ which is very similar to the integral I must calculate, but I don't understand why we bother with a coefficient of $\displaystyle 2$ here... Also, even if it's quite similar, I don't know how to do it. Can you help me a bit? Maybe there's something to do with $\displaystyle \sqrt{\cos (x)}$...
Ok

Way two

$\displaystyle \int\frac{dx}{1+\cos(x)}$

Now we $\displaystyle x=2\arctan(u)$

So $\displaystyle dx=\frac{2}{u^2+1}$

Ok so lets see what

$\displaystyle \cos\left(2\arctan(x)\right)$ is

We see that

$\displaystyle \cos(2x)=2\cos^2(x)-1$

So then $\displaystyle \cos\left(2\arctan(x)\right)=2\cos^2\left(\arctan( x)\right)-1$

Now you should know that

$\displaystyle \cos\left(\arctan(x)\right)=\frac{1}{\sqrt{x^2+1}}$

So

$\displaystyle \cos^2\left(\arctan(x)\right)=\frac{1}{x^2+1}$

So

$\displaystyle \cos\left(2\arctan(x)\right)+1=\bigg[2\cdot\frac{1}{x^2+1}-1\bigg]+1=\frac{2}{x^2+1}$

So now we see that we are working in u's so

$\displaystyle \int\frac{2~du}{u^2+1}\cdot\frac{1}{\frac{2}{u^2+1 }}=\int~du=u+C$

So $\displaystyle x=2\arctan(x)\Rightarrow{u=\tan\left(\frac{x}{2}\r ight)}$

So

$\displaystyle \int\frac{dx}{1+\cos(x)}=\tan\left(\frac{x}{2}\rig ht)$

3. Originally Posted by arbolis
The problem states to use the substitution $\displaystyle t=\tan \left( \frac{x}{2} \right)$ or equivalently $\displaystyle x=2 \arctan (t)$ with the integral $\displaystyle \int \frac{dx}{1+\cos (x)}$. I know that the derivative of the $\displaystyle \arctan$ function is $\displaystyle \frac{1}{1+x^2}$ which is very similar to the integral I must calculate, but I don't understand why we bother with a coefficient of $\displaystyle 2$ here... Also, even if it's quite similar, I don't know how to do it. Can you help me a bit? Maybe there's something to do with $\displaystyle \sqrt{\cos (x)}$...
Do not do that. Just use $\displaystyle 2\cos^2 \tfrac{x}{2} = 1+\cos x$.

4. You could also note that

$\displaystyle \cos\left(\frac{x}{2}\right)=\pm\sqrt{\frac{1+\cos (x)}{2}}$

Squaring both sides gives us

$\displaystyle \cos^2\left(\frac{x}{2}\right)=\frac{1+\cos(x)}{2}$

So $\displaystyle 2\cos^2\left(\frac{x}{2}\right)=1+\cos(x)$

EDIT: Looks like TPH beat me to the punch

5. Hello
Originally Posted by arbolis
but I don't understand why we bother with a coefficient of $\displaystyle 2$ here...
Because with $\displaystyle t=\tan \frac{x}{2}$ one has $\displaystyle \cos x=\frac{1-t^2}{1+t^2}$. (trig. identity)

$\displaystyle x=2\arctan t \implies \mathrm{d}x=\frac{2}{1+t^2}\,\mathrm{d}t$

\displaystyle \begin{aligned} \int\frac{1}{1+\cos x}\,\mathrm{d}x=\int\frac{1}{1+\frac{1-t^2}{1+t^2}}\cdot \frac{2}{1+t^2}\,\mathrm{d}t &=\int\frac{2}{1+t^2+\frac{1-t^2}{1+t^2}(1+t^2)}\,\mathrm{d}t\\ &=\int\frac{2}{2}\,\mathrm{d}t\\ &=t+C\\ &=\tan \frac{x}{2}+C\\ \end{aligned}

6. Nice answers, thank you all. I have another integral to do with the same substitution, so I might ask help in another thread . But I hope not.

7. Multiply & divide by $\displaystyle 1-\cos x.$