The correct option is D −elogtan−1x−cotx+c
Let
I=∫x2+cos2xx2+1cosec2 xdx
=∫x2+1−1+cos2xx2+1cosec2 xdx
=∫(1−sin2xx2+1)cosec2 xdx
=∫(cosec2 x−1x2+1)dx
=−cotx−tan−1x+c⋯(1)
=−cotx+cot−1x−π2+c
=−cotx+cot−1x+c
From (1),
I=−tan−1x−cosec xsecx+c
Again from (1)
I=−elogtan−1x−cotx+c