TITLE: Finding the integral of $\int x\ln(1+x)dx$
QUESTION [5 upvotes]: I know I have to make a u substitution and then do integration by parts.
$$\int x\ln(1+x)dx$$
$ u = 1 + x$
$du = dx$
$$\int (u-1)(\ln u)du$$
$$\int u \ln u du - \int \ln u du$$
I will solve the $\ln u$ problem first since it will be easier
$$ \int \ln  u du$$
$u = \ln u$
$du = 1/u$
$dz = du$
$z = u$
$$-(u\ln u - u)$$
Now I will do the other part.
$$\int u \ln u du$$
$u = \ln u$ $du = 1/u$
$dz = udu$  $z = u^2 / 2$
$$\frac {u^2 \ln u}{2} - \int u/2$$
$$\frac {u^2 \ln u}{2} - \frac{1}{2} \int u$$
$$\frac {u^2 \ln u}{2} - \frac{u^2}{2} $$
Now add the other part.
$$\frac {u^2 \ln u}{2} - \frac{u^2}{2} -u\ln u + u $$
Now put u back in terms of x.
$$\frac {(1+x)^2 \ln (1+x)}{2} - \frac{(1+x)^2}{2} -(1+x)\ln (1+x) + (1+x) $$
This is wrong and I am not sure why.

REPLY [3 votes]: Comment for Jordan: You should not read the solution below, it is somewhat non-standard and at this stage you need to think in terms of standard approaches. 
We use integration by parts, $u=\ln(1+x)$, $dv=x\,dx$.  So $du =\frac{dx}{1+x}$.
Now we do something cute with $v$. Any antiderivative of $x$ will do. Instead of boring old $\frac{x^2}{2}$, we can take 
$$v=\frac{x^2}{2}-\frac{1}{2}=\frac{1}{2}(x+1)(x-1).$$
Thus
$$\int x\ln(1+x)\,dx=\left(\frac{x^2}{2}-\frac{1}{2}\right)\ln(1+x)-\int \frac{1}{2}(x-1)\,dx.$$