# Find  int ln^2x dx ?

Nov 28, 2017

$\int \setminus {\ln}^{2} x \setminus \mathrm{dx} = {x}^{2} \ln x - 2 x \ln x + 2 x + C$

#### Explanation:

We seek:

$I = \int \setminus {\ln}^{2} x \setminus \mathrm{dx}$

We can apply integration by Parts:

Let $\left\{\begin{matrix}u & = {\ln}^{2} x & \implies \frac{\mathrm{du}}{\mathrm{dx}} & = \frac{2 \ln x}{x} \\ \frac{\mathrm{dv}}{\mathrm{dx}} & = 1 & \implies v & = x\end{matrix}\right.$

Then plugging into the IBP formula:

$\int \setminus \left(u\right) \left(\frac{\mathrm{dv}}{\mathrm{dx}}\right) \setminus \mathrm{dx} = \left(u\right) \left(v\right) - \int \setminus \left(v\right) \left(\frac{\mathrm{du}}{\mathrm{dx}}\right) \setminus \mathrm{dx}$

We have:

$\int \setminus \left({\ln}^{2} x\right) \left(1\right) \setminus \mathrm{dx} = \left({\ln}^{2} x\right) \left(x\right) - \int \setminus \left(x\right) \left(\frac{2 \ln x}{x}\right) \setminus \mathrm{dx}$
$\therefore I = {x}^{2} \ln x - 2 \int \setminus \ln x \setminus \mathrm{dx}$

Now consider the last integral:

${I}_{1} = \int \setminus {x}^{2} \sin 2 x \setminus \mathrm{dx}$

We can again apply integration by parts a second time for the second integral:

Let $\left\{\begin{matrix}u & = \ln x & \implies \frac{\mathrm{du}}{\mathrm{dx}} & = \frac{1}{x} \\ \frac{\mathrm{dv}}{\mathrm{dx}} & = 1 & \implies v & = x\end{matrix}\right.$

Then plugging into the IBP formula:

$\int \setminus \left(\ln x\right) \left(1\right) \setminus \mathrm{dx} = \left(\ln x\right) \left(x\right) - \int \setminus \left(x\right) \left(\frac{1}{x}\right) \setminus \mathrm{dx}$
$\therefore \int \setminus \ln x \setminus \mathrm{dx} = x \ln x - \int \setminus \mathrm{dx}$
$\therefore \int \setminus \ln x \setminus \mathrm{dx} = x \ln x - x$

Using this result along with the earlier result we find:

$I = {x}^{2} \ln x - 2 \left(x \ln x - x\right) + C$
$\setminus \setminus = {x}^{2} \ln x - 2 x \ln x + 2 x + C$