Definite integral of $$\int_0^{2\pi} \frac{1}{2+\cos x}$$ without using improper integral, I want to solve this without having to use $-\infty$ and $\infty$ on the integrals limits. Is that possible?

The only way I can think of solving that is by using Weierstrass. $u = \tan \frac{x}{2}$, don't you have to modify the lower and upper limits with that substitution? The only way I can think of to progress in this is to change the limits to $-\pi$ and $\pi$, but when you'll get $-\infty$ and $\infty$ upper and lower limits.

  • $\begingroup$ $\pi/2\sqrt{3}$ :D $\endgroup$
    – Someone
    May 8, 2015 at 6:16
  • $\begingroup$ Thanks, that is much more clear. I have retracted my close vote. $\endgroup$
    – David
    May 8, 2015 at 6:22
  • $\begingroup$ To reply to the question, the integral can be evaluated by complex methods without using improper integrals. I don't know if it can be done with purely real methods but maybe someone else will have an idea. $\endgroup$
    – David
    May 8, 2015 at 6:23
  • $\begingroup$ Actually you can just use , $1+cosx =2 cos^2(x/2)$ and the divide the limit of function into two parts find that they are equivalent. And done, takes about 1 min. $\endgroup$
    – Someone
    May 8, 2015 at 6:27
  • $\begingroup$ Of course, one can use the Weierstrass substitution, evaluate the indefinite integral, reverse the substitution to write the antiderivative in terms of $x$, and then evaluate using F.T.C., but producing an antiderivative for the full interval $[0, 2 \pi]$ is slightly delicate: The expression one produces naively using the Weierstrass substitution is not even continuous on this interval, owing to the behavior of $\tan \frac{x}{2}$ at $\pi \in [0, 2 \pi]$. $\endgroup$ May 8, 2015 at 6:28

3 Answers 3


Split the integral as $\int_0^{2\pi}=\int_0^{\pi}+\int_{\pi}^{2\pi}$. Do the substitution $u=x-\pi$ in the second one, and put the expressions under common denominator, and simplify. You should end up with $$ 4\int_0^{\pi}\frac{1}{4-\cos^2x}\,dx $$ The integrand is now symmetric in $x=\pi/2$, so the integral equals $$ 8\int_0^{\pi/2}\frac{1}{4-\cos^2x}\,dx. $$ Now, doing $t=\tan(x/2)$ gives you (or at least me) the integral $$ 16\int_0^1\frac{(t^2+1)}{3t^4+10t^2+3}\,dt, $$ which you can do with the methods of partial fraction. The result is already mentioned in other comments/answers.


Make the substutition

$x \mapsto 2\theta$

$$\int_0^\pi \frac{2\text{d}\theta}{\sin^2{\theta}+3\cos^2{\theta}}$$

The polar integral for (half) the area of an ellipse is almost of this form, but some adjustments are required before we can proceed.

Factor out the 2 and insert a factor of 3 into the numerator of the integral, and a factor of 2 into the denominator.

$$\frac{4}{3}\int_0^\pi \frac{1^2 \times \sqrt{3}^2 \, \text{d}\theta}{2(\sin^2{\theta}+3\cos^2{\theta})}$$

The polar form of an ellipse centered on the center of the ellipse with vertical semi-major axis $a$ and lateral semi-minor axis $b$ is

$$r(\theta) = \frac{ab}{\sqrt{b^2\sin^2{\theta} + a^2\cos^{\theta}}}$$

The area of the ellipse with major and minor axes $a,b$ is $πab$.

In this case, $a=\sqrt{3}, b=1$

However, in this case, the integral is a half-revolution, which is half the area of the ellipse, giving us

$$\frac{4}{3} \times \frac{\pi \times \sqrt{3} \times 1}{2} = \frac{2\pi}{\sqrt{3}}$$


Another way of evaluating this integral is to use contour integration.

Let $z=e^{i\theta}$ so that $d\theta =dz/(iz)$, $\cos \theta =\frac12 (z+z^{-1})$ where $0\le \theta \le 2\pi$, and let $C$ be the unit circle $|z|=1$.


$$\begin{align} I&=\int_0^{2\pi}\frac{1}{2+\cos \theta}d\theta\\\\ &=\oint_C \frac{1}{2+\frac12(z+z^{-1})}\frac{1}{iz}dz\\\\ &=\frac{2}{i}\oint_C \frac{1}{z^2+4z+1}dz\\\\ &=\frac{2}{i}2\pi i \text{Res}\left(\frac{1}{z^2+4z+1},z=-2+\sqrt {3}\right)\\\\ &=2\pi\sqrt{3}/3 \end{align}$$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .