Solution. We want to find the integral of \tan^{-1}(x), i.e.:
\begin{align*} \int \tan^{-1}(x) dx. \end{align*}
\begin{align*} \int UdV = UV - \int VdU, \end{align*}
\begin{align*} U = \tan^{-1}(x), \quad &dV = dx\\ dU = \frac{dx}{1 + x^2}, \quad &V = x. \end{align*}
\begin{align*} \int \tan^{-1}(x) dx = x\tan^{-1}(x) - \int \frac{x}{1 + x^2} dx. \end{align*}
\begin{align*} \int \tan^{-1}(x) dx &= x\tan^{-1}(x) - \int \frac{x}{1 + x^2} dx \\ &= x\tan^{-1}(x) - \frac{1}{2} \int \frac{1}{u} du \\ &= x\tan^{-1}(x) - \frac{1}{2} \ln\lvert u \rvert + C \\ &= x\tan^{-1}(x) - \frac{1}{2} \ln\lvert 1 + x^2 \rvert + C. \end{align*}