Integration by Parts
Substitution
reversed the chain rule. Integration by parts reverses the other great
product of differentiation — the
product rule. It is
the tool for integrating a product of two unlike functions, such as
x e^x or x\ln x.
\int u\, dv = uv - \int v\, du.
You trade the integral you cannot do, \int u\,dv, for one you hope
is easier, \int v\,du. Choose u and
dv well and the new integral is genuinely simpler; choose badly and
it is worse. The skill is the choosing.
Deriving the rule from the product rule
Take two differentiable functions u(x) and
v(x). The product rule tells us how their product changes; we
integrate that statement and rearrange.
Step 1 — the product rule, in differential form. The derivative of a product
spreads over both factors:
\frac{d}{dx}(uv) = u\,\frac{dv}{dx} + v\,\frac{du}{dx}, \qquad\text{i.e.}\qquad d(uv) = u\, dv + v\, du.
Step 2 — integrate both sides. The left integrates back to the product
itself; the right splits by linearity:
\int d(uv) = \int u\, dv + \int v\, du \qquad\Longrightarrow\qquad uv = \int u\, dv + \int v\, du.
Step 3 — solve for the integral we want. Move the second integral to the
left:
\int u\, dv = uv - \int v\, du.
That is the whole rule — the product rule, integrated and rearranged. The art is that
you get to split the integrand into a piece to call u
(which you will differentiate) and a piece to call dv (which you
will integrate).
Worked example: \displaystyle\int x e^{x}\, dx
Step 1 — split into u and dv.
Differentiating x simplifies it to a constant, while
e^x integrates to itself — so:
u = x,\quad dv = e^x\, dx \qquad\Longrightarrow\qquad du = dx,\quad v = e^x.
Step 2 — apply \int u\,dv = uv - \int v\,du.
\int x e^x\, dx = x e^x - \int e^x\, dx.
Step 3 — the new integral is elementary.
\int e^x\, dx = e^x + C.
Step 4 — collect and factor.
\int x e^x\, dx = x e^x - e^x + C = (x - 1)e^x + C.
Check by the product rule:
\frac{d}{dx}\big[(x-1)e^x\big] = e^x + (x-1)e^x = x e^x. ✓
A sneaky one: \displaystyle\int \ln x\, dx
There is no obvious product here — but parts still works if you regard the integrand as
\ln x times 1.
Step 1 — take dv = dx. Differentiating
\ln x removes the logarithm; that is the win:
u = \ln x,\quad dv = dx \qquad\Longrightarrow\qquad du = \frac{1}{x}\, dx,\quad v = x.
Step 2 — apply the rule.
\int \ln x\, dx = x\ln x - \int x \cdot \frac{1}{x}\, dx.
Step 3 — the leftover integral collapses, since
x\cdot\frac1x = 1:
\int x \cdot \frac{1}{x}\, dx = \int 1\, dx = x.
Step 4 — collect.
\int \ln x\, dx = x\ln x - x + C.
For differentiable u(x) and v(x),
\int u\, dv = uv - \int v\, du,
and the definite form over [a,b] is
\int_{a}^{b} u\, dv = \Big[uv\Big]_{a}^{b} - \int_{a}^{b} v\, du.
Choosing u: the LIATE heuristic. When in doubt,
pick u to be whichever factor comes first in this list —
because that is the factor most worth differentiating:
- L — Logarithmic (\ln x)
- I — Inverse trig (\arctan x)
- A — Algebraic (x, x^2)
- T — Trigonometric (\sin x, \cos x)
- E — Exponential (e^x)
In \int x e^x dx, Algebraic beats Exponential, so
u = x — exactly what we chose.
Twice and solve. Some integrals come back to themselves. For
I = \int e^x \sin x\, dx, apply parts twice (each time
u the trig factor). The second application reproduces the
original integral with a sign:
I = e^x \sin x - e^x \cos x - I.
Now I is just an unknown to solve for — add it to both sides and
divide by two:
2I = e^x(\sin x - \cos x) \quad\Longrightarrow\quad I = \tfrac{1}{2}e^x(\sin x - \cos x) + C.
See it: integrand and antiderivative
The faint curve is the integrand x e^{kx}; the bold curve is its
antiderivative \frac{1}{k^2}(kx - 1)e^{kx}, obtained by parts. Slide
the rate k and watch the bold curve's slope track the faint curve's
height — the antiderivative relation, live.