I don't understand how rationalizing the numerator of tan(1/2)x=sin x/(1+cos x) results tan(1/2)x=(1-cos x)/sin x. The question is what do you multiply by to the first equation to get the second.

[sin x/(1+cos x)] [ [1-cos x)/(1-cos x) ]

= sin x (1-cos x) /(1 - cos^2 x)

BUT
1 - cos^2 x = sin^2 x

get it?