Given,∫1−cotx1+cotxdx=∫(1−cosxsinx)(1+cosxsinx)dx=∫sinx−cosxsinxsinx+cosxsinxdx=∫sinx−cosxsinx+cosxdxLetusassume,sinx+cosx=u.differentiatingbothsidesweget,(cosx−sinx)dx=du⇒−(−cosx+sinx)dx=du⇒(−cosx+sinx)dx=−du⇒(sinx−cosx)dx=−dunowsubstituingthesevaluesweget,∫sinx−cosxsinx+cosxdx=∫(−duu)=∫(−1u)du=−logu=−log(sinx+cosx).