Let $I = \int 1 \cdot \tan^{-1} x \, dx$.
Using integration by parts,where $\tan^{-1} x$ is the first function and $1$ is the second function:
$I = \tan^{-1} x \int 1 \, dx - \int \left( \frac{d}{dx} \tan^{-1} x \cdot \int 1 \, dx \right) dx$
$I = x \tan^{-1} x - \int \frac{1}{1+x^2} \cdot x \, dx$
$I = x \tan^{-1} x - \frac{1}{2} \int \frac{2x}{1+x^2} \, dx$
Since the derivative of $1+x^2$ is $2x$,we use the substitution $u = 1+x^2$,$du = 2x \, dx$:
$I = x \tan^{-1} x - \frac{1}{2} \log |1+x^2| + C$
Since $1+x^2 > 0$ for all real $x$,we can write:
$I = x \tan^{-1} x - \frac{1}{2} \log (1+x^2) + C$,where $C$ is an arbitrary constant.