Integration by Parts
Integration by parts is a method for integrating a product of two functions. It uses the formula \int u\,dv = uv - \int v\,du. Choose u to be the part that gets simpler when you differentiate it, and dv to be the rest. The new integral, \int v\,du, should be easier than the one you started with.
Before this lesson: U-Substitution, Product Rule and Antiderivatives and Indefinite Integrals
Where the formula comes from
Integration by parts is the product rule run backward. For two functions u and v, the product rule says (uv)′ = u′v + uv′. Integrate both sides: uv = ∫v du + ∫u dv. Then solve for ∫u dv.
The point is to trade one integral for another. If you pick u well, ∫v du has a simpler integrand than ∫u dv, and you can finish it with a basic rule.
Integration by parts formula
\int u\,dv = uv - \int v\,du
For a definite integral:
\int_a^b u\,dv = \Big[uv\Big]_a^b - \int_a^b v\,du
Choosing u with LIATE: pick u from the type of function that comes first in this list. Then dv is everything else, including dx.
- Logarithmic: ln x
- Inverse trig: arctan x, arcsin x
- Algebraic: x, x², 3x + 1
- Trig: sin x, cos x
- Exponential: eˣ, e²ˣ
Steps:
- Choose u and dv.
- Find du by differentiating u, and v by integrating dv. You can leave + C off v.
- Write uv − ∫v du.
- Find the new integral. Use parts again if you need to.
- Add + C at the end, or evaluate at the limits for a definite integral.
Integration by parts examples
Example 1: x times a trig function
Find \int x\cos x\,dx.
u = x, \; dv = \cos x\,dx
LIATE: x is algebraic and comes before trig, so u = x.
du = dx, \; v = \sin x
Differentiate u and integrate dv.
\int x\cos x\,dx = x\sin x - \int \sin x\,dx
Use uv − ∫v du.
= x\sin x - (-\cos x) + C
An antiderivative of sin x is −cos x (see antiderivatives).
= x\sin x + \cos x + C
Subtracting a negative adds.
Answer: x\sin x + \cos x + C. Check: by the product rule, the derivative is sin x + x cos x − sin x = x cos x.
Example 2: x times an exponential
Find \int x e^{2x}\,dx.
u = x, \; dv = e^{2x}\,dxAlgebraic comes before exponential.
du = dx, \; v = \dfrac{1}{2}e^{2x}Integrate e²ˣ with u-substitution (see u-substitution).
\int x e^{2x}\,dx = \dfrac{x}{2}e^{2x} - \int \dfrac{1}{2}e^{2x}\,dxUse uv − ∫v du.
= \dfrac{x}{2}e^{2x} - \dfrac{1}{4}e^{2x} + CIntegrate (1/2)e²ˣ.
= \dfrac{e^{2x}}{4}(2x - 1) + CFactor out e²ˣ/4.
Answer: \dfrac{e^{2x}}{4}(2x - 1) + C
Example 3: The integral of ln x
Find \int \ln x\,dx.
u = \ln x, \; dv = dx
Logarithms come first in LIATE. dv is just dx.
du = \dfrac{1}{x}\,dx, \; v = xDifferentiate ln x (see derivatives of logarithmic functions); integrate dx.
\int \ln x\,dx = x\ln x - \int x\cdot\dfrac{1}{x}\,dxUse uv − ∫v du.
= x\ln x - \int 1\,dx
Simplify: x times 1/x is 1.
= x\ln x - x + C
Integrate 1.
Answer: x\ln x - x + C. Even a single function can use parts, with dv = dx.
Example 4: Using parts twice
Find \int x^2 e^x\,dx.
u = x^2, \; dv = e^x\,dx
Algebraic before exponential.
du = 2x\,dx, \; v = e^x
Differentiate and integrate.
\int x^2 e^x\,dx = x^2 e^x - \int 2x e^x\,dx
First round of parts. The power of x dropped by one.
\int 2x e^x\,dx = 2x e^x - \int 2e^x\,dx
Second round: u = 2x, dv = eˣ dx, so du = 2 dx and v = eˣ.
= 2x e^x - 2e^x
Integrate 2eˣ.
\int x^2 e^x\,dx = x^2 e^x - (2x e^x - 2e^x) + C
Put the second result into the first.
= e^x(x^2 - 2x + 2) + C
Distribute the minus sign and factor out eˣ.
Answer: e^x(x^2 - 2x + 2) + C. Each round lowers the power of x, so a power of n needs n rounds.
Example 5: Distance traveled
A particle moves with velocity v(t) = t e^{-t} meters per second. How far does it travel from t = 0 to t = 2?
u = t, \; dv = e^{-t}\,dtAlgebraic before exponential.
du = dt, \; v = -e^{-t}An antiderivative of e^(−t) is −e^(−t).
\int_0^2 t e^{-t}\,dt = \Big[-t e^{-t}\Big]_0^2 - \int_0^2 -e^{-t}\,dtDefinite form of parts.
= -2e^{-2} + \int_0^2 e^{-t}\,dtEvaluate uv; the minus signs cancel in the integral.
= -2e^{-2} + \Big[-e^{-t}\Big]_0^2Integrate e^(−t).
= -2e^{-2} - e^{-2} + 1Plug in the limits: −e^(−2) − (−1).
= 1 - 3e^{-2} \approx 0.594Combine like terms; e^(−2) ≈ 0.1353.
Answer: about 0.594 meters. The velocity is never negative here, so the distance equals the displacement (see displacement and total distance).
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Choosing u backward | For \int x e^x\,dx, u = eˣ gives \dfrac{x^2}{2}e^x - \int \dfrac{x^2}{2}e^x\,dx, which is harder | Follow LIATE: u = x, so du = dx and the new integral is simpler. |
| Sign error in uv − ∫v du | \int x\cos x\,dx = x\sin x + \int \sin x\,dx | The formula has a minus: x\sin x - \int \sin x\,dx. |
| Differentiating dv instead of integrating it | dv = cos x dx, then v = −sin x | v is an antiderivative of cos x: v = sin x. |
| Dropping the minus sign in the second round | x^2e^x - 2xe^x - 2e^x | Keep the parentheses: x^2e^x - (2xe^x - 2e^x), which gives + 2eˣ. |
| Forgetting uv at the limits | \int_0^2 t e^{-t}\,dt = \int_0^2 e^{-t}\,dt | Evaluate uv from a to b too: \Big[-te^{-t}\Big]_0^2 = -2e^{-2}. |
Related methods
Tabular integration
When u is a polynomial and dv can be integrated again and again, make a table. Differentiate u down to 0 in one column, integrate dv in the other, and multiply along diagonals with alternating signs (+, −, +, …). It gives Example 4’s answer in one step.
Integrals that come back
For \int e^x\sin x\,dx, two rounds of parts bring back the original integral. Call it I, write the equation, and solve for I like an algebra problem. Practice problem 9 shows how.
Other techniques
If the integrand is an inside function times its derivative, u-substitution is faster. Powers of sine and cosine use the next lesson, Trigonometric Integrals.
Practice problems
- Find \int x\sin x\,dx.
- Find \int x e^x\,dx.
- Find \int x\ln x\,dx.
- Find \int (2x + 1)e^x\,dx.
- Find \int \arctan x\,dx.
- Find \int x^2\sin x\,dx.
- Evaluate \int_0^1 x e^{-x}\,dx.
- Evaluate \int_1^e \ln x\,dx.
- Find \int e^x\sin x\,dx.
- Water flows into a tank at r(t) = 20t e^{-t/2} liters per minute. How much water flows in during the first 4 minutes?
Show answers
1.
u = x, \; dv = \sin x\,dx, \; du = dx, \; v = -\cos x
Choose u and dv; find du and v.
\int x\sin x\,dx = -x\cos x - \int -\cos x\,dx
Use uv − ∫v du.
= -x\cos x + \sin x + C
Integrate cos x.
Answer: -x\cos x + \sin x + C
2.
u = x, \; dv = e^x\,dx, \; du = dx, \; v = e^x
Choose u and dv.
\int x e^x\,dx = x e^x - \int e^x\,dx = x e^x - e^x + C
Use uv − ∫v du and integrate.
Answer: x e^x - e^x + C
3.
u = \ln x, \; dv = x\,dx, \; du = \dfrac{1}{x}\,dx, \; v = \dfrac{x^2}{2}Logs come first in LIATE.
\int x\ln x\,dx = \dfrac{x^2}{2}\ln x - \int \dfrac{x^2}{2}\cdot\dfrac{1}{x}\,dxUse uv − ∫v du.
= \dfrac{x^2}{2}\ln x - \int \dfrac{x}{2}\,dx = \dfrac{x^2}{2}\ln x - \dfrac{x^2}{4} + CSimplify and integrate.
Answer: \dfrac{x^2}{2}\ln x - \dfrac{x^2}{4} + C
4.
u = 2x + 1, \; dv = e^x\,dx, \; du = 2\,dx, \; v = e^x
Choose u and dv.
\int (2x + 1)e^x\,dx = (2x + 1)e^x - \int 2e^x\,dx
Use uv − ∫v du.
= (2x + 1)e^x - 2e^x + C = (2x - 1)e^x + C
Integrate and factor out eˣ.
Answer: (2x - 1)e^x + C
5.
u = \arctan x, \; dv = dx, \; du = \dfrac{1}{1 + x^2}\,dx, \; v = xInverse trig comes early in LIATE.
\int \arctan x\,dx = x\arctan x - \int \dfrac{x}{1 + x^2}\,dxUse uv − ∫v du.
= x\arctan x - \dfrac{1}{2}\ln(1 + x^2) + CThe top is half the derivative of the bottom (see integrals that give natural logarithms).
Answer: x\arctan x - \dfrac{1}{2}\ln(1 + x^2) + C
6.
\int x^2\sin x\,dx = -x^2\cos x - \int -2x\cos x\,dx
Round 1: u = x², dv = sin x dx, so v = −cos x.
= -x^2\cos x + 2\int x\cos x\,dx
Simplify the signs.
= -x^2\cos x + 2(x\sin x + \cos x) + C
Round 2 is Example 1.
= -x^2\cos x + 2x\sin x + 2\cos x + C
Distribute the 2.
Answer: -x^2\cos x + 2x\sin x + 2\cos x + C
7.
\int_0^1 x e^{-x}\,dx = \Big[-x e^{-x}\Big]_0^1 + \int_0^1 e^{-x}\,dxu = x, dv = e^(−x) dx, so v = −e^(−x).
= -e^{-1} + \Big[-e^{-x}\Big]_0^1 = -e^{-1} - e^{-1} + 1Evaluate both parts.
= 1 - \dfrac{2}{e} \approx 0.264Combine like terms.
Answer: 1 - \dfrac{2}{e} \approx 0.264
8.
\int_1^e \ln x\,dx = \Big[x\ln x - x\Big]_1^e
Use the result of Example 3.
= (e\ln e - e) - (1\ln 1 - 1) = (e - e) - (0 - 1) = 1
ln e = 1 and ln 1 = 0.
Answer: 1
9.
I = \int e^x\sin x\,dx = -e^x\cos x + \int e^x\cos x\,dx
Round 1: u = eˣ, dv = sin x dx, v = −cos x.
\int e^x\cos x\,dx = e^x\sin x - \int e^x\sin x\,dx
Round 2: u = eˣ, dv = cos x dx, v = sin x. The original integral is back.
2I = e^x\sin x - e^x\cos x
Substitute: I = −eˣcos x + eˣsin x − I, then add I to both sides.
I = \dfrac{e^x}{2}(\sin x - \cos x) + CDivide by 2 and add + C.
Answer: \dfrac{e^x}{2}(\sin x - \cos x) + C
10.
u = t, \; dv = e^{-t/2}\,dt, \; du = dt, \; v = -2e^{-t/2}Choose u and dv; integrate e^(−t/2).
\int_0^4 t e^{-t/2}\,dt = \Big[-2t e^{-t/2}\Big]_0^4 + 2\int_0^4 e^{-t/2}\,dtDefinite form of parts.
= -8e^{-2} + 2\Big[-2e^{-t/2}\Big]_0^4 = -8e^{-2} - 4e^{-2} + 4Evaluate both parts.
= 4 - 12e^{-2}Combine like terms.
20(4 - 12e^{-2}) = 80 - 240e^{-2} \approx 47.5Multiply by the 20 in r(t).
Answer: about 47.5 liters
Integration by parts FAQ
What is the integration by parts formula?
\int u\,dv = uv - \int v\,du. It comes from the product rule for derivatives.
How do you choose u in integration by parts?
Use LIATE: logarithmic, inverse trig, algebraic, trig, exponential. Pick u from the type that comes first. The goal is a u that gets simpler when you differentiate it.
When should you use integration by parts?
Use it for products of different kinds of functions, like x eˣ, x sin x or x² ln x, and for ln x or arctan x alone. If the integrand is a function of an inside piece times that piece’s derivative, try u-substitution first.
What if the integral keeps coming back?
That happens with products like eˣ sin x. After two rounds, the original integral appears again. Treat it as an unknown and solve the equation for it.
Summary
- \int u\,dv = uv - \int v\,du, the product rule run backward.
- Choose u with LIATE; dv is everything else.
- Differentiate u to get du, and integrate dv to get v.
- Repeat parts when a power of x is still there.
- For definite integrals, evaluate uv at both limits.
- If the original integral comes back, solve for it.
Previous course: Calculus 1 Index
Next lesson: Trigonometric Integrals
Back to the Calculus 2 Index