Let I=∫xtan−1xdx
Taking tan−1x as first function and x as second function and integrating by parts, we obtain
I=tan−1x∫xdx−∫{(ddxtan−1x)∫xdx}dx
=tan−1x(x22)−∫11+x2⋅x22dx
=x2tan−1x2−12∫x21+x2dx
=x2tan−1x2−12∫(x2+11+x2−11+x2)dx
=x2tan−1x2−12∫(1−11+x2)dx
=x2tan−1x2−12(x−tan−1x)+C
=x2tan−1x−x2+12tan−1x+C