Solution:
Key idea: We integrate by parts twice, ∫uvdx=u∫vdx−∫(dxdu∫vdx)dx, keeping e2x as the second function, with ∫e2xdx=21e2x. The original integral I comes back, and we solve for it.
Step 1 — First use of parts.
We take u=sin3x, so dxdu=3cos3x.
I=21e2xsin3x−∫3cos3x⋅21e2xdx
I=21e2xsin3x−23∫e2xcos3xdx
Step 2 — Second use of parts.
Now we take u=cos3x, so dxdu=−3sin3x.
∫e2xcos3xdx=21e2xcos3x−∫(−3sin3x)21e2xdx
∫e2xcos3xdx=21e2xcos3x+23I
Step 3 — Put this back into Step 1.
We replace the integral and multiply out −23.
I=21e2xsin3x−43e2xcos3x−49I
Step 4 — Solve for I.
We add 49I to both sides, so the left side becomes 413I.
413I=41e2x(2sin3x−3cos3x)
I=131e2x(2sin3x−3cos3x)+C
Therefore, ∫e2xsin3xdx=13e2x(2sin3x−3cos3x)+C.