# Tangent half-angle substitution for $\int_0^{2 \pi} \frac{1- \cos x}{3 + \cos x}$

I want to evaluate the following integral using the tangent half-angle substitution $t = \tan (\frac{x}{2})$: $$\int_0^{2 \pi} \frac{1- \cos x}{3 + \cos x} ~dx$$ However, making the substitution gives me $0$ for each of the limits of integration, which is obviously incorrect. I know that one way to solve this problem is to notice that, by symmetry, the equivalent integral 2$\int_0^{\pi} \frac{1- \cos x}{3 + \cos x} ~dx$ allows the subsitution to work. What are ways to make this substitution work without noticing this symmetry? I know that this general question has been asked on here before, but I am specifically interested in how I can make it work with this substitution.

• Well, the substitution has to be defined by a function which is differentiable on an interval $I$. However $\tan \frac x2$ is not even defined at $x=\pi$, so you have to split the interval in two. – Bernard Jun 18 '18 at 18:29

By this substitution we obtain: $$2\int\limits_0^{\pi}\frac{1-\cos{x}}{3+\cos{x}}dx=2\int\limits_0^{+\infty}\frac{1-\frac{1-t^2}{1+t^2}}{3+\frac{1-t^2}{1+t^2}}\frac{2}{1+t^2}dt=4\int\limits_0^{+\infty}\frac{t^2}{(2+t^2)(1+t^2)}dt=$$ $$=4\int\limits_0^{+\infty}\left(\frac{2}{2+t^2}-\frac{1}{1+t^2}\right)dt=2(\sqrt2-1)\pi.$$
• I know, I addressed that in my question, maybe not clearly. I am wondering in what other ways I could evaluate the integral without resorting to that symmetry argument with the cosine function. For example, with the limits $0$ to $2 \pi$ would I have to split it into two integrals? – Wesley Jun 18 '18 at 21:45