# Evaluate the integral: $\displaystyle \int x \tan^{-1}\ x \,\mathrm{d}x$

Evaluate the integral:

$$\int x\tan^{-1}x\,\mathrm{d}x$$

What I have so far:

$$u = \tan^{-1}x$$ $$\mathrm{d}u = \frac{1}{1+x^2}\,\mathrm{d}x$$ $$\mathrm{d}v = x\,\mathrm{d}x$$ $$v = \frac{x^2}2$$

$$(*) \int u\ \mathrm{d}v = uv - \int v \ \mathrm{d}u$$ $$\left(\tan^{-1}x\right)\frac{x^2}2 - \frac12\int x^2\cdot\frac{1}{1+x^2}\,\mathrm{d}x$$ $$\left(\tan^{-1}x\right)\frac{x^2}2 - \frac12\int \frac{x^2}{1+x^2}\,\mathrm{d}x$$

The problem I have now is how to integrate the integral $\displaystyle \int \dfrac{x^2}{1+x^2}\,\mathrm{d}x$.

It doesn't look like a U-substitution will get me any further nor can I make a trig substitution.

-
When you always encounter integrals expressed in fraction Method of Partial fraction have to be your first tool. – albo Mar 7 '14 at 7:06

Notice that $$\frac{x^2}{x^2+1} = \frac{x^2+1-1}{x^2+1} = 1-\frac{1}{1+x^2}$$

-
Thanks Spencer! Didn't realize we could do that :p – Sc4r Dec 15 '13 at 20:45
No problem, it is such a useful trick. You can always do polynomial long division as was suggested but in some cases this is faster. – Spencer Dec 15 '13 at 20:49

Make polynomial division, then use $\left(\arctan(x)\right)'=\frac{1}{1+x^2}$.

-

Write it as $1-\dfrac1{1+x^2}$ and integrate term-wise.

-