<s>[INST] From $\frac{1-\cos x}{\sin x}$ to $\tan\frac{x}{2}$ How can I write $\frac{1-\cos x}{\sin x}$ as $\tan\frac{x}{2}$? I wrote $\sin x$ as $2\sin\frac{x}{2} \cos\frac{x}{2}$ also used the double angle identity for $\cos$ but wasn't able to make much progress
 [/INST] Replacing 1 with $\cos\frac2{x}{2}$ + $\sin\frac{x}{2}$, $\cos$$x$ with  $\cos\frac2{x}{2}- \sin\frac{x}{2}$ and $\sin$$x$ with $2\sin\frac{x}{2}$$\cos\frac{x}{2}$ the numerator and denominator simplify to $2\sin^2\frac{x}{2}$ and $2\cos\frac{x}{2}\sin\frac{x}{2}$ and hence the fraction simplifies to $\tan\frac{x}{2}$.
</s>