Help with definite integral

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

-
for equations, use $\LaTeX$, wrap them between $\$ \LaTeX \. More here –  Santosh Linkha Jan 15 '13 at 8:35
@experimentX Thank you. That was great. –  weasel Jan 15 '13 at 8:43

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}

-
Thank you for the detailed solution. –  weasel 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.

-
This was really important. Thank you. –  weasel 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$$

-
Thank you for the hint. –  weasel Jan 15 '13 at 9:26
$$\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}}$$