Solution:
Key idea: The integrand is a product, so we integrate by parts: ∫uvdx=u∫vdx−∫(dxdu∫vdx)dx. We take u=x as the first function, because it becomes 1 on differentiating, and v=sin2x as the second.
Step 1 — Find the pieces needed.
We differentiate the first function and integrate the second.
dxdu=1
∫sin2xdx=−2cos2x
Step 2 — Apply the parts formula.
We put these into the formula.
I=x(−2cos2x)−∫1⋅(−2cos2x)dx
I=−21xcos2x+21∫cos2xdx
Step 3 — Finish the remaining integral.
We use ∫cos2xdx=2sin2x.
I=−21xcos2x+21⋅2sin2x+C
I=−21xcos2x+41sin2x+C
Therefore, ∫xsin2xdx=−21xcos2x+41sin2x+C.