How do you integrate int x(lnx)^2  using integration by parts?

May 20, 2018

The answer is $= {x}^{2} / 2 {\left(\ln x\right)}^{2} - {x}^{2} / 2 \ln x + {x}^{2} / 4 + C$

Explanation:

The integration by parts is

$\int u v ' = u v - \int u ' v$

Here,

$u = {\left(\ln x\right)}^{2}$, $\implies$, $\mathrm{du} = \frac{2}{x} \ln x$

$v ' = x$, $\implies$, $v = {x}^{2} / 2$

Therefore, the integral is

$\int x {\left(\ln x\right)}^{2} \mathrm{dx} = {x}^{2} / 2 {\left(\ln x\right)}^{2} - \int \frac{2}{x} \ln x \cdot {x}^{2} / 2 \mathrm{dx}$

$= {x}^{2} / 2 {\left(\ln x\right)}^{2} - \int x \ln x \mathrm{dx}$

To calculate $\int x \ln x \mathrm{dx}$, perform the integration by parts

$u = \ln x$, $\implies$, $u ' = \frac{1}{x}$

$v ' = x$, $\implies$, $v = {x}^{2} / 2$

Therefore,

$\int x \ln x \mathrm{dx} = {x}^{2} / 2 \ln x - \int \frac{1}{x} \cdot {x}^{2} / 2 \mathrm{dx}$

$= {x}^{2} / 2 \ln x - \frac{1}{2} \int x \mathrm{dx}$

$= {x}^{2} / 2 \ln x - {x}^{2} / 4$

Putting all together

$\int x {\left(\ln x\right)}^{2} \mathrm{dx} = {x}^{2} / 2 {\left(\ln x\right)}^{2} - {x}^{2} / 2 \ln x + {x}^{2} / 4 + C$