Expressions of $\sin \frac{A}{2}$ and $\cos \frac{A}{2}$ in terms of $\sin A$ I am trying to understand the interpretation of $\sin \frac{A}{2}$ and $\cos \frac{A}{2}$ in terms of  $\sin A$ from my book, here is how it is given :
We have $ \bigl( \sin \frac{A}{2} + \cos \frac{A}{2} \bigr)^{2} = 1 + \sin A $ and $ \bigl( \sin \frac{A}{2} - \cos \frac{A}{2} \bigr)^{2} = 1 - \sin A $
By adding and subtracting we have $ 2 \cdot \sin \frac{A}{2} = \pm \sqrt{  1 + \sin A } \pm \sqrt{  1 - \sin A } $ ---- (1) and $ 2 \cdot \cos \frac{A}{2} = \mp \sqrt{  1 + \sin A } \mp \sqrt{  1 - \sin A } $ ---(2)
I have understood upto this far well,
Now they have broke the them into quadrants :
In 1st quadrant :
$$ 2 \cdot \sin \frac{A}{2} =  \sqrt{  1 + \sin A } - \sqrt{  1 - \sin A } $$
$$ 2 \cdot \cos \frac{A}{2} =  \sqrt{  1 + \sin A } + \sqrt{  1 - \sin A } $$
In 2nd quadrant :
$$ 2 \cdot \sin \frac{A}{2} =  \sqrt{  1 + \sin A } + \sqrt{  1 - \sin A } $$
$$ 2 \cdot \cos \frac{A}{2} =  \sqrt{  1 + \sin A } - \sqrt{  1 - \sin A } $$
In 3rd quadrant :
$$ 2 \cdot \sin \frac{A}{2} =  \sqrt{  1 + \sin A } - \sqrt{  1 - \sin A } $$
$$ 2 \cdot \cos \frac{A}{2} =  \sqrt{  1 + \sin A } + \sqrt{  1 - \sin A } $$
In 4th quadrant :
$$ 2 \cdot \sin \frac{A}{2} =  - \sqrt{  1 + \sin A } - \sqrt{  1 - \sin A } $$
$$ 2 \cdot \cos \frac{A}{2} =   - \sqrt{  1 + \sin A } + \sqrt{  1 - \sin A } $$
Now, In knew the ALL-SINE-TAN-COSINE rule but still I am not able to figure out how the respective signs are computed in these (above) cases.

We have that
$$\cos A=\cos \left(2\cdot\frac{A}{2}\right) = \cos^2{\frac{A}{2}}-\sin^2{\frac{A}{2}}$$
and
$$1 = \cos^2{\frac{A}{2}}+\sin^2{\frac{A}{2}}.$$
Therefore
\begin{align*}
1+\cos A & = \cos^2{\frac{A}{2}}-\sin^2{\frac{A}{2}} + \cos^2{\frac{A}{2}}+\sin^2{\frac{A}{2}} \\
 & = 2\cos^2{\frac{A}{2}} \\
 \Rightarrow \frac{1+\cos A}{2} & = \cos^2{\frac{A}{2}} \\
 \Rightarrow \cos\frac{A}{2} & = \sqrt{\frac{1+\cos A}{2}}.
\end{align*}
and
\begin{align*}
1-\cos A & = \cos^2{\frac{A}{2}}+\sin^2{\frac{A}{2}} - \cos^2{\frac{A}{2}}+\sin^2{\frac{A}{2}} \\
 & = 2\sin^2{\frac{A}{2}} \\
 \Rightarrow \frac{1-\cos A}{2} & = \sin^2{\frac{A}{2}} \\
 \Rightarrow \sin\frac{A}{2} & = \sqrt{\frac{1-\cos A}{2}}.
\end{align*}
