\sqrt{-1+\cos^2 x}=\pm i\sin x