\sqrt{\frac{1+\cos x}2}=|\cos(x/2)|