Let I=∫1tanx+cotx+secx+cscxdx
I=∫1sinxcosx+cosxsinx+1cosx+1sinxdx
=∫sinxcosxsin2x+cos2x+sinx+cosxdx
=∫sinxcosx1+cosx+sinxdx
=∫2sinx2cosx2cosx2cos2x2+2sinx2cosx2dx
=∫2cosx2(sinx2cosx)2cosx2(cosx2+sinx2)dx
=∫sinx2(cos2x2−sin2x2)cosx2+sinx2dx
=∫sinx2(cosx2−sinx2)(cosx2+sinx2)cosx2+sinx2dx
=∫sinx2cosx2dx−∫sin2x2dx
=12∫2sinx2cosx2dx−∫1−cosx2dx
=12∫sinxdx−12∫dx+12∫cosxdx
=−12cosx−12x+12sinx+c
=sinx−cosx−x2+c