Solution:
Key idea: The derivative of ex3 is 3x2ex3, and x2ex3 is already in the integrand. So we put t=ex3 and the integral becomes a multiple of ∫costdt.
Step 1 — Substitute.
We put the argument of the cosine equal to t.
t=ex3
Differentiating both sides with the chain rule gives the new differential.
dt=3x2ex3dx
We divide by 3 to get the part that appears in the integrand.
x2ex3dx=3dt
Step 2 — Integrate in terms of t.
We replace cos(ex3) by cost and the rest by 3dt.
∫x2ex3cos(ex3)dx=31∫costdt
31∫costdt=31sint+C
Step 3 — Return to x.
We put back t=ex3.
31sint+C=31sin(ex3)+C
Therefore, ∫x2ex3cos(ex3)dx=31sin(ex3)+C.