How do you solve cos2x=sin^2x-2?