(tanx+cotx)dx=∫(tanx+tanx1)dx=∫tanxtanx+1dxLet u=tanx, then u2=tanx and2udu=sec2xdx=(1+tan2x)dx=(1+u4)dx=∫uu2+1⋅1+u42udu=∫1+u42(u2+1)du=∫u21+u22(1+u21)du=∫(u−u1)2+22(1+u21)duAgain, Let v=u−u1⇒dv=(1+u21)du=∫2(2v2+1)2dv=∫(2v2+1)1dv=∫(2v)2+11dv=tan−1(2v)⋅2+Cwhere c= constant=2tan−1(2u−u1)+C=2tan−1(2tanx−tanx1)+C=2tan−1(2tanxtanx−1)+C