Integral of eˣ sin x: The Circular Trick
Find ∫eˣ sin x dx. This integral is a rite of passage because it breaks the usual expectation: integration by parts is supposed to make the integral simpler, but here, after two rounds, the original integral comes back. Students see the original I reappear and assume they made a mistake, erase everything, and start over.
The reappearance is not a mistake. It is the entire trick. Once the integral returns with the opposite sign, you stop integrating and start doing algebra, solving for I the way you would solve for x in an equation.
Worked solution
- Give the integral a name: let I = ∫eˣ sin x dx. Naming it makes the return unmistakable when it happens.
- Apply by parts with u = eˣ and dv = sin x dx. Then du = eˣdx and v = −cos x. (Watch the sign: ∫sin x dx = −cos x.)
- I = uv − ∫v du = −eˣcos x − ∫(−cos x)(eˣ)dx = −eˣcos x + ∫eˣcos x dx.
- Attack ∫eˣcos x dx the same way, with the SAME choice: u = eˣ, dv = cos x dx, so du = eˣdx and v = sin x. Consistency is everything here; switching the choice undoes step 3.
- ∫eˣcos x dx = eˣsin x − ∫eˣsin x dx = eˣsin x − I. The original integral is back, with a minus sign.
- Substitute into step 3: I = −eˣcos x + eˣsin x − I.
- Collect I on one side: I + I = eˣsin x − eˣcos x, so 2I = eˣ(sin x − cos x), and I = eˣ(sin x − cos x)/2 + C.
Why this method works
eˣ reproduces itself under both differentiation and integration, and sin x cycles (sin → cos → −sin). Two rounds of by parts therefore walk the integrand all the way around its cycle and return it to the start, flipped in sign. At that point no further integration is needed: the equation I = (stuff) − I is pure algebra, and solving it gives I. The method works because both factors are cyclical, so the integral cannot escape; it can only come home.
Common mistakes
- Switching the u/dv assignment between rounds (for example u = sin x the second time). That reverses the first round and you get the empty identity 0 = 0, which tells you nothing.
- Losing the minus in v = −cos x. Step 3 then carries the wrong sign and the final answer flips.
- Sign errors when collecting I. From I = −eˣcos x + eˣsin x − I, moving −I across gives +I, for 2I total. Rushing this line is where most points die.
- Dividing only part of the expression by 2, or forgetting +C at the end.
Check (never skip)
Differentiate the answer with the product rule: d/dx[eˣ(sin x − cos x)/2] = (1/2)[eˣ(sin x − cos x) + eˣ(cos x + sin x)] = (1/2)[eˣsin x − eˣcos x + eˣcos x + eˣsin x] = (1/2)(2eˣsin x) = eˣsin x. ✓ The cosine terms cancel exactly, leaving the original integrand. If your signs were wrong anywhere in steps 2 through 6, this check exposes it in one line.
The general pattern
This trick is not limited to eˣ sin x. Every integral of the form ∫e^(ax)sin(bx)dx or ∫e^(ax)cos(bx)dx falls the same way: two rounds of by parts with a consistent u choice, and the original integral returns. The general result is ∫e^(ax)sin(bx)dx = e^(ax)(a sin bx − b cos bx)/(a² + b²) + C. Setting a = 1, b = 1 gives eˣ(sin x − cos x)/2 + C, exactly our answer. Memorizing the general formula is optional; understanding the two-rounds-and-solve move handles every case, including ones where a and b are not 1.
FAQ
Q: Can I choose u = sin x instead of u = eˣ? A: Yes, as long as you make the same choice in both rounds. The algebra lands on the same answer, eˣ(sin x − cos x)/2 + C. Pick one assignment and commit to it.
Q: How do I know when to stop integrating and start solving? A: The moment you recognize the original integral (up to a sign) inside your work. That is why step 1 names it I: the return is then impossible to miss.
Q: Does this trick work for ∫eˣcos x dx too? A: Yes, and it is hiding inside step 4 above. The same two rounds give ∫eˣcos x dx = eˣ(sin x + cos x)/2 + C. The whole family of exponential-times-trig integrals falls to this one idea.
Solve it with steps on our integral calculator.