Solution:
Key idea: Since sinxcosx=21sin2x, we have I=21K, with K=∫e2xsin2xdx. We find K by parts twice, ∫uvdx=u∫vdx−∫(dxdu∫vdx)dx, keeping e2x as the second function (∫e2xdx=21e2x).
Step 1 — Rewrite the integrand.
We use sin2x=2sinxcosx.
I=21∫e2xsin2xdx
I=21K
Step 2 — First use of parts on K.
We take u=sin2x, so dxdu=2cos2x; the 2 cancels the 21.
K=21e2xsin2x−∫2cos2x⋅21e2xdx
K=21e2xsin2x−∫e2xcos2xdx
Step 3 — Second use of parts.
Now we take u=cos2x, so dxdu=−2sin2x.
∫e2xcos2xdx=21e2xcos2x+∫e2xsin2xdx
∫e2xcos2xdx=21e2xcos2x+K
Step 4 — Solve for K.
We put Step 3 into Step 2, add K to both sides and divide by 2.
K=21e2xsin2x−21e2xcos2x−K
2K=21e2x(sin2x−cos2x)
K=41e2x(sin2x−cos2x)
Step 5 — Halve it.
We multiply by 21 and add the constant.
I=81e2x(sin2x−cos2x)+C
Therefore, ∫e2xsinxcosxdx=81e2x(sin2x−cos2x)+C.