Why isn't this square root $+$ or $-$? I was tasked with proving the identity $\tan(\frac x 2) = \dfrac {\sin(x)}{1+\cos(x)}$
I used the quotient identity for tangent and the half angle identities for sine and cosine to get $ \pm \dfrac {\sqrt{\dfrac {1-\cos(x)}{2}}}{\sqrt{\dfrac {1-\cos(x)}{2}}}$
which I reduced to $\pm \sqrt{\dfrac {1-\cos(x)}{1+\cos(x)}}$
I multiplied the fraction (within the square root) by $ \dfrac {1+ \cos(x)}{1+\cos(x)}$
Resulting in $\pm \sqrt{\dfrac {1-\cos^{2}(x)}{(1+\cos(x))^2}}$
Using the Pythagorean identity, I get $\pm\sqrt{\dfrac {\sin^{2}(x)}{(1+\cos(x))^2}}$
Taking the square root of the numerator and denominator I further reduced to $\pm \dfrac {\sin(x)}{1+\cos(x)}$
I thought I was done but when I checked my work in the answer book, it showed $ \left|\dfrac {\sin(x)}{1+\cos(x)}\right|$
Where do they get the absolute value from? 

Avoid unnecessary squaring wherever possible.
If we use the following approach, no such confusion arises.
$$\tan\frac{x}{2}=\frac{\sin\frac{x}{2}}{\cos\frac{x}{2}}$$
Now multiply numerator & denominator by $2\cos\frac{x}{2}$
$$\frac{\sin\frac{x}{2}}{\cos\frac{x}{2}}=\frac{2\cos\frac{x}{2}\sin\frac{x}{2}}{2\cos^2\frac{x}{2}}.$$
Now $\sin2A=2\sin A\cos A$   and $\cos2A=2\cos^2A-1$
So, $\tan\frac{x}{2}=\frac{\sin x}{1+\cos x}$
If the multiplier is $2\sin\frac{x}{2}$,  $\tan\frac{x}{2}$ will be $\frac{1-\cos x}{\sin x}$ which is same as $\frac{\sin x}{1+\cos x}$

If we follow your approach also, just observe that $1+\cos x$ can not be negative as $-1≤\cos A≤1$  and $\frac{\tan\frac{x}{2}}{\sin x}=\frac{\sin\frac{x}{2}}{\cos\frac{x}{2}2\cos\frac{x}{2}\sin\frac{x}{2}}=\frac{1}{2\cos^2\frac{x}{2}}$ which also $>0$.
So the sign of $\frac{\tan\frac{x}{2}}{\frac{\sin x}{1+\cos x}}$ is positive.
So the sign of $\tan\frac{x}{2}$ and $\frac{\sin x}{1+\cos x}$ are same.
