# How do solve ∫x tan^-1x dx, given that d/dx tan^-1x = 1/(1+x^2) ?

Jan 10, 2017

$\frac{\left({x}^{2} + 1\right) {\tan}^{-} 1 \left(x\right) - x}{2} + C$

#### Explanation:

$I = \int x {\tan}^{-} 1 \left(x\right) \mathrm{dx}$

We will use integration by parts. Integration by parts takes the form $\int u \mathrm{dv} = u v - \int v \mathrm{du}$.

Since we cannot integrate ${\tan}^{-} 1 \left(x\right)$ well, let $u = {\tan}^{-} 1 \left(x\right)$ (notice you've also been provided with the derivative of ${\tan}^{-} 1 \left(x\right)$ in the question). Thus, let $\mathrm{dv}$ be the remaining portion: $\mathrm{dv} = x \mathrm{dx}$.

Differentiating $u$ and integrating $\mathrm{dv}$:

• $u = {\tan}^{-} 1 \left(x\right) \text{ "=>" } \mathrm{du} = \frac{1}{1 + {x}^{2}} \mathrm{dx}$
• $\mathrm{dv} = x \mathrm{dx} \text{ "=>" } v = {x}^{2} / 2$

Then:

$I = u v - \int v \mathrm{du} = {x}^{2} / 2 {\tan}^{-} 1 \left(x\right) - \int {x}^{2} / 2 \left(\frac{1}{1 + {x}^{2}}\right) \mathrm{dx}$

Simplifying slightly:

$I = {x}^{2} / 2 {\tan}^{-} 1 \left(x\right) - \frac{1}{2} \int {x}^{2} / \left(1 + {x}^{2}\right) \mathrm{dx}$

Rewrite the integrand as follows, or perform polynomial long division on ${x}^{2} / \left(1 + {x}^{2}\right)$:

$I = {x}^{2} / 2 {\tan}^{-} 1 \left(x\right) - \frac{1}{2} \int \frac{1 + {x}^{2} - 1}{1 + {x}^{2}} \mathrm{dx}$

$I = {x}^{2} / 2 {\tan}^{-} 1 \left(x\right) - \frac{1}{2} \int \frac{1 + {x}^{2}}{1 + {x}^{2}} \mathrm{dx} - \frac{1}{2} \int \frac{1}{1 + {x}^{2}} \mathrm{dx}$

$I = {x}^{2} / 2 {\tan}^{-} 1 \left(x\right) - \frac{1}{2} \int \mathrm{dx} - \frac{1}{2} \int \frac{- 1}{1 + {x}^{2}} \mathrm{dx}$

Note that $\int \mathrm{dx} = x$. Furthermore, since $\frac{d}{\mathrm{dx}} {\tan}^{-} 1 \left(x\right) = \frac{1}{1 + {x}^{2}}$, we see that $\int \frac{1}{1 + {x}^{2}} \mathrm{dx} = {\tan}^{-} 1 \left(x\right)$.

$I = {x}^{2} / 2 {\tan}^{-} 1 \left(x\right) - \frac{1}{2} x + \frac{1}{2} {\tan}^{-} 1 \left(x\right)$

Which we may write as:

$I = \frac{{x}^{2} {\tan}^{-} 1 \left(x\right) - x + {\tan}^{-} 1 \left(x\right)}{2}$

Rearranging and adding the constant of integration:

$I = \frac{\left({x}^{2} + 1\right) {\tan}^{-} 1 \left(x\right) - x}{2} + C$