Integral of $$$x^{2} \operatorname{atan}{\left(x \right)}$$$

The calculator will find the integral/antiderivative of $$$x^{2} \operatorname{atan}{\left(x \right)}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int x^{2} \operatorname{atan}{\left(x \right)}\, dx$$$.

Solution

For the integral $$$\int{x^{2} \operatorname{atan}{\left(x \right)} d x}$$$, use integration by parts $$$\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}$$$.

Let $$$\operatorname{u}=\operatorname{atan}{\left(x \right)}$$$ and $$$\operatorname{dv}=x^{2} dx$$$.

Then $$$\operatorname{du}=\left(\operatorname{atan}{\left(x \right)}\right)^{\prime }dx=\frac{dx}{x^{2} + 1}$$$ (steps can be seen ») and $$$\operatorname{v}=\int{x^{2} d x}=\frac{x^{3}}{3}$$$ (steps can be seen »).

The integral becomes

$${\color{red}{\int{x^{2} \operatorname{atan}{\left(x \right)} d x}}}={\color{red}{\left(\operatorname{atan}{\left(x \right)} \cdot \frac{x^{3}}{3}-\int{\frac{x^{3}}{3} \cdot \frac{1}{x^{2} + 1} d x}\right)}}={\color{red}{\left(\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \int{\frac{x^{3}}{3 x^{2} + 3} d x}\right)}}$$

Simplify the integrand:

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - {\color{red}{\int{\frac{x^{3}}{3 x^{2} + 3} d x}}} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - {\color{red}{\int{\frac{x^{3}}{3 \left(x^{2} + 1\right)} d x}}}$$

Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=\frac{1}{3}$$$ and $$$f{\left(x \right)} = \frac{x^{3}}{x^{2} + 1}$$$:

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - {\color{red}{\int{\frac{x^{3}}{3 \left(x^{2} + 1\right)} d x}}} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - {\color{red}{\left(\frac{\int{\frac{x^{3}}{x^{2} + 1} d x}}{3}\right)}}$$

Since the degree of the numerator is not less than the degree of the denominator, perform polynomial long division (steps can be seen »):

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{{\color{red}{\int{\frac{x^{3}}{x^{2} + 1} d x}}}}{3} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{{\color{red}{\int{\left(x - \frac{x}{x^{2} + 1}\right)d x}}}}{3}$$

Integrate term by term:

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{{\color{red}{\int{\left(x - \frac{x}{x^{2} + 1}\right)d x}}}}{3} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{{\color{red}{\left(\int{x d x} - \int{\frac{x}{x^{2} + 1} d x}\right)}}}{3}$$

Apply the power rule $$$\int x^{n}\, dx = \frac{x^{n + 1}}{n + 1}$$$ $$$\left(n \neq -1 \right)$$$ with $$$n=1$$$:

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} + \frac{\int{\frac{x}{x^{2} + 1} d x}}{3} - \frac{{\color{red}{\int{x d x}}}}{3}=\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} + \frac{\int{\frac{x}{x^{2} + 1} d x}}{3} - \frac{{\color{red}{\frac{x^{1 + 1}}{1 + 1}}}}{3}=\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} + \frac{\int{\frac{x}{x^{2} + 1} d x}}{3} - \frac{{\color{red}{\left(\frac{x^{2}}{2}\right)}}}{3}$$

Let $$$u=x^{2} + 1$$$.

Then $$$du=\left(x^{2} + 1\right)^{\prime }dx = 2 x dx$$$ (steps can be seen »), and we have that $$$x dx = \frac{du}{2}$$$.

The integral can be rewritten as

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{{\color{red}{\int{\frac{x}{x^{2} + 1} d x}}}}{3} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{{\color{red}{\int{\frac{1}{2 u} d u}}}}{3}$$

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=\frac{1}{2}$$$ and $$$f{\left(u \right)} = \frac{1}{u}$$$:

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{{\color{red}{\int{\frac{1}{2 u} d u}}}}{3} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{{\color{red}{\left(\frac{\int{\frac{1}{u} d u}}{2}\right)}}}{3}$$

The integral of $$$\frac{1}{u}$$$ is $$$\int{\frac{1}{u} d u} = \ln{\left(\left|{u}\right| \right)}$$$:

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{{\color{red}{\int{\frac{1}{u} d u}}}}{6} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{{\color{red}{\ln{\left(\left|{u}\right| \right)}}}}{6}$$

Recall that $$$u=x^{2} + 1$$$:

$$\frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{\ln{\left(\left|{{\color{red}{u}}}\right| \right)}}{6} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{\ln{\left(\left|{{\color{red}{\left(x^{2} + 1\right)}}}\right| \right)}}{6}$$

Therefore,

$$\int{x^{2} \operatorname{atan}{\left(x \right)} d x} = \frac{x^{3} \operatorname{atan}{\left(x \right)}}{3} - \frac{x^{2}}{6} + \frac{\ln{\left(x^{2} + 1 \right)}}{6}$$

Simplify:

$$\int{x^{2} \operatorname{atan}{\left(x \right)} d x} = \frac{2 x^{3} \operatorname{atan}{\left(x \right)} - x^{2} + \ln{\left(x^{2} + 1 \right)}}{6}$$

Add the constant of integration:

$$\int{x^{2} \operatorname{atan}{\left(x \right)} d x} = \frac{2 x^{3} \operatorname{atan}{\left(x \right)} - x^{2} + \ln{\left(x^{2} + 1 \right)}}{6}+C$$

Answer

$$$\int x^{2} \operatorname{atan}{\left(x \right)}\, dx = \frac{2 x^{3} \operatorname{atan}{\left(x \right)} - x^{2} + \ln\left(x^{2} + 1\right)}{6} + C$$$A