<s>[INST] Finding the the derivative of $y=\sqrt{1-\sin x}; 0A question I'm attempting is:

Find the derivative of $ y = \sqrt {1 - \sin x} ; 0 < x <\pi/2$.

I did this:
$y = \sqrt {1 - \sin x} = \sqrt {\cos^2\frac{x}{2} + \sin^2\frac{x}{2} - 2\sin \frac{x}{2}\cos \frac{x}{2}} = \sqrt { (\sin \frac{x}{2}-\cos \frac{x}{2})^2} = \sin \frac{x}{2} - \cos \frac{x}{2}$
So,  $\frac{dy}{dx} = \frac{1}{2} \cdot (\cos\frac{x}{2} + \sin\frac{x}{2})$. 
But apparently this is wrong. The correct solution is:
$\frac{dy}{dx} = -\frac{1}{2}\cdot(\cos\frac{x}{2} + \sin\frac{x}{2})$. 
So I want to know what I have done wrongly here. Why is my answer not right?
 [/INST] An option:
$y^2 = 1-\sin x$; $0\lt x\lt π/2.$
Differentiate both sides with respect to x:
$2y\dfrac{dy}{dx} = -\cos x;$
Since $y \not =0:$
$\dfrac{dy}{dx} = -\dfrac{\cos x}{2\sqrt{1-\sin x}}$.
</s>