<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] $$y = \sqrt {1 - \sin x} ; 0 < x <\pi/2$$
$$ y' = \frac {-\cos x}{2 \sqrt {1 - \sin x}}$$
$$=\frac {-\cos x\sqrt {1 + \sin x  }}{2 \cos x}$$
$$=-\frac {\sqrt {1 + \sin x}}{2}=-\frac12(\sin x/2+\cos x/2)$$
Note that $$(\sin x/2+\cos x/2)^2=1+2\sin x/2\cos x/2=1+\sin x$$
</s>