<s>[INST] Definite integral of inverse cosine I want to calculate the definite integral $\Large{\int_0^{\frac \pi 2} \frac{1}{2 + \cos x} \; dx}$
I tried it with the properties of definite integrals but it was of no help. 
 [/INST] 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}
</s>