Integration by Substitution
Differentiation has a workhorse for composite functions — the
chain rule. Run it
backwards and you get the most-used integration technique of all:
substitution. The idea is to spot that an integrand is really
f(g(x)) multiplied by the derivative
g'(x) of the inner function, and to fold that inner function into a
single new variable u = g(x).
\int f\big(g(x)\big)\, g'(x)\, dx = \int f(u)\, du, \qquad u = g(x).
The right-hand integral has no composition left — it is in the clean variable
u. Substitution is, quite literally, the chain rule read from right
to left.
Deriving the rule from the chain rule
Let F be an antiderivative of f, so
F' = f. We differentiate the composite
F(g(x)) and then integrate the result — the two operations cancel,
and what survives is exactly the substitution rule.
Step 1 — differentiate the composite with the chain rule. The outer
derivative F' is evaluated at the inner function, times the inner
derivative:
\frac{d}{dx}\, F\big(g(x)\big) = F'\big(g(x)\big)\, g'(x).
Step 2 — rename F' = f. By assumption
F antidifferentiates f, so
F'(g(x)) = f(g(x)):
\frac{d}{dx}\, F\big(g(x)\big) = f\big(g(x)\big)\, g'(x).
Step 3 — integrate both sides in x. Integration
undoes the \tfrac{d}{dx} on the left, leaving the composite itself
(up to a constant):
\int f\big(g(x)\big)\, g'(x)\, dx = F\big(g(x)\big) + C.
Step 4 — recognise the right-hand side as a u-integral.
Set u = g(x). Then F(g(x)) = F(u), and
since F' = f that is precisely an antiderivative of
f(u):
F\big(g(x)\big) + C = F(u) + C = \int f(u)\, du.
Step 5 — read off the rule. Comparing Steps 3 and 4,
\int f\big(g(x)\big)\, g'(x)\, dx = \int f(u)\, du.
In differential shorthand, u = g(x) gives
\dfrac{du}{dx} = g'(x), i.e.
du = g'(x)\, dx — so the slogan "let u = g(x),
then du = g'(x)\,dx" is not an abuse of notation but a packaged
chain rule.
Worked example: \displaystyle\int 2x\cos(x^2)\, dx
The integrand hides a composite — \cos(x^2) — and, helpfully, the
derivative of its inner part x^2 is 2x,
which is sitting right there as a factor.
Step 1 — choose the inner function. Let
u = x^2 \qquad\Longrightarrow\qquad \frac{du}{dx} = 2x \qquad\Longrightarrow\qquad du = 2x\, dx.
Step 2 — substitute, swapping 2x\,dx for
du. The factor 2x\,dx is exactly
du, and \cos(x^2) = \cos u:
\int 2x\cos(x^2)\, dx = \int \cos u\, du.
Step 3 — integrate in u. A standard antiderivative:
\int \cos u\, du = \sin u + C.
Step 4 — back-substitute u = x^2. Always return to
the original variable:
\int 2x\cos(x^2)\, dx = \sin(x^2) + C.
A quick sanity check: differentiate \sin(x^2) by the chain rule and
you recover 2x\cos(x^2) — the integrand we started with.
A definite version: changing the limits
For a definite integral, the cleanest route is to transform the limits along
with the variable, so you never have to back-substitute at all. Consider
\int_{0}^{\sqrt{\pi}} 2x\cos(x^2)\, dx.
Step 1 — same substitution. u = x^2,
du = 2x\,dx.
Step 2 — push the limits through u = x^2. The
limits are values of x; convert them to values of
u:
x = 0 \Rightarrow u = 0^2 = 0, \qquad x = \sqrt{\pi} \Rightarrow u = (\sqrt{\pi})^2 = \pi.
Step 3 — rewrite entirely in u. No
x remains, limits included:
\int_{0}^{\sqrt{\pi}} 2x\cos(x^2)\, dx = \int_{0}^{\pi} \cos u\, du.
Step 4 — evaluate. Apply the
Fundamental Theorem
to \sin u:
\Big[\sin u\Big]_{0}^{\pi} = \sin\pi - \sin 0 = 0 - 0 = 0.
Let g be differentiable on an interval and let
f be continuous on the range of g. With
u = g(x) and du = g'(x)\, dx,
\int f\big(g(x)\big)\, g'(x)\, dx = \int f(u)\, du = F(u) + C, \qquad F' = f,
and for a definite integral, with the limits carried through u = g(x),
\int_{a}^{b} f\big(g(x)\big)\, g'(x)\, dx = \int_{g(a)}^{g(b)} f(u)\, du.
The art is picking u. Reliable instincts:
-
Let u be the inner function of a composite —
what is "inside" a power, root, exponential, sine, or logarithm.
-
Better still, pick the u whose derivative
g'(x) already appears (up to a constant) elsewhere in the
integrand. A stray constant is harmless: from
du = g'(x)\,dx you can solve
g'(x)\,dx = du and absorb the factor.
-
In \int x\, e^{x^2} dx, take
u = x^2, so du = 2x\,dx and
x\,dx = \tfrac12 du, giving
\tfrac12\int e^u du = \tfrac12 e^{x^2} + C.
For a definite integral you have two equivalent choices. Either
change the limits (convert x-limits to
u-limits, as above, and never look back), or back-substitute
(find the antiderivative in u, replace
u = g(x), then plug in the original
x-limits). The first is usually tidier — fewer chances to forget
to undo the substitution.
See it: an integrand and its antiderivative
The faint curve is the integrand 2bx\cos(bx^2); the bold curve is
its antiderivative \sin(bx^2), found by the very substitution
u = bx^2. Slide b — the inner stretch —
and notice the bold curve's slope always matches the faint curve's height:
that is the Fundamental Theorem made visible.