# What is the antiderivative of  (ln x)^2/x^2?

Mar 17, 2016

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

#### Explanation:

First, we will use substitution

Let $t = \ln \left(x\right) \implies \mathrm{dt} = \frac{1}{x} \mathrm{dx}$ and $x = {e}^{t}$

Then

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

Next, we will use the integration by parts forumla
$\int u \mathrm{dv} = u v - \int v \mathrm{du}$

Integration by Parts 1:

Let $u = {t}^{2}$ and $\mathrm{dv} = {e}^{-} t \mathrm{dt}$
Then $\mathrm{du} = 2 t$ and $v = - {e}^{-} t$

Applying the formula:
$\int {t}^{2} {e}^{-} t \mathrm{dt} = - {t}^{2} {e}^{-} t + 2 \int t {e}^{-} t \mathrm{dt}$

Integration by Parts 2:
Focusing on the remaining integral...

Let $u = t$ and $\mathrm{dv} = {e}^{-} t \mathrm{dt}$
Then $\mathrm{du} = \mathrm{dt}$ and $v = - {e}^{-} t$

Applying the formula:
$\int t {e}^{-} t \mathrm{dt} = - t {e}^{-} t + \int {e}^{-} t \mathrm{dt}$

$= - t {e}^{-} t - {e}^{-} t + C$

$= - {e}^{-} t \left(t + 1\right) + C$

Substituting back, we have

$\int {t}^{2} {e}^{-} t \mathrm{dt} = - {t}^{2} {e}^{-} t + 2 \left[- {e}^{-} t \left(t + 1\right)\right] + C$

$= - {e}^{-} t \left({t}^{2} + 2 t + 2\right) + C$

Finally, substituting $x$ back in gives our final result:

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