Solution:
Key idea: We write the integrand as (logx)2⋅1 and integrate by parts, ∫uvdx=u∫vdx−∫(dxdu∫vdx)dx, with u=(logx)2 and v=1. The integrand needs x>0.
Step 1 — Find the pieces needed.
By the chain rule, the derivative of (logx)2 is 2logx⋅x1, and ∫1dx=x.
dxdu=x2logx
Step 2 — Apply the parts formula.
We put these into the formula; the x cancels inside the new integral.
I=x(logx)2−∫x2logx⋅xdx
I=x(logx)2−2∫logxdx
Step 3 — Find ∫logxdx by parts again.
We write logx⋅1, with u=logx and v=1.
∫logxdx=xlogx−∫x1⋅xdx
∫logxdx=xlogx−x
Step 4 — Combine.
We put the result of Step 3 into Step 2 and add the constant.
I=x(logx)2−2(xlogx−x)+C
I=x(logx)2−2xlogx+2x+C
Therefore, ∫(logx)2dx=x(logx)2−2xlogx+2x+C for x>0.