∫11+cotxdxMultiplying numerator and denominarator tansec2x
∫tanx(1+tanx)sec2xdx=∫tanxsec2x(1+tanx)(1+tan2x)dx
tanx=tsec2xdx=dt
∫t(1+t)(1+t2)dt
Breaking into partial fractions
=−12∫dtt+1+12+∫tdtt2+1+12∫dt2t2+1
=−12ln(|t+1|)+14ln(|t2+1|)+12tan−1t+c
Put t=tanx
=−12ln(tanx+1)+14ln(|1+tan2x|)+12tan−1tanx+c
=12ln(|secx||1+tanx|)+12x+c
=−12ln(|sinx+cosx|)+12x+c