Источник TeX:
\text{ctg}\alpha=\frac{1-\text{tg}^2(\frac{\alpha}{2})}{2\text{tg}\frac{\alpha}{2}}