=∫ 1/sinx dx
= ∫1/[2sin (x/2) cos (x/2)] dx, double angle formula.
=∫ 1/[sin(x/2)cos(x/2)]d(x/2)
=∫ 1/tan(x/2)* seconds? (x/2) d(x/2)
=∫ 1/tan(x/2) d[tan(x/2)], note ∫sec? (x/2)d(x/2)=tan(x/2)+C
=ln|tan(x/2)|+C, this is the first answer.
Further simplify:
=ln|sin(x/2)/cos(x/2)|+C
=ln|2sin(x/2)cos(x/2)/[2cos? (x/2)]|+C, and solve the double angle formula.
=ln|sinx/( 1+cosx)|+C
=ln|sinx( 1-cosx)/sin? x|+C
=ln|( 1-cosx)/sinx|+C
=ln|cscx-cotx|+C, this is the second answer.
For reference only.