Computation of definite integral Value of $$\text{I}=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\sqrt{\cos(x)-\cos^2(x)}dx$$ $$\text{Attempt}$$ Using symmetry :- $$I=2\int_0^{\frac{\pi}{2}}\sqrt{\cos(x)(1-\cos(x))}dx$$.Letting $\cos(x)=u$ thus $du=-\sin(x)dx$ and using $1-\cos(x)=2\sin^2(\frac{x}{2}),\sin(\frac{x}{2})=\frac{2\sin(x)}{\cos(\frac{x}{2})},\cos(\frac{x}{2})=\sqrt{\frac{1+\cos(x)}{2}}$ the integral changes to $$\text{I}=2\int _0^1\sqrt{\frac{u}{1+u}}du$$.Now letting $u=\tan^2(t)$ we can solve the integral.But these are a lot of calculations and manipulations. Is there any elegant way to calculate the integral?
 A: As $0\le x\le\dfrac\pi2,\sin\dfrac x2\ge0$ $$\sqrt{\cos x(1-\cos x)}=+2\sin\dfrac x2\sqrt{\cos^2\dfrac x2-\dfrac12}$$
Set $\cos\dfrac x2=u$
$$-\int_0^{\frac\pi2}\sin\dfrac x2\sqrt{\cos^2\dfrac x2-\dfrac12}\ dx=\int_1^{\frac1{\sqrt2}}\sqrt{u^2-\left(\dfrac1{\sqrt2}\right)^2}du$$
$$=\dfrac{u\sqrt{u^2-\left(\dfrac1{\sqrt2}\right)^2}}2-\dfrac{\dfrac12}2\ln\left(u+\sqrt{u^2-\left(\dfrac1{\sqrt2}\right)^2}\right)\bigg\rvert_1^{\frac1{\sqrt2}}$$
$$=\dfrac12\ln\left(1+\sqrt2\right)-\dfrac1{\sqrt2}$$
See $\#8$ of this
A: $$2\int_{0}^{\pi/2}\sqrt{\cos(x)-\cos^2(x)}\,dx\stackrel{x\mapsto\arccos u}{=}\sqrt{2}\int_{0}^{1}\sqrt{\frac{2u}{1+u}}\,du\stackrel{\frac{2u}{1+u}\mapsto v}{=}\sqrt{2}\int_{0}^{1}\frac{2\sqrt{v}}{(2-v)^2}\,dv $$
and by setting $v=w^2$ we get
$$4\sqrt{2}\int_{0}^{1}\frac{w^2}{(2-w^2)^2}\,dw \stackrel{w\mapsto\sqrt{2}}{=} 2\int_{0}^{\frac{1}{\sqrt{2}}}t\cdot\frac{2t}{(1-t^2)^2}\,dt\stackrel{\text{IBP}}{=}\color{red}{2\left(\sqrt{2}-\text{arctanh}\frac{1}{\sqrt{2}}\right)}.$$
Simple but not that fast, I agree.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
I & \equiv \int_{-\pi/2}^{\pi/2}\root{\cos\pars{x} - \cos^{2}\pars{x}}\,\dd x =
2\int_{0}^{\pi/2}\root{\cos\pars{x}\bracks{1 - \cos\pars{x}}}\,\dd x
\\[5mm] &=
2\int_{0}^{\pi/2}\root{\bracks{2\cos^{2}\pars{x \over 2} - 1} \bracks{2\sin^{2}\pars{x \over 2}}}\,\dd x
\\[5mm] & =
2\root{2}\int_{0}^{\pi/2}\root{2\cos^{2}\pars{x \over 2} - 1}\
\sin\pars{x \over 2}\,\dd x
\,\,\,\stackrel{\cos\pars{x/2}\ \mapsto\ x}{=}\,\,\,
-4\root{2}\int_{1}^{\root{2}/2}\root{2x^{2} - 1}\,\dd x
\\[5mm] & \stackrel{\root{2}x\ \mapsto\ \cosh\pars{x}}{=}\,\,\,
4\root{2}\int_{\mrm{arccosh}\pars{1}}^{\mrm{arccosh}\pars{\root{2}}}
\sinh\pars{x}\,{\sinh\pars{x} \over \root{2}}\,\dd x =
4\int_{\mrm{arccosh}\pars{1}}^{\mrm{arccosh}\pars{\root{2}}}
{\cosh\pars{2x} - 1 \over 2}\,\dd x
\\[5mm] & =
\underbrace{\sinh\pars{2\,\mrm{arccosh}\pars{\root{2}}}}_{\ds{=\ 2\root{2}}}\ -\
\underbrace{\sinh\pars{2\,\mrm{arccosh}\pars{1}}}_{\ds{=\ 0}}\ -\
2\,\mrm{arccosh}\pars{\root{2}}\ +\
\underbrace{2\,\mrm{arccosh}\pars{1}}_{\ds{=\ 0}}
\\[5mm] & =
2\root{2} - 2\,\mrm{arccosh}\pars{\root{2}} =
2\root{2} - \left.2\ln\pars{x + \root{x^{2} - 1}}\right\vert_{\ x\ =\ \root{2}} \\[5mm] & =
\bbx{2\root{2} - 2\ln\pars{1 + \root{2}}} \approx 1.0657
\end{align}
