AP Calculus BC
Integral of e^x cos(x): Answer, Proof, and Steps
The integral of e^x cos(x) is e^x(sin x + cos x)/2 + C. Integration by parts applied twice brings back the original integral, and solving that equation for it produces the factor of one half. Differentiating e^x(sin x + cos x)/2 returns e^x cos(x).
Integration by parts, applied twice
Neither factor of vanishes under differentiation, so a single integration by parts will not finish. Applying it twice loops the integral back to itself.
Call the target integral . First take and , so and .
Apply parts again to the new integral, keeping . Take , so and .
Solving for the integral
The original integral has reappeared on the right. Substitute the second result into the first and collect the terms.
Divide by to isolate , then attach the constant of integration.
Where the one half comes from
The integral is not integrated away; it is solved for like a variable. Moving across the equation creates the , and dividing gives the .
Common mistakes
This double-parts pattern trips students in a few predictable ways.
- Switching the choice of on the second pass. Both integrations by parts must keep ; swapping to unwinds the first step back to .
- Forgetting to divide by . After you must halve both sides.
- Dropping the constant. Even after solving algebraically, the indefinite integral needs .
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 integrating e^x cos(x) require parts twice?
Because one pass trades for but leaves an times a trig function. A second pass brings back the original integral, which you then solve for algebraically.
What is the integral of e^x sin(x)?
. The same double-parts method applies, and only the internal sign differs from the cosine case.
What is the integral of e^x cos(x) from 0 to pi?
.