# How do you integrate xln(1+x) dx?

Jul 16, 2015

The solution is shown here (sometimes Wolfram Alpha has trouble computing integrals with $\ln x$ properly, so I gave the backwards check).

Let:
$u = x + 1$
$\mathrm{du} = \mathrm{dx}$
$x = u - 1$

$\implies \int \left(u - 1\right) \ln u \mathrm{du}$

$= \int u \ln u \mathrm{du} - \int \ln u \mathrm{du}$

With these two integrals in mind, we can do Integration by Parts (assuming you already know the integral of $\ln x$). Ignoring the $\int \ln u$, let:

$s = \ln u$
$\mathrm{ds} = \frac{1}{u} \mathrm{du}$
$\mathrm{dt} = u \mathrm{du}$
$t = {u}^{2} / 2$

Thus:

$s t - \int t \mathrm{ds}$

$= \left[\frac{{u}^{2} \ln u}{2} - \int {u}^{2} / 2 \cdot \frac{1}{u} \mathrm{du}\right] - \int \ln u \mathrm{du}$

$= \frac{{u}^{2} \ln u}{2} - \frac{1}{2} \int u \mathrm{du} - \int \ln u \mathrm{du}$

$= \frac{{u}^{2} \ln u}{2} - {u}^{2} / 4 - \left(u \ln u - u\right)$

$= \frac{{u}^{2} \ln u}{2} - {u}^{2} / 4 - u \ln u + u$

$= \frac{{u}^{2} \ln u}{2} - u \ln u - {u}^{2} / 4 + u$

$= \frac{{\left(x + 1\right)}^{2} \ln \left(x + 1\right)}{2} - \left(x + 1\right) \ln \left(x + 1\right) - {\left(x + 1\right)}^{2} / 4 + x + 1 + C$

And $1$ gets embedded into $C$:

$= \textcolor{b l u e}{\frac{{\left(x + 1\right)}^{2} \ln \left(x + 1\right)}{2} - \left(x + 1\right) \ln \left(x + 1\right) - {\left(x + 1\right)}^{2} / 4 + x + C}$