# How do you integrate (x+3)ln^2(x+3)dx?

May 10, 2018

$I = {\left(x + 3\right)}^{2} / 4 \left[2 {\ln}^{2} \left(x + 3\right) - 2 \ln \left(x + 3\right) + 1\right] + c$

#### Explanation:

Here,

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

$I = \int \left(x + 3\right) {\left[\ln \left(x + 3\right)\right]}^{2} \mathrm{dx}$

We take,

$\ln \left(x + 3\right) = t \implies x + 3 = {e}^{t} \implies \mathrm{dx} = {e}^{t} \mathrm{dt}$

So,

$I = \int \left({e}^{t}\right) {\left[t\right]}^{2} {e}^{t} \mathrm{dt}$

$\therefore I = \int {t}^{2} \cdot {e}^{2 t} \mathrm{dt}$

$\text{Using "color(blue)"Integration by parts : }$

$I = {t}^{2} \int {e}^{2 t} \mathrm{dt} - \int \left(\frac{d}{\mathrm{dt}} \left({t}^{2}\right) \times \int {e}^{2 t} \mathrm{dt}\right) \mathrm{dt}$

$= {t}^{2} \cdot \frac{{e}^{2 t}}{2} - \int 2 t \cdot \frac{{e}^{2 t}}{2} \mathrm{dt}$

$= {t}^{2} \cdot \frac{{e}^{2 t}}{2} - \int t \cdot \left({e}^{2 t}\right) \mathrm{dt}$

Again, $\text{using "color(blue)"Integration by parts : }$in second integral,

$I = {t}^{2} \cdot \frac{{e}^{2 t}}{2} - \left[t \cdot \frac{{e}^{2 t}}{2} - \int \left(1\right) \left({e}^{2 t} / 2\right) \mathrm{dt}\right]$

$= {t}^{2} \cdot \frac{{e}^{2 t}}{2} - t \cdot {e}^{2 t} / 2 + \frac{1}{2} \int {e}^{2 t} \mathrm{dt}$

$= {t}^{2} \cdot \frac{{e}^{2 t}}{2} - t \cdot {e}^{2 t} / 2 + \frac{1}{2} \cdot {e}^{2 t} / 2 + c$

$\therefore I = {e}^{2 t} / 4 \left[2 {t}^{2} - 2 t + 1\right] + c$

$\implies I = {\left(x + 3\right)}^{2} / 4 \left[2 {\ln}^{2} \left(x + 3\right) - 2 \ln \left(x + 3\right) + 1\right] + c$

Note:

$\ln \left(x + 3\right) = t$

$\implies {\left[\ln \left(x + 3\right)\right]}^{2} = {t}^{2}$

$\implies {\ln}^{2} \left(x + 3\right) = {t}^{2}$

Also,

$\left(i\right) {\ln}^{2} \left(x + 3\right) = {\left[\ln \left(x + 3\right)\right]}^{2} = \ln \left(x + 3\right) \times \ln \left(x + 3\right) , \mathmr{and}$

$\left(i i\right) \ln {\left(x + 3\right)}^{2} = 2 \ln \left(x + 3\right)$

$\implies {\ln}^{2} \left(x + 3\right) \ne \ln {\left(x + 3\right)}^{2}$