<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] you can do $\dfrac{1-\cos x}{\sin x} = \dfrac{\cos 0 - \cos x}{\sin 0 + \sin x}=\dfrac{2\cos x/2 \cos x/2}{2 \sin x/2 \cos x/2} = \tan(x/2).$  
we used $\cos a -\cos b = 2\cos (a-b)/2 \cos(a+b)/2$ and $\sin a + \sin b = 2 \sin(a+b)/2 \cos (a-b)/2$ with $a = 0$ and $b = x.$
</s>