∫ 1/sin x dx ( multiply numerator and denominator by sin x )
= ∫1• sin x / sinx • sinx dx
= ∫ sin x/ sin² x dx
= ∫ sin x / (1-cos² x ) dx ( sin² x + cos² x = 1 )
Let u= cos x. du = - sin x dx
= - ∫ sin x /( 1 - u² ) sin x du. ( sin x cancels out )
= - ∫ 1/( 1 - u² ) du.
= ∫ 1/( u² - 1 ) du. ( by changing signs )
= 1/2 [ ∫ 1/(u - 1) - 1/( u + 1 )] du. [ 1/(u² - 1 ) = 1/2 { 1/(u - 1) - 1/(u + 1) } by partial fraction]
= 1/2 ln | ( u - 1 ) - ( u + 1 ) | +C
= 1/2 ln | (u - 1) / ( u + 1) | + C ( substitute back u = cos x )
= 1/2 ln | ( cos x - 1) /( cos x + 1) | + C