Consider the given integral.
I=∫x2tan−1x1+x2dx
Let t=tan−1x
dt=11+x2dx
Therefore,
I=∫(tan2t)tdt
I=∫(sec2t−1)tdt
I=∫tsec2tdt−∫tdt
I=ttant−∫1tantdt−t22
I=ttant−(−log(cost))−t22+C
I=ttant+log(cost)−t22+C
On putting the value of t, we get
I=tan−1xtan(tan−1x)+log(cos(tan−1x))−(tan−1x)22+C
I=xtan−1x+log(cos(tan−1x))−(tan−1x)22+C
Hence, this is the answer.