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

Also, $\cos x = \cos^2 (x/2) - \sin^2 (x/2)$.
Then letting $y=x/2$,
$$\frac{1-\cos x}{\sin x} = \frac{1 - \cos^2 y + \sin^2 y}{2 \sin y \cos y} = \frac{2 \sin^2 y}{2 \sin y \cos y} = \frac{\sin y}{\cos y} = \tan (x/2).$$
