Integration by parts on [X,1]. For 0<X<1, set u(x)=lnx and v′(x)=(1+x)21, so u′(x)=x1 and v(x)=−1+x1. Then
I(X):=∫X1(1+x)2lnxdx=[−1+xlnx]X1+∫X1x(1+x)dx.
First term.
[−1+xlnx]X1=−2ln1−(−1+XlnX)=1+XlnX.
Second term. Partial fractions: x(1+x)1=x1−1+x1. So
∫X1x(1+x)dx=[lnx−ln(1+x)]X1=−ln2−(lnX−ln(1+X)).
Combine.
I(X)=1+XlnX−lnX+ln(1+X)−ln2=−1+XXlnX+ln(1+X)−ln2.
(The simplification uses 1+X1−1=−1+XX.)
Limit as X→0+. Since XlnX→0 and ln(1+X)→0, we get
I=X→0+limI(X)=0+0−ln2=−ln2.
Remark. The naive computation
∫01(1+x)2lnxdx=?[−1+xlnx]01+∫01x(1+x)dx
is meaningless because lnx is not defined at 0 and ∫01xdx diverges. The correct procedure is to integrate over [X,1] with X>0 and let X→0+.