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

Square everything to get
$$
\begin{align}
4&=\left(\sqrt{\sin^2(x)+\tfrac12}+\sqrt{\cos^2(x)+\tfrac12}\right)^2\\
&=2+2\sqrt{\tfrac34+\sin^2(x)\cos^2(x)}
\end{align}
$$
Since the sum of square roots is positive, we have not added any solutions. Therefore, we get
$$
\begin{align}
\tfrac14&=\sin^2(x)\cos^2(x)\\
1&=\sin^2(2x)
\end{align}
$$
The rest is pretty straightforward.
