We have,
∫dxtanx+cotx+secx+cscx
⇒∫dxsinxcosx+cosxsinx+1cosx+1sinx
⇒∫dxsin2x+cos2x+sinx+cosxsinxcosx
⇒∫sinxcosxdx1+sinx+cosx
⇒∫2sinx2cosx2cosxdx1+2cos2x2−1+2sinx2cosx2
⇒∫2cosx2sinx2(cos2x2−sin2x2)2cosx2(cosx2+sinx2)dx
⇒∫2cosx2sinx2(cosx2−sinx2)(cosx2+sinx2)2cosx2(cosx2+sinx2)dx
⇒∫sinx2(cosx2−sinx2)1dx
⇒∫sinx2(cosx2−sinx2)dx
⇒∫sinx2cosx2dx−∫sin2x2dx
⇒12∫2sinx2cosx2dx−∫1−cosx2dx
⇒12∫sinxdx−12∫1dx+12∫cosxdx
On integration and we get,
⇒12(−cosx)−12x+12sinx+C
⇒12sinx−12cosx−12x+C
Hence, this is the
answer.