AP Calculus BC

Integral of e^2x sin x: Answer and Steps

The integral of e^(2x)sin(x) is e^(2x)(2sin(x) - cos(x))/5 + C. Integration by parts twice brings the original integral back, and solving the resulting equation for it produces the denominator 5, which is 2^2 + 1^2 for the coefficients 2 and 1.

e2xsinxdx=e2x(2sinxcosx)5+C\int e^{2x}\sin x\,dx = \frac{e^{2x}(2\sin x-\cos x)}{5} + C

Parts twice, on purpose

Neither factor gets simpler under differentiation, so parts will never terminate here. It closes instead: after two rounds the original integral reappears, and you solve for it like an unknown. Give it a name.

I=e2xsinxdxI = \int e^{2x}\sin x\,dx

First round: u=sinxu = \sin x and dv=e2xdxdv = e^{2x}\,dx, so du=cosxdxdu = \cos x\,dx and v=e2x2v = \frac{e^{2x}}{2}.

I=e2xsinx212e2xcosxdxI = \frac{e^{2x}\sin x}{2} - \frac{1}{2}\int e^{2x}\cos x\,dx

The second round closes the loop

Apply parts to the new integral with u=cosxu = \cos x and dv=e2xdxdv = e^{2x}\,dx, keeping the trig factor as uu both times. Now du=sinxdxdu = -\sin x\,dx and v=e2x2v = \frac{e^{2x}}{2}, and the integral that comes back is II itself.

e2xcosxdx=e2xcosx2+12e2xsinxdx=e2xcosx2+I2\int e^{2x}\cos x\,dx = \frac{e^{2x}\cos x}{2} + \frac{1}{2}\int e^{2x}\sin x\,dx = \frac{e^{2x}\cos x}{2} + \frac{I}{2}

Substitute that back into the first line and collect the II terms on one side.

I=e2xsinx2e2xcosx4I4I = \frac{e^{2x}\sin x}{2} - \frac{e^{2x}\cos x}{4} - \frac{I}{4}
54I=e2x(2sinxcosx)4\frac{5}{4}I = \frac{e^{2x}(2\sin x - \cos x)}{4}
e2xsinxdx=e2x(2sinxcosx)5+C\int e^{2x}\sin x\,dx = \frac{e^{2x}(2\sin x - \cos x)}{5} + C

The mistake students make

The classic failure is switching roles on the second round. If u=sinxu = \sin x opened the work and u=e2xu = e^{2x} runs the second round, every step undoes itself and the equation collapses to I=II = I, true and useless. Keep the same type of factor as uu throughout.

The other slip is losing +C+C. The constant is not part of the algebra while you solve for II, so it has to be reattached once the division by 54\frac{5}{4} is done.

The 5 is not a coincidence

For eaxsinbxdx\int e^{ax}\sin bx\,dx the denominator is always a2+b2a^2+b^2. Here a=2a = 2 and b=1b = 1, so it is 4+1=54+1 = 5. A denominator that is not a2+b2a^2+b^2 means an arithmetic slip happened somewhere in the two rounds.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

Why does the integral come back instead of ending?

Both e2xe^{2x} and sinx\sin x keep their form under differentiation and integration, up to constants. Nothing shrinks, so parts cycles. Here the cycle is the tool: two rounds give an equation in II.

Does it matter whether I start with u = sin x or u = e^(2x)?

Either opening works. What matters is consistency: use the same kind of factor as uu in both rounds, or the second round simply reverses the first.

How do I check the answer quickly?

Differentiate with the product rule: 2e2x(2sinxcosx)+e2x(2cosx+sinx)5=5e2xsinx5=e2xsinx\frac{2e^{2x}(2\sin x - \cos x) + e^{2x}(2\cos x + \sin x)}{5} = \frac{5e^{2x}\sin x}{5} = e^{2x}\sin x.