=∫[sin^2(x/2)+cos^2(x/2)]/2sin(x/2)cos(x/2)dx
=∫[tan(x/2)+cot(x/2)]d(x/2)
=—ln|cos(x/2)|+ln|sin(x/2)|+C
=ln|tan(x/2)|+C