Integrate $\int x \, \tan^{-1} (x) \, dx$
My Attempt: \begin{align} \int x \, \tan^{-1} (x) \, dx &= \int x \, \tan^{-1} (x) \, dx \\ &= \dfrac {x^2}{2} \tan^{-1} (x) - \int \dfrac {x^2}{x^2+1} \, dx. \end{align}
Integrate $\int x \, \tan^{-1} (x) \, dx$
My Attempt: \begin{align} \int x \, \tan^{-1} (x) \, dx &= \int x \, \tan^{-1} (x) \, dx \\ &= \dfrac {x^2}{2} \tan^{-1} (x) - \int \dfrac {x^2}{x^2+1} \, dx. \end{align}
Using integration by parts, let $u=\tan^{-1}(x)\Rightarrow du=\frac{1}{x^{2}+1}dx$ and $dv=x\:dxdx\Rightarrow v=\frac{1}{2}x^{2}$. Then we have $\int x\tan^{-1}(x)\:dx=\frac{1}{2}x^{2}\tan^{-1}(x)-\frac{1}{2}\int\frac{x^{2}}{x^{2}+1}\:dx$. The integral $$\int\frac{x^{2}}{x^{2}+1}\:dx$$ is a standard trigonometric substitution (or rewrite it as was suggested above). If you use the trig sub, you let $x=\tan(\theta)$ such that $dx=\sec^{2}(\theta)$ and $$\int\frac{x^{2}}{x^{2}+1}\:dx=\int\frac{\tan^{2}(\theta)}{\tan^{2}(\theta)+1}\sec^{2}(\theta)\:d\theta=\int\tan^{2}(\theta)\:d\theta=\int(\sec^{2}(\theta)-1)\:d\theta.$$ Finish off the integration and then return to $x$ as your variable via the equation $\tan(\theta)=\frac{x}{1}$.