Integration by Parts
Integration by parts reverses the product rule: \(\int u\,dv = uv - \int v\,du\). Choosing \(u\) and \(dv\) well (LIATE heuristic) reduces an integral to a simpler one, and some problems require applying it repeatedly or solving for the original integral.
By the end you'll be able to split an integrand into \(u\) and \(dv\) so the new integral is genuinely simpler, apply the formula repeatedly when one pass isn't enough, and solve for the original integral when it reappears.
Predict: for \(\int x e^x\,dx\), which choice makes the leftover integral \(\int v\,du\) simpler — taking the polynomial or the exponential as \(u\)? Toggle below to check.
Each button splits the same integrand a different way and shows the resulting \(uv - \int v\,du\). The chart compares the original integrand (dashed) with the new integrand you'd still have to integrate — colored green when it got simpler and orange when it got worse.
\(\displaystyle \int x e^x\,dx \;=\; x e^x \;-\; \int e^x\,dx\)
Simpler — \(\int e^x\,dx\) is immediateNew integrand: e^x — the polynomial factor vanished; one easy integral remains.
Integration by parts is the integration counterpart of the product rule: split the integrand into \(u\) and \(dv\) so that \(\int v\,du\) is easier than the integral you started with.
Where does the formula come from? Integrate the product rule \((uv)' = u'v + uv'\) with respect to \(x\): \(uv = \int u'v\,dx + \int uv'\,dx\). Writing \(du = u'\,dx\) and \(dv = v'\,dx\) and rearranging gives \(\int u\,dv = uv - \int v\,du\). For a definite integral, the boundary term is evaluated at the limits: \(\int_a^b u\,dv = \big[uv\big]_a^b - \int_a^b v\,du\).
The demo above is the whole strategy in one picture: a good split makes the new integrand's curve simpler than the original's — the polynomial factor gets differentiated away and you're left with a bare exponential. A bad split does the opposite: integrating \(x\,dx\) up to \(x^2/2\) raises the degree, and the new curve runs away above the one you started with. \(u\) should get simpler when you differentiate it (ideally its derivative eventually vanishes or becomes constant); \(dv\) must be something you can antidifferentiate to get \(v\).
You reach for integration by parts when the integrand is a product of two unlike functions — polynomial times exponential, polynomial times trig, or anything times a logarithm — and no substitution lines up. The LIATE ranking (Logarithmic, Inverse trig, Algebraic, Trigonometric, Exponential) tells you which factor to take as \(u\): pick from whichever category appears earliest. Logarithms and inverse trig functions have no elementary antiderivative you'd want to compute directly, so they should never be \(dv\); exponentials are trivial to integrate and differentiate, so they make a convenient \(dv\).
When one pass isn't enough
Two situations require extra maneuvering. First, repeated application: a factor like \(x^2\) needs to be differentiated twice before it disappears, so you apply the formula twice — once per derivative of the algebraic factor. Second, solving for the original integral: when \(u\) is exponential and \(dv\) is trig (or vice versa), repeated integration by parts returns a multiple of the original integral rather than 0. Treat the original integral as an unknown \(I\) and solve the resulting linear equation for \(I\).
Evaluate \(\int x e^x\,dx\). By LIATE, \(x\) is algebraic and \(e^x\) is exponential, so \(u = x\), \(dv = e^x\,dx\), giving \(du = dx\) and \(v = e^x\): \(\int x e^x\,dx = x e^x - \int e^x\,dx = xe^x - e^x + C =\) \(e^x(x-1) + C\). Check by differentiating: \(\frac{d}{dx}\big[e^x(x-1)\big] = e^x(x-1) + e^x = x e^x\). ✓
Evaluate \(I = \int e^x \cos x\,dx\). Let \(u = e^x\), \(dv = \cos x\,dx\), so \(I = e^x \sin x - \int e^x \sin x\,dx\). Apply the formula again to \(\int e^x \sin x\,dx\) (with \(u = e^x\), \(v = -\cos x\)): \(\int e^x \sin x\,dx = -e^x\cos x + I\). Substitute back: \(I = e^x\sin x + e^x\cos x - I\). Now \(I\) appears on both sides — add \(I\) to both sides and divide by 2: \(I = \frac{e^x(\sin x + \cos x)}{2} + C\).
Evaluate \(\int x \cos x\,dx\). By LIATE, algebraic beats trigonometric, so \(u = x\), \(dv = \cos x\,dx\), giving \(du = dx\) and \(v = \sin x\). Then \(\int x \cos x\,dx = x\sin x - \int \sin x\,dx = x \sin x - \) ____
Reveal the answer
\(\int \sin x\,dx = -\cos x\), so \(\int x\cos x\,dx = x\sin x - (-\cos x) + C =\) \(x\sin x + \cos x + C\). Watch the sign: subtracting the antiderivative of \(\sin x\) means subtracting \(-\cos x\), which flips it to \(+\cos x\).
More info — common pitfalls, from another angle
Think of every by-parts problem as a bet: you pay the price of one differentiation of \(u\) and one antidifferentiation of \(dv\), hoping the leftover \(\int v\,du\) is cheaper than the original. Three ways the bet goes wrong: choosing \(dv\) to be a logarithm or inverse trig function (no simple antiderivative to plug in for \(v\) — exactly why LIATE puts L and I first for \(u\), as in the toggle demo above); forgetting the \(+C\) — in the "solve for \(I\)" case, add it only after isolating \(I\), not inside the algebra; and applying the formula once and stopping while the remaining integral is still no simpler — check whether another pass, or the solve-for-the-integral trick, is needed. Paul's Online Math Notes in Dive deeper below grades its examples by exactly these traps.
Check your understanding
Using the LIATE heuristic, which factor should be \(u\) in \(\int x^2 \ln x \, dx\)?
Evaluate \(\int \ln x \, dx\).
You apply integration by parts twice to \(I = \int e^x \sin x \, dx\) and arrive at \(I = -e^x\cos x + e^x\sin x - I\). What is the correct next move?
How many applications of integration by parts does \(\int x^3 e^x \, dx\) require, and why?
Recap
- \(\int u\,dv = uv - \int v\,du\) — the product rule, integrated and rearranged. For definite integrals, evaluate the boundary term at the limits: \(\int_a^b u\,dv = [uv]_a^b - \int_a^b v\,du\).
- Choose \(u\) by LIATE (Logarithmic, Inverse trig, Algebraic, Trigonometric, Exponential): \(u\) should simplify when differentiated, and \(dv\) must be something you can antidifferentiate.
- A factor like \(x^2\) needs one application of the formula per derivative it takes to reduce it to a constant — apply by parts repeatedly.
- Exponential × trig cycles back to the original integral: call it \(I\), solve the linear equation for \(I\), then attach \(+C\).
Dive deeper
- Paul's Online Math Notes — Integration by Parts Work through graded examples covering repeated application and the tabular method.
- OpenStax Calculus Volume 2 — 3.1 Integration by Parts Read the derivation from the product rule and drill end-of-section exercises.
Sources
- Integration by Parts