Consider the given integral.
I=∫11+tanxdx
Put,
t=tanx
dt=sec2xdx
dt=(1+tan2x)dx
Therefore,
I=∫1(t+1)(t2+1)dt
I=12∫1(t+1)dt−12∫t−1(t2+1)dt
I=12∫1(t+1)dt−12∫t(t2+1)dt+12∫1(t2+1)dt
I=12∫1(t+1)dt−14∫2t(t2+1)dt+12∫1(t2+1)dt
I=12ln(t+1)−14ln(t2+1)+12tan−1t+C
On putting the value of t, we get
I=12ln(tanx+1)−14ln(tan2x+1)+12tan−1(tanx)+C
I=12ln(tanx+1)−14ln(tan2x+1)+x2+C
Hence, this is the required value of the integral.