Integration by parts, explained with examples
Integration by parts lets you integrate a product of two different kinds of function, such as x e<sup>x</sup> or x sin x. It is in AP Calculus BC and in the second year of A level Maths.
On this page
The formula
∫ u (dv/dx) dx = uv − ∫ v (du/dx) dx, often written more briefly as ∫ u dv = uv − ∫ v du.
You split the integrand into two parts. One part, u, you will differentiate. The other part, dv, you will integrate to get v. The formula swaps your original integral for a new one, ∫ v du, which should be easier. If it is not easier, you probably chose u and dv the wrong way round.
Where the formula comes from
Integration by parts is the product rule in reverse. The product rule says d(uv)/dx = u(dv/dx) + v(du/dx). Integrate both sides with respect to x: uv = ∫ u(dv/dx) dx + ∫ v(du/dx) dx. Rearranging gives the formula. Knowing this helps you remember it, and it is a short proof that A level questions occasionally ask for.
Choosing u: the LIATE rule
Choose u to be whichever part comes first in this list, because it gets simpler when you differentiate it:
- Logarithms, such as ln x
- Inverse trig functions, such as arctan x
- Algebraic functions, such as x or x²
- Trig functions, such as sin x
- Exponentials, such as ex
LIATE is a guide, not a law, but it works for nearly every exam question. The main idea is that polynomials shrink when differentiated, logs turn into simple fractions, while exponentials and sine or cosine stay the same size whichever way you go.
Worked examples
Example 1: x times an exponential
Find ∫ x ex dx.
- u = x (algebraic), dv = ex dx. Then du = dx and v = ex.
- ∫ x ex dx = x ex − ∫ ex dx = x ex − ex + C.
- Check by differentiating: ex + x ex − ex = x ex. Correct.
Example 2: x times a trig function
Find ∫ x cos x dx.
- u = x, dv = cos x dx, so du = dx and v = sin x.
- = x sin x − ∫ sin x dx = x sin x + cos x + C.
Example 3: ln x on its own
Find ∫ ln x dx.
- Write it as ∫ ln x × 1 dx. Take u = ln x and dv = 1 dx, so du = (1/x) dx and v = x.
- = x ln x − ∫ x × (1/x) dx = x ln x − x + C.
Example 4: a power times ln x
Find ∫ x² ln x dx.
- Logs come first in LIATE, so u = ln x and dv = x² dx. Then du = (1/x) dx and v = x³/3.
- = (x³/3) ln x − ∫ (x³/3)(1/x) dx = (x³/3) ln x − ∫ x²/3 dx.
- = (x³/3) ln x − x³/9 + C.
Example 5: using parts twice
Find ∫ x² ex dx.
- First: u = x², dv = ex dx gives x²ex − ∫ 2x ex dx.
- Second: ∫ 2x ex dx = 2(x ex − ex), from Example 1.
- Answer: ex(x² − 2x + 2) + C.
Example 6: the loop trick
Find I = ∫ ex sin x dx.
- Parts with u = sin x: I = ex sin x − ∫ ex cos x dx.
- Parts again with u = cos x: ∫ ex cos x dx = ex cos x + ∫ ex sin x dx = ex cos x + I.
- So I = ex sin x − ex cos x − I, which gives 2I = ex(sin x − cos x).
- I = ½ex(sin x − cos x) + C. The original integral came back, so you solve for it like an equation.
Example 7: a definite integral
Evaluate ∫01 x e2x dx.
- u = x, dv = e2x dx, so v = ½e2x.
- = [½x e2x]01 − ∫01 ½e2x dx = ½e² − [¼e2x]01.
- = ½e² − ¼e² + ¼ = ¼(e² + 1) ≈ 2.10.
The tabular method
When u is a polynomial that eventually differentiates to zero, a table saves time. Write u and its derivatives down one column, and dv and its repeated integrals down another. Multiply diagonally, with signs alternating +, −, +. For ∫ x² ex dx, the u column is x², 2x, 2, 0 and the dv column is ex, ex, ex, ex. The diagonals give x²ex − 2x ex + 2ex, the same answer as Example 5. In an exam, show enough working that the method is clear.
Parts or substitution?
Use substitution when one part of the integrand is the derivative of another part, such as ∫ 2x ex² dx, where 2x is the derivative of x². Use parts when the two factors are unrelated kinds of function, such as x and ex. If you are unsure, try substitution first, because it is usually quicker when it works.
Common mistakes
- Choosing u = ex in ∫ x ex dx, which makes the new integral harder.
- Sign errors in the minus part of the formula, especially when using parts twice.
- Forgetting the + C, or forgetting to apply limits to the uv part in a definite integral.
- Not spotting that ln x on its own needs the trick of writing it as ln x × 1.
Practice questions
Try each one before opening the answer.
Q1. Find ∫ x sin x dx.
Show answer
Q2. Find ∫ x e−x dx.
Show answer
Q3. Find ∫ x ln x dx.
Show answer
Q4. Evaluate ∫1e ln x dx.
Show answer
Q5. Find ∫ arctan x dx.
Show answer
Frequently asked questions
Is integration by parts on AP Calculus AB?
No. It is a BC-only topic, in Unit 6. AB students do not need it.
Is integration by parts in A level Maths?
Yes. It is in the second year of A level Maths, and the formula is in the formula booklet for most boards.
How do I know if I chose u correctly?
The new integral, ∫ v du, should be simpler than the one you started with. If it is more complicated, swap your choice.
Key takeaways
- ∫ u dv = uv − ∫ v du.
- It is the product rule in reverse.
- Choose u with LIATE: logs, inverse trig, algebraic, trig, exponential.
- Some integrals need parts twice, or the loop trick.
- Check answers by differentiating.