Integral of eˣ sin x: Formula, Steps and Examples
The integral of eˣ sin x is ½eˣ(sin x − cos x) + C. Learn the integrate-twice-and-solve trick, a check, a graph and the e^(ax) sin(bx) formula.
Products and integration by parts Updated 3 min read
At a glance
- Antiderivative
- \frac{1}{2}e^x(\sin x - \cos x) + C
- Method
- Integration by parts twice, then solve for the integral
- Companion
- \int e^x\cos x\,dx = \frac{1}{2}e^x(\sin x + \cos x) + C
- General form
- \int e^{ax}\sin bx\,dx = \frac{e^{ax}(a\sin bx - b\cos bx)}{a^2 + b^2} + C
- From 0 to π
- \frac{e^\pi + 1}{2} \approx 12.07
On this page
The integral of e^x\sin x is \dfrac{1}{2}e^x(\sin x - \cos x) + C. It is the famous "loop" integral: integration by parts never finishes on its own, but after two steps you can solve for the answer with algebra.
Graph of eˣ sin x
How to integrate eˣ sin x step by step
Call the integral I. Use integration by parts with the trig function as u both times.
- First pass. u = \sin x, dv = e^x\,dx, so du = \cos x\,dx and v = e^x: I = e^x\sin x - \int e^x\cos x\,dx
- Second pass, on \int e^x\cos x\,dx. Again the trig function is u: u = \cos x, dv = e^x\,dx, so du = -\sin x\,dx, v = e^x: \int e^x\cos x\,dx = e^x\cos x + \int e^x\sin x\,dx = e^x\cos x + I
- Substitute back. The original integral has returned: I = e^x\sin x - e^x\cos x - I
- Solve for I. Add I to both sides: 2I = e^x(\sin x - \cos x), so I = \frac{e^x}{2}(\sin x - \cos x) + C
The + C is added at the end, after solving. It works just as well with u = e^x both times. What fails is switching: if you take u = \sin x first and u = e^x second, the second step undoes the first and you get I = I.
Check by differentiating
The general formula
The same two-step loop for e^{ax}\sin bx and e^{ax}\cos bx gives
With a = b = 1 the denominator is 2, matching the result above.
A quicker route with complex numbers. Since e^{ix} = \cos x + i\sin x, e^x\sin x is the imaginary part of e^{(1+i)x}. Integrating gives \frac{e^{(1+i)x}}{1+i} = \frac{(1-i)}{2}e^x(\cos x + i\sin x), whose imaginary part is \frac{e^x}{2}(\sin x - \cos x).
Definite integrals
From 0 to π:
From 0 to π/2: \frac{e^{\pi/2}}{2}(1 - 0) - \frac{1}{2}(0 - 1) = \frac{e^{\pi/2} + 1}{2} \approx 2.905.
Decaying version. \int_0^\infty e^{-x}\sin x\,dx. Use the formula with a = -1, b = 1: the antiderivative is \frac{e^{-x}(-\sin x - \cos x)}{2}, which goes to 0 at infinity. So the value is 0 - \left(-\frac{1}{2}\right) = \frac{1}{2}.
Worked examples
Example 1: eˣ cos x. From step 2 above, \int e^x\cos x\,dx = e^x\cos x + I. Substitute I:
Example 2: different rates. \int e^{2x}\sin 3x\,dx = \frac{e^{2x}(2\sin 3x - 3\cos 3x)}{13} + C, using a^2 + b^2 = 4 + 9 = 13.
Example 3: damped vibration. A spring's displacement is e^{-t}\cos t. Its total signed displacement over [0, \infty) is \int_0^\infty e^{-t}\cos t\,dt = \frac{1}{2}, from the cosine formula with a = -1, b = 1: the antiderivative \frac{e^{-t}(\sin t - \cos t)}{2} goes from -\frac{1}{2} to 0.
Common mistakes
- Switching the choice of u between the two passes. You end up with I = I, which is true but useless.
- Forgetting to divide by 2. After step 3 you have 2I, not I.
- Sign errors in the second pass. \frac{d}{dx}\cos x = -\sin x, so the second integral is added, not subtracted.
- Expecting parts to terminate. With x\sin x the power of x drops away; with e^x\sin x nothing drops away, so you need the loop. Compare the integral of x sin x.
The repeated parts and LIATE lesson practices this loop, and the integration by parts guide has more examples.
Practice it now
Repeated parts and LIATE
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson