Solution:
Key idea: The factor xx+1 equals 1+x1, which is the derivative of x+logx. So the substitution t=x+logx turns the integral into ∫t2dt.
Step 1 — Rewrite the factor xx+1.
We divide each term of the numerator by x.
xx+1=1+x1
We check that this is the derivative of the bracket.
dxd(x+logx)=1+x1
Step 2 — Substitute.
We put the bracket equal to t; the logarithm needs x>0.
t=x+logx
By Step 1, its differential is:
dt=(1+x1)dx
Step 3 — Integrate in terms of t.
The integrand becomes t2, and the power rule adds 1 to the power.
∫x(x+1)(x+logx)2dx=∫t2dt
∫t2dt=3t3+C
Step 4 — Return to x.
We put back t=x+logx.
3t3+C=31(x+logx)3+C
Therefore, ∫x(x+1)(x+logx)2dx=31(x+logx)3+C (for x>0).