Hey nszejna.

With regarsds to taking the square roots, remember that you have two solutions: a positive and a negative solution (unless you start with 0) so you can't just remove the square root.

An example is y^2 = 4, but y can be -2, +2: both squared will give the same answer.

One final tip is that sin^2 is positive which means that 1 - cos(x) must be positive but since cos(x) is always in [-1,1] it will be positive everywhere however sin(x) is only positive between 0 and pi (if you consider 0,2pi area) so if the x/2 is in (pi,2*pi) area then you will have a negative answer for sin(x).