Consider the following integral.
I=∫1sinx+secxdx
=∫2cosx2+2sinxcosxdx
=∫cosx−sinx+sinx+cosx1+sin2x+cos2x+2sinxcosxdx
=∫sinx+cosx1+(sinx+cos)2dx+∫cosx−sinx1+(sinx+cos)2dx
I=I1+I2
Integrate I1and I2 we get,
I1=∫sinx+cosx1+(sinx+cos)2dx$
Let, t=sinx+cosx
And differentiate both side w.r.t x
dt=(cosx−sinx)dx
=∫cosx−sinx1+(t)2∗1(cosx−sinx)dt
=∫11+(t)2dt
=tan−1t+C
+tan−1(sinx+cosx)+C
I2=∫sinx+cosx2+sin2xdx
=∫sinx+cosx3−(1−sin2x)dx
=∫sinx+cosx3−(sin2x+cos2−2sinxcosx)dx
=∫sinx+cosx3−(sinx−cosx)dx
u=sinx−cosx
dx=dusinx+cosx
I2=∫sinx+cosx√3−u2du(sinx+cosx)
=∫1(√3)2−u2du
=1√3ln(√3+u√3−u)
=1√3ln(√3+sinx−cosx√3−(sinx−cosx))
I=∫1sinx+secxdx=1√3ln(√3+sinx−cosx√3−(sinx−cosx))+tan−1(sinx+cosx)+C
Hence, this is the correct answer.