Solution:
Key idea: The factor ex(1+x) is the derivative of xex, so we put xex=t. Then ∫logtdt is found by parts, ∫uvdx=u∫vdx−∫(dxdu∫vdx)dx. The logarithm needs xex>0, so we take x>0.
Step 1 — Substitute.
We put xex=t and differentiate by the product rule.
dt=(ex+xex)dx
dt=ex(1+x)dx
I=∫logtdt
Step 2 — Integrate by parts.
We take u=logt and v=1, so dtdu=t1 and ∫1dt=t.
∫logtdt=tlogt−∫t1⋅tdt
∫logtdt=tlogt−t
Step 3 — Return to x.
We put t=xex back and add the constant.
I=xexlog(xex)−xex+C
I=xex[log(xex)−1]+C
Since log(xex)=logx+x, this can also be written as xex(logx+x−1)+C.
Therefore, ∫ex(1+x)log(xex)dx=xex[log(xex)−1]+C for x>0.