Let I=∫sinx+cosx√sin2x+1dx=∫(sinx√sin2x+1+cosx√sin2x+1)dx
I=I1+I2
Where
I1=∫sinx√sin2x+1dx=∫sinx√2sinxcosx(sinx+cosx)2dx
=∫tanxsec2xtan3x+tan2x+tanx+1dx
Put t=tanx⇒dt=sec2xdx
Therefore
I1=∫tt3+t2+t+1dt=∫(t+12(t2+1)−12(t+1))dt
=12∫tt2+1dt+12∫1t2+1dt−12∫1t+1dt
=12tan−1t+14log(t2+1)−12log(t+1)
=12x+14log(tanx2+1)−12log(tanx+1)
And
I2=∫cosx√sin2x+1dx=∫cosx√2sinxcosx+1(sinx+cosx)2dx
=∫sec2xtan3x+tan2x+tanx+1dx
Put u=tanx⇒du=sec2xdx
Therefore
I2=∫1u3+u2+u+1du=∫(1−u2(u2+1)+12(u+1))du
=−12∫uu2+1du+12∫1u2+1du+12∫1u+1du
=−14log(u2+1)+12tan−1u+12log(t+1)
=−14log(tanx2+1)+12x+12log(tanx+1)
Hence
I=12x+12x=x