Solution:
Key idea: We write ex2x as xe−x2. The factor x is −21 times the derivative of −x2, so the substitution t=−x2 gives a multiple of ∫etdt.
Step 1 — Rewrite the integrand.
Dividing by ex2 is the same as multiplying by e−x2.
ex2x=xe−x2
Step 2 — Substitute.
We put the power of e equal to t.
t=−x2
Differentiating both sides gives the new differential.
dt=−2xdx
We divide by −2 to get the part that appears in the integrand.
xdx=−2dt
Step 3 — Integrate in terms of t.
The integral becomes −21 times the integral of et.
∫xe−x2dx=−21∫etdt
−21∫etdt=−21et+C
Step 4 — Return to x.
We put back t=−x2.
−21et+C=−21e−x2+C
−21e−x2+C=−2ex21+C
Therefore, ∫ex2xdx=−2ex21+C.