What the formula says
∫ f(x) g′(x) dx = f(x) g(x) − ∫ f′(x) g(x) dx
Integration by parts is for integrands that are a product of two factors. One is called f and gets
differentiated, the other is called g′ and gets integrated to g. The theorem trades the original
integral for a new one, ∫ f′g dx, and it pays off when the new one is simpler. It is a theorem, and it
comes straight from the product rule: (fg)′ = f′g + fg′. Integrate both sides and move
one term across, and the formula is there.
Worked examples
x · eˣ. Take f = x and g′ = eˣ. Then f′ = 1 and g = eˣ.
- ∫ x eˣ dx = x eˣ − ∫ 1 · eˣ dx = x eˣ − eˣ + C = (x − 1)eˣ + C.
- As a definite integral from 0 to 1: (1 − 1)e¹ − (0 − 1)e⁰ = 0 + 1 = 1.
x · sin x. Take f = x and g′ = sin x. Then f′ = 1 and g = −cos x.
- ∫ x sin x dx = −x cos x − ∫ (−cos x) dx = sin x − x cos x + C.
ln x. No product is visible, but ln x = ln x · 1. Take f = ln x and g′ = 1. Then f′ = 1/x and g = x.
- ∫ ln x dx = x ln x − ∫ (1/x) · x dx = x ln x − x + C.
Common mistakes
- Picking the wrong factor as f. With f = eˣ and g′ = x in the first example, the new integral is ∫ eˣ · x²/2 dx, harder than the one you started with.
- Dropping the minus sign. The formula is f g minus the new integral. The sign carries through the whole of the new integral.
- Forgetting + C, or the limits in one of the terms. In a definite integral the limits go into f g too, not only into the new integral.
Common questions
How do I know which factor should be f?
Take as f the factor that gets simpler when differentiated: a polynomial, which shrinks towards a
constant, or ln x, which becomes 1/x. As g′ take what integrates easily, such as eˣ, sin x or cos x.
Why is it called integration by parts?
Because only part of the work is done in one step. You integrate one factor and are left with a new
integral to solve.
Might you have to do it twice?
Yes. ∫ x² eˣ dx with f = x² gives a new integral with 2x eˣ, which needs one more round. Each round
lowers the polynomial’s degree by one, until only a constant is left.