Sum of real solutions on equation $\sqrt{\sin^2{x} + {1 \over 2}} + \sqrt{\cos^2{x} + {1 \over 2}} = 2$ in interval $[0,2\pi]$ is? I know that solution is $4\pi$ but I do not know how do they get to this solution. I always get that $x \in R$ and that  $-1 < \cos 2x < 1$ when converting it to double angle.
EDIT : So ok, I tried to do this and at the end I get that $\sin^2{2x} = 1$ which when I solve I get that solutions are $2x = {\pi\over2}$ and $2x = {3\pi\over2}$ but when I sum up these two I get that result is $\pi$, which is not the solution by my booklet $(4\pi)$. 

Using the Cauchy-Schwarz inequality. which states that for any 2 vectors $( a, b )$ and $( c, d )$ with $a,b,c,d \ge 0$:
$$(ac + bd)^2 \le (a^2 + b^2)(c^2 + d^2) $$
Let $a = \sqrt{\sin^2 x + \frac{1}{2}}$, $b = \sqrt{\cos^2 x + \frac{1}{2}}$ and $c = d = 1$ we have
$$ \left(\sqrt{\sin^2 x + \frac{1}{2}} + \sqrt{\cos^2 x + \frac{1}{2}}\right)^2 \le \left( \sin^2 x + \frac{1}{2} + \cos^2 x + \frac{1}{2}\right)(1^2+1^2) = 4 $$
or 
$$ \sqrt{\sin^2 x + \frac{1}{2}} + \sqrt{\cos^2 x + \frac{1}{2}} \le 2 $$
The equality happens only when $\frac{a}{c} = \frac{b}{d}$, or $\sin^2 x = \cos^2 x = \frac{1}{2}$. That's 4 solutions on the interval $[0, 2\pi]$
