# Math Help - 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 $t=\tan \left( \frac{x}{2} \right)$ or equivalently $x=2 \arctan (t)$ with the integral $\int \frac{dx}{1+\cos (x)}$. I know that the derivative of the $\arctan$ function is $\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 $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 $\sqrt{\cos (x)}$...

2. Originally Posted by arbolis
The problem states to use the substitution $t=\tan \left( \frac{x}{2} \right)$ or equivalently $x=2 \arctan (t)$ with the integral $\int \frac{dx}{1+\cos (x)}$. I know that the derivative of the $\arctan$ function is $\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 $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 $\sqrt{\cos (x)}$...
Ok

Way two

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

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

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

Ok so lets see what

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

We see that

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

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

Now you should know that

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

So

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

So

$\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

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

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

So

$\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 $t=\tan \left( \frac{x}{2} \right)$ or equivalently $x=2 \arctan (t)$ with the integral $\int \frac{dx}{1+\cos (x)}$. I know that the derivative of the $\arctan$ function is $\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 $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 $\sqrt{\cos (x)}$...
Do not do that. Just use $2\cos^2 \tfrac{x}{2} = 1+\cos x$.

4. You could also note that

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

Squaring both sides gives us

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

So $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 $2$ here...
Because with $t=\tan \frac{x}{2}$ one has $\cos x=\frac{1-t^2}{1+t^2}$. (trig. identity)

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


\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 $1-\cos x.$