Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't figure out how to integrate this. I tried it with the properties of definite integrals but it was of no help. Please help.

$$ \int_0^{\frac \pi 2} \frac{1}{2 + \cos x} \; dx$$

share|cite|improve this question
for equations, use $\LaTeX$, wrap them between $\$ \LaTeX \$ $. More here – Santosh Linkha Jan 15 '13 at 8:35
@experimentX Thank you. That was great. – xyres Jan 15 '13 at 8:43
up vote 5 down vote accepted

Firstly, rewrite integral as $$\displaystyle \int\limits_{0}^{\frac{\pi}{2}}{\dfrac{dx}{2+\cos{x}}}=\int\limits_{0}^{\frac{\pi}{2}}{\dfrac{dx}{1+\cos^2\dfrac{x}{2}+\sin^2\dfrac{x}{2}+ \cos^2\dfrac{x}{2}-\sin^2\dfrac{x}{2}}}=\int\limits_{0}^{\frac{\pi}{2}}{\dfrac{dx}{1+2\cos^2\dfrac{x}{2}}}.$$
Substitute \begin{gather} t=\tan{\dfrac{x}{2}}, \\ x=2\arctan{t}, \\ dx=\dfrac{2 \, dt}{1+t^2}, \\ x\in \left[0,\, {\frac{\pi}{2}} \right] \Leftrightarrow t\in \left[0,\, {1} \right], \\ 1+t^2=1+{\tan}^2{\dfrac{x}{2}}=\dfrac{1}{\cos^2\tfrac{x}{2}}, \\ \cos^2\dfrac{x}{2}=\dfrac{1}{1+t^2}. \end{gather} Now \begin{gather} \int\limits_{0}^{\frac{\pi}{2}}{\dfrac{dx}{1+2\cos^2\dfrac{x}{2}}}=2\int\limits_{0}^{1}{\dfrac{dt}{\left(1+\dfrac{2}{1+t^2}\right) \left(1+t^2 \right)}}=2\int\limits_{0}^{1}{\dfrac{dt}{3+t^2}}. \end{gather}

share|cite|improve this answer
Thank you for the detailed solution. – xyres Jan 15 '13 at 9:26

It is often helpful to do the following substitution with $\sin{x}$ and $\cos{x}$ integrals:

$$x=\arctan{t}$$ or $$x=2\arctan{t}$$

for $t\in \mathbb{R}$. Use the second one to compute the integral. You will get, that $\cos{x}=\frac{1-t^2}{1+t^2}$ and $dx=\frac{2dt}{1+t^2}$. With this substitution, the ingtegral simplifies. This is a standard "trick", which you often apply in such integral types. Just for completeness you have the following table:

for the substitution $x=\arctan{t},t\in\mathbb{R}$, you get

  • $t=\tan{x},x\in(-\frac{\pi}{2},\frac{\pi}{2})$
  • $dx=\frac{dt}{(1+t^2)}$
  • $\sin{x}=\frac{\tan{x}}{\sqrt{1+(\tan{x})^2}}=\frac{t}{\sqrt{1+t^2}}$
  • $\cos{x}=\frac{1}{\sqrt{1+(\tan{x})^2}}=\frac{1}{\sqrt{1+t^2}}$

for the substitution $x=2\arctan{t},t\in\mathbb{R}$, you get

  • $t=\tan{\frac{x}{2}},x\in(-\pi,\pi)$
  • $dx=\frac{2dt}{(1+t^2)}$
  • $\sin{x}=\frac{2\tan{\frac{x}{2}}}{\sqrt{1+(\tan{\frac{x}{2}})^2}}=\frac{2t}{1+t^2}$
  • $\cos{x}=\frac{1-(\tan{\frac{x}{2})^2}}{\sqrt{1+(\tan{\frac{x}{2}})^2}}=\frac{1-t^2}{1+t^2}$

where this table is from a basic analysis book called "Lehrbuch der Analysis Teil 1", by Harro Heuser.

share|cite|improve this answer
This was really important. Thank you. – xyres Jan 15 '13 at 9:40

Hint :substitute $t=\frac{\tan x}{2}$ with $$ dt=\frac{(\tfrac{1}{2}\sec x)^2}{2}dx=\frac{1+t^2}{2} dx $$

share|cite|improve this answer
Thank you for the hint. – xyres Jan 15 '13 at 9:26

The integral is straightforward

$$\int_0^{\frac \pi 2} \frac{1}{2 + \cos x} \ dx=2\int_0^{\frac \pi 2} \frac{\left(\tan\left(\frac{x}{2}\right)\right)'}{\tan^2\left(\frac{x}{2}\right)+(\sqrt3)^2} \ dx=\left[\frac{2 \arctan\left(\frac{\tan\left(\displaystyle \frac{x}{2}\right)}{\sqrt{3}}\right)}{\sqrt3}\right]_0^{\pi/2}=\frac{\pi}{3\sqrt{3}}$$


share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.