Integrating by Parts to Find \(\int \tan^{-1} x\, dx\)

Derive the formula \[\bbox[5px, border:1px solid black, #F9F7ED]{ \int \tan ^{-1}x\,dx=x\,\tan ^{-1}x-\dfrac{1}{2}\ln \,(1+x^{2})+C } \]

Solution We use the integration by parts formula with \[ u=\tan ^{-1}x\qquad \hbox{and }\qquad dv=dx \]

Then \[ du=\frac{1}{1+x^{2}}\,dx\qquad \hbox{and}\qquad v=\int dx=x \] and \[ \int \tan ^{-1}x\,dx=x\cdot \tan ^{-1}x-\int \frac{x}{1+x^{2}}dx \]

To find the integral \(\int \dfrac{x}{1+x^{2}}dx\), we use the substitution \( t=1+x^{2}\). Then \(dt=2x\,dx\), or equivalently, \(x~dx=\dfrac{dt}{2}.\) \[ \begin{equation*} \int \frac{x}{1+x^{2}}dx=\frac{1}{2}\int \frac{dt}{t}=\frac{1}{2}\ln \vert \,t\vert =\frac{1}{2}\ln (1+x^{2}) \end{equation*} \]

As a result, \(\int \tan ^{-1} x \,dx=x \tan ^{-1}x-\dfrac{1}{2}\ln (1+x^{2})+C\).