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

Let $t=\cos^2x$. Then, we have$$\begin{align}\sqrt{1-t+\frac 12}=2-\sqrt{t+\frac 12}&\Rightarrow 1-t+\frac 12=4-4\sqrt{t+\frac 12}+t+\frac 12\\&\Rightarrow 4\sqrt{t+\frac 12}=2t+3\\&\Rightarrow 16\left(t+\frac 12\right)=4t^2+12t+9\\&\Rightarrow (2t-1)^2=0\\&\Rightarrow t=\frac 12\end{align}$$
If $\cos^2x=\frac 12$, then we have $\sin^2x=\frac 12$. So, it is sufficient.
