Integration by Substitution
Substitution reverses the chain rule: set \(u = g(x)\), trade \(g'(x)\,dx\) for \(du\), and a tangled x-integral collapses into a clean u-integral. For definite integrals you either convert the limits to u or back-substitute at the end.
By the end you'll be able to pick a substitution \(u = g(x)\), convert \(du\) and the limits, and evaluate a definite integral both ways — converting the limits or back-substituting — getting the same area either way.
Predict: as \(x\) runs from 0 to 2, what interval does \(u = x^2 + 1\) cover? Drag the slider and read u off the right panel to check.
Left: the original integrand \(2x\,(x^2+1)^3\) in x-space. Right: the transformed integrand \(u^3\) in u-space. The lower limit x = 0 maps to u = 1 and the upper limit x = 2 maps to u = 5. Watch the readout: the shaded area is the same number in both pictures at every slider position — substitution renames the variable, it doesn't change the area. Hover or tab to any dot for exact values.
x = 1.00 → u = x² + 1 = 2.00 · shaded area so far = 3.750 in BOTH pictures (full area at x = 2: 156)
Integration by substitution reverses the chain rule: substituting \(u = g(x)\), \(du = g'(x)\,dx\) transforms the integral into one in u, and for a definite integral you either convert the limits to u or back-substitute.
If \(F' = f\) and \(g\) is differentiable, then $$\int f(g(x))\,g'(x)\,dx = \int f(u)\,du = F(g(x)) + C,$$ and for a definite integral $$\int_a^b f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du.$$ The recipe: choose \(u = g(x)\) so that its differential \(du = g'(x)\,dx\) uses up the leftover factor of the integrand. The integral must be purely in u before you integrate — no stray x's. Once integrated, either back-substitute \(u = g(x)\) (the indefinite case) or, for a definite integral, convert the limits: \(x = a \mapsto u = g(a)\), \(x = b \mapsto u = g(b)\).
In practice, substitution is pattern-spotting: scan the integrand for an inner function whose derivative is also present as a factor. In \(2x\,(x^2+1)^3\), the inner function is \(x^2+1\) and its derivative \(2x\) is sitting right beside it — that's the chain rule's leftover factor, so \(u = x^2+1\) collapses everything into \(u^3\). If the derivative is off by a constant (say you have \(x\,dx\) but need \(2x\,dx\)), multiply and divide by the constant to match. This one move unlocks most of the integrals you'll meet in applications — exponential decay, trig arguments like \(\cos(3t)\), and densities in statistics.
Evaluate \(\displaystyle\int_0^2 2x\,(x^2+1)^3\,dx\) — the demo's integral.
- Choose \(u = x^2 + 1\), so \(du = 2x\,dx\) — the \(2x\,dx\) is already present in the integrand.
- Convert the limits (the safe move for definite integrals): \(x = 0 \mapsto u = 1\); \(x = 2 \mapsto u = 5\).
- Rewrite and integrate: \(\displaystyle\int_1^5 u^3\,du = \Big[\tfrac{u^4}{4}\Big]_1^5 = \tfrac{625}{4} - \tfrac{1}{4} = \) 156.
Alternatively, back-substitute: the antiderivative is \(\tfrac{(x^2+1)^4}{4}\), and evaluating from 0 to 2 with the FTC gives \(\tfrac{625}{4} - \tfrac{1}{4} = 156\) — the same answer by either route.
Evaluate \(\displaystyle\int_0^1 3x^2\,(x^3+1)^2\,dx\). Choose \(u = x^3 + 1\), so \(du = 3x^2\,dx\) — already present. Convert the limits: \(x = 0 \mapsto u = 1\); \(x = 1 \mapsto u = \) ____. Then \(\displaystyle\int u^2\,du\) over those u-limits \(= \Big[\tfrac{u^3}{3}\Big] = \) ____.
Reveal the answer
\(x = 1 \mapsto u = 1^3 + 1 = \) 2, so the integral is \(\displaystyle\int_1^2 u^2\,du = \tfrac{8}{3} - \tfrac{1}{3} = \) \(\tfrac{7}{3}\). Notice the same shape as the worked example: the inner function's derivative was waiting in the integrand, and the u-limits came from plugging the x-limits into \(u = g(x)\).
More info — why substitution is the chain rule run backwards
The chain rule turns \(\frac{d}{dx}F(g(x))\) into \(F'(g(x))\cdot g'(x)\): differentiating a composition always spits out the inner derivative as an extra factor. Substitution is that machine in reverse — it scans an integrand for the pattern \(f(g(x))\cdot g'(x)\) and recognizes it as the derivative of a composition, so the antiderivative must be \(F(g(x)) + C\). That's why \(du = g'(x)\,dx\) has to "use up" the leftover factor: it's exactly the factor the chain rule produced on the way forward. The OpenStax chapter in Dive deeper states both directions side by side if you want the formal statements.
Check your understanding
Evaluate \(\displaystyle\int_0^1 2x\,(x^2+3)^2\,dx\).
You substitute \(u = g(x)\) in the definite integral \(\int_a^b f(g(x))\,g'(x)\,dx\) and find an antiderivative \(F(u)\). Which finishing move is valid?
Find \(\displaystyle\int x\cos(x^2)\,dx\). (Hint: with \(u=x^2\), \(du = 2x\,dx\), but the integrand only has \(x\,dx\).)
The chain rule gives \(\dfrac{d}{dx}\,\dfrac{(x^2+1)^4}{4} = (x^2+1)^3\cdot 2x\). When you reverse this with the substitution \(u = x^2+1\) in \(\int 2x\,(x^2+1)^3\,dx\), which part of the integrand does \(du = g'(x)\,dx\) absorb?
Recap
- Substitution reverses the chain rule: with \(u = g(x)\) and \(du = g'(x)\,dx\), \(\int f(g(x))\,g'(x)\,dx = \int f(u)\,du\).
- The integral must be purely in u before you integrate — no stray x's; if \(du\) is off by a constant, multiply and divide to match.
- Definite integrals: either convert the limits (\(x = a \mapsto u = g(a)\), \(x = b \mapsto u = g(b)\)) and stay in u, or back-substitute and use the x-limits — never plug x-limits into a u-expression.
- Substitution renames the variable; it never changes the area — both pictures shade the same number.
Dive deeper
- Paul's Online Notes — Substitution Rule for Definite Integrals Demonstrate both converting the limits and back-substituting for definite integrals
- OpenStax Calculus Volume 1 — 5.5 Substitution State the substitution theorems for indefinite and definite integrals
Sources
- Integration by Substitution (u-Substitution)