Solution:
We use integration by parts:
∫f(x)g(x)dx=f(x)∫g(x)dx−∫[f′(x)∫g(x)dx]dx
Let
I=∫e2xsinxdx
Take sinx as the first function and e2x as the second function. Since ∫e2xdx=2e2x,
I=sinx⋅2e2x−∫cosx⋅2e2xdx
=21e2xsinx−21∫e2xcosxdx
Integrate ∫e2xcosxdx by parts again, with cosx as the first function and e2x as the second function.
∫e2xcosxdx=cosx⋅2e2x−∫(−sinx)2e2xdx=21e2xcosx+21I
Substituting back,
I=21e2xsinx−21[21e2xcosx+21I]
I=21e2xsinx−41e2xcosx−41I
Collecting the I terms,
45I=4e2x(2sinx−cosx)
Therefore,
∫e2xsinxdx=5e2x(2sinx−cosx)+C