Problem 150
Medium Trigonometric Integrals

Evaluate the integral: I = integral (ln²x)/(x²) dx

Evaluate the integral: $$ I = \int \frac{\ln^2x}{x^2}\,dx. $$

Explanation of Method

Substituting $x=e^u$ (so $u=\ln x$) turns the integrand into $u^2e^{-u}$, a standard polynomial-times-exponential integral that is resolved by two applications of integration by parts.

  1. Substitute $u=\ln x$, i.e. $x=e^u$.
  2. Apply integration by parts twice to $\int u^2e^{-u}\,du$.
  3. Substitute back and simplify.

Step 1 · Substitution

Let $u=\ln x$, so $x=e^u$ and $dx=e^u\,du$. Then:

$$ \frac{\ln^2x}{x^2}\,dx = \frac{u^2}{e^{2u}}\cdot e^u\,du = u^2e^{-u}\,du. $$

So the integral becomes:

$$ I = \int u^2e^{-u}\,du. $$

Step 2 · First integration by parts

Let $v=u^2$, $dw=e^{-u}du$, so $dv=2u\,du$, $w=-e^{-u}$:

$$ \int u^2e^{-u}\,du = -u^2e^{-u} + \int 2ue^{-u}\,du. $$

Step 3 · Second integration by parts

For $\displaystyle\int 2ue^{-u}\,du$, let $v=2u$, $dw=e^{-u}du$, so $dv=2\,du$, $w=-e^{-u}$:

$$ \int 2ue^{-u}\,du = -2ue^{-u} + \int 2e^{-u}\,du = -2ue^{-u} - 2e^{-u}. $$

Step 4 · Combine and substitute back

Combining:

$$ \int u^2e^{-u}\,du = -u^2e^{-u} - 2ue^{-u} - 2e^{-u} + C = -\left(u^2+2u+2\right)e^{-u} + C. $$

Substituting back $u=\ln x$, $e^{-u}=1/x$:

$$ I = -\frac{\ln^2x}{x} - \frac{2\ln x}{x} - \frac2x + C. $$


Summary Table

Piece Value
Substitution$u=\ln x,\;x=e^u$
Reduced integral$\int u^2e^{-u}\,du$
Antiderivative$-(u^2+2u+2)e^{-u}$

Additional Notes

Result

The solution to the integral is:

$$ I = -\frac{\ln^2x+2\ln x+2}{x} + C. $$