# Integral (universal substitution)

I need a little help, this integral looks like very simple, but i have problem with it

$\int_{0}^{2\pi }\frac{1}{2-\cos x}dx$ and i want to solve it by universal substitution, e.g. $t=\tan\frac{x}{2}$ but what about limits of integration?

What is a solution? Thanks.

-

Break up the integral before applying the substitution:

$$\int^{2\pi}_0 \frac{1}{2-\cos x} dx = \int^{\pi}_0 \frac{1}{2-\cos x} dx + \int^{2\pi}_{\pi} \frac{1}{2-\cos x} dx =\int^{\pi}_0 \frac{1}{2-\cos x} dx + \int^{\pi}_0 \frac{1}{2+ \cos x} dx.$$

Now you can apply the substitution to each integral and the bounds become $0$ to $\infty$ for both.

-
Thanks a lot..! – Lilly Apr 12 '12 at 14:48
The splitting is very much necessary. As an aside, that some computing environments do not do these splits is why integrals like this sometimes give spurious answers in those environments. See this for instance. – J. M. Apr 14 '12 at 9:15
Yes. The substitution should be done only on an interval where $\tan(x/2)$ is monotone! – GEdgar Oct 15 '12 at 1:51

Yeah if you put $t = \tan\frac{x}{2}$, then you have $dt = \frac{1}{2}\cdot \sec^{2}\frac{x}{2} \ dx$. And from here note that $dx = \frac{2 \: dt}{1+t^{2}}$. And when $x = 0$ you have $t = \tan(0)=0$. And when $x=2\pi$ you have $t = \tan(\pi) = 0$.

I think the value of your integral will be $0$. But in case you want to evaluate something like \begin{align*} \int \frac{1}{2-\cos{x}} \ dx &= \int\frac{1}{2 - \frac{1-\tan^{2}x/2}{1+\tan^{2}x/2}} \ dx \\ &= \int \frac{1}{2 - \frac{1-t^{2}}{1+t^{2}}} \cdot \frac{2}{1+t^{2}} \ dt \\ &=\int\frac{2}{2+2t^{2}-1+t^{2}} \ dt \\ &= \int\frac{2}{3t^{2} +1} dt = \frac{2}{3} \int \frac{1}{t^{2}+\frac{1}{3}} \ dt \end{align*}

I guess you can evaluate the integral now by putting $t =\frac{1}{\sqrt{3}}\:\tan{v}$. This is the way how one generally evaluates integrals of the form $$\int \frac{dx}{a+b\cos{x}} \qquad \text{and} \qquad \int \frac{dx}{a+b\sin{x}}$$ While evaluating integrals of the form $a+b\sin{x}$ one uses the formula $\sin{2x} = \frac{2\tan{t}}{1+\tan^{2}{t}}$

-
The function is positive, hence the value cannot be zero. – AD. Apr 12 '12 at 15:01