How do you find the Integral (ln(3x))^2dx?

Mar 14, 2015

Try Substitution and Integration by Parts to get:

Mar 14, 2015

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

We try $u = 3 x$ or $u = \ln v$ , with $v = 3 x$, but neither of those work. So we give up. No, not seriously,
Substitution doesn't seem to be working, so try the next less simple method Integration by Parts.

Try something, judge whether we seem to be making progress.
(Yes, really. There's no cookbook to solve every problem.)

Well, we can't integrate, so let's differentiate.
Let $u = {\left(\ln \left(3 x\right)\right)}^{2}$ and $\mathrm{dv} = \mathrm{dx}$.

With these choices, we get
$\mathrm{du} = 2 \left(\ln \left(3 x\right)\right) \cdot \frac{1}{x} \mathrm{dx}$ and $v = x$.

Applying Integration by Parts gives us

$\int {\left(\ln \left(3 x\right)\right)}^{2} \mathrm{dx} = u v - \int v \mathrm{du}$
$= x {\left(\ln \left(3 x\right)\right)}^{2} - \int x \cdot 2 \left(\ln \left(3 x\right)\right) \cdot \frac{1}{x} \mathrm{dx}$ (looks worse, but)

$= x {\left(\ln \left(3 x\right)\right)}^{2} - 2 \int \left(\ln \left(3 x\right)\right) \mathrm{dx}$. So all we need to do is remember or figure out how to integrate $\ln u$ $\mathrm{du}$.
(By parts, to get $\int \ln u \mathrm{du} = u \ln u - u + C$)

With $u = 3 x$, we can finish the integral to get:

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

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

Note: you can learn a lot, by checking the answer by differentiating.