<s>[INST] How to get $ \cot(\theta/2)$ from $ \frac {\sin \theta} {1 - \cos \theta} $? According to wolfram alpha, $\dfrac {\sin \theta} {1 - \cos \theta} = \cot \left(\dfrac{\theta}{2} \right)$.
But how would you get to $\cot \left(\dfrac{\theta}{2} \right)$ if you're given $\dfrac {\sin \theta} {1 - \cos \theta}$?
 [/INST] It may not seem obvious at first, but substitute $\theta = 2\varphi$ first because we want to work with integer multiples of the angle rather than fractional multiples.
$$\begin{array}{rcl}
\dfrac{\sin \theta}{1 - \cos \theta} &=& \dfrac{\sin 2\varphi}{1 - \cos 2\varphi}
\end{array}$$
Then we use double angle formula.
$$\begin{array}{rcl}\dfrac{\sin \theta}{1 - \cos \theta} &=& \dfrac{2\sin \varphi\cos\varphi}{1-\left(1-2\sin^2 \varphi\right)}\\
&=& \dfrac{2\sin\varphi\cos\varphi}{2\sin^2\varphi}\\
&=& \dfrac{\color{blue}{2\sin \varphi} \cos \varphi}{\color{blue}{2\sin\varphi} \sin \varphi}\\
&=& \dfrac{\cos \varphi}{\sin\varphi}\\
&=& \cot \varphi
\end{array}$$
Recall that $\theta = 2\varphi$, so dividing by 2 on both sides gives $\varphi = \dfrac{\theta}{2}$.
We can conclude that 
$$\begin{array}{rcl}\dfrac{\sin \theta}{1 - \cos\theta} &=& \cot \varphi\\
&=& \boxed{\cot \left(\dfrac{\theta}{2}\right)}
\end{array}$$
</s>