Integration by Substitution

⚡ Key Takeaways

Integration by substitution reverses the chain rule: it transforms a hard integral ∫f(g(x))g′(x) dx\int f(g(x))g'(x)\,dx into the easier ∫f(u) du\int f(u)\,du by setting u=g(x)u = g(x). It is the single most-used technique for evaluating integrals at the introductory level and works whenever the integrand contains a function and (a constant multiple of) its derivative. Also called u-substitution or the change of variables rule, formalized in the integral calculus of Leibniz (1670s) and Euler (1700s).

💡 The Core Insight

A chain-rule derivative leaves a fingerprint in the integrand: a composite function f(g(x))f(g(x)) multiplied by the derivative g′(x)g'(x) of its inner part. Spotting that fingerprint lets you "undo" the chain rule. Choose uu to be the inner function whose derivative you can find lurking elsewhere in the integrand; the integral collapses into one you already know.

Formal Statement

DefinitionIntegration by Substitution

Let gg be a differentiable function whose range is contained in an interval II, and let ff be continuous on II. If FF is an antiderivative of ff, then substitution gives the indefinite form

1
∫f(g(x)) g′(x) dx=∫f(u) du=F(u)+C=F(g(x))+C\quad \int f(g(x))\,g'(x)\,dx = \int f(u)\,du = F(u) + C = F(g(x)) + C

Derivation hint: set u=g(x)u = g(x) so that the symbolic differential du=g′(x) dxdu = g'(x)\,dx replaces the entire factor g′(x) dxg'(x)\,dx. Here:

  • xx is the original variable of integration,
  • u=g(x)u = g(x) is the new variable (the inner function),
  • g′(x)g'(x) is the derivative of the inner function,
  • du=g′(x) dxdu = g'(x)\,dx is the differential,
  • ff is the outer function, continuous so an antiderivative FF exists,
  • CC is the constant of integration.
TheoremSubstitution for Definite Integrals

If g′g' is continuous on [a,b][a,b] and ff is continuous on the range of gg, then

2
∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(u) du\quad \int_{a}^{b} f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du

Derivation hint: apply the Fundamental Theorem of Calculus to the antiderivative F(g(x))F(g(x)), then evaluate at the original limits — equivalently, change the limits to uu-values g(a)g(a) and g(b)g(b). The crucial feature is that the limits of integration change from xx-values a,ba, b to uu-values g(a),g(b)g(a), g(b). If you instead keep the integral in indefinite form and back-substitute to xx, you use the original limits a,ba, b.

Why It Holds / Derivation

ProofSubstitution from the Chain Rule

We show that equation [1] follows directly from the chain rule.

Step 1. Let FF be an antiderivative of ff, so F′(u)=f(u)F'(u) = f(u) by definition.

Step 2. Form the composite F(g(x))F(g(x)) and differentiate using the chain rule:

3
ddx F(g(x))=F′(g(x))⋅g′(x)=f(g(x)) g′(x)\quad \frac{d}{dx}\,F(g(x)) = F'(g(x))\cdot g'(x) = f(g(x))\,g'(x)

Derivation hint: the chain rule says the derivative of a composite is the outer derivative evaluated at the inner, times the inner derivative.

Step 3. Equation [3] states that F(g(x))F(g(x)) is an antiderivative of f(g(x)) g′(x)f(g(x))\,g'(x). By the definition of the indefinite integral,

4
∫f(g(x)) g′(x) dx=F(g(x))+C\quad \int f(g(x))\,g'(x)\,dx = F(g(x)) + C

Derivation hint: integrating both sides of [3] cancels the derivative, introducing the arbitrary constant CC.

Step 4. Substituting u=g(x)u = g(x) into F(g(x))F(g(x)) gives F(u)F(u), and since ∫f(u) du=F(u)+C\int f(u)\,du = F(u)+C, the two expressions agree. This establishes [1]. ■\blacksquare For the definite case [2], apply the Fundamental Theorem of Calculus to [4]:

5
∫abf(g(x))g′(x) dx=[F(g(x))]ab=F(g(b))−F(g(a))=∫g(a)g(b)f(u) du\quad \int_a^b f(g(x))g'(x)\,dx = \Big[F(g(x))\Big]_a^b = F(g(b)) - F(g(a)) = \int_{g(a)}^{g(b)} f(u)\,du

Derivation hint: evaluate the antiderivative at the endpoints; the values F(g(b))F(g(b)) and F(g(a))F(g(a)) are exactly the endpoints of the transformed integral in uu.

∎
mathematician · Gottfried Wilhelm Leibniz | 1646–1716

Leibniz invented the integral sign ∫\int (an elongated "S" for summa) and the differential notation dxdx in the 1670s–1680s. His deliberate design of the symbols dudu and dxdx as manipulable quantities is precisely what makes substitution feel so natural: the equation du=g′(x) dxdu = g'(x)\,dx is Leibniz's notation working as intended. Where Newton thought in terms of fluxions and physical motion, Leibniz built a symbolic algebra of differentials that survives essentially unchanged today, and the chain rule in Leibniz form, dudx=dudydydx\frac{du}{dx} = \frac{du}{dy}\frac{dy}{dx}, makes substitution look like cancelling fractions.

Building Intuition

🧠 Intuition

Think of integration as accumulating area under a curve, with dxdx as an infinitesimal slice width. When you substitute u=g(x)u = g(x), you are re-stretching the horizontal axis. The factor g′(x)g'(x) is exactly the local stretching rate: where gg changes quickly, a small dxdx corresponds to a large dudu, and where gg changes slowly, the reverse. The term g′(x) dxg'(x)\,dx rewrites each slice's width in the new uu-ruler so that the total accumulated area is preserved. Substitution succeeds precisely when the integrand already supplies the stretching factor g′(x)g'(x) "for free" — then converting to uu costs nothing, and a tangled xx-integral untangles into a plain uu-integral.

Figure
Change of variables: the factor g′(x)g'(x) rescales slice widths so total area is preserved
∫ f(g(x)) g'(x) dx = ∫ f(u) du x f(g(x))g'(x) dx u=g(x) u f(u) du Equal shaded areas — only the horizontal ruler is re-stretched by g′(x).

Worked Examples

ExampleA clean fingerprint: ∫2xcos⁡(x2) dx\int 2x\cos(x^2)\,dx

Given. Evaluate ∫2xcos⁡(x2) dx\displaystyle\int 2x\cos(x^2)\,dx.

Step 1 — Identify inner function. The composite is cos⁡(x2)\cos(x^2), so let u=x2u = x^2.

Step 2 — Differential. dudx=2x  ⟹  du=2x dx\dfrac{du}{dx} = 2x \implies du = 2x\,dx. Notice 2x dx2x\,dx appears exactly in the integrand.

Step 3 — Substitute.

6
∫2xcos⁡(x2) dx=∫cos⁡(u) du\quad \int 2x\cos(x^2)\,dx = \int \cos(u)\,du

Derivation hint: replace x2→ux^2 \to u and the whole factor 2x dx→du2x\,dx \to du.

Step 4 — Integrate. ∫cos⁡u du=sin⁡u+C\int\cos u\,du = \sin u + C.

Step 5 — Back-substitute. Replace u=x2u = x^2.

  ∫2xcos⁡(x2) dx=sin⁡(x2)+C  \boxed{\;\int 2x\cos(x^2)\,dx = \sin(x^2) + C\;}

Check. Differentiate: ddxsin⁡(x2)=cos⁡(x2)⋅2x\frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x. ✓

ExampleDefinite integral with adjusted constant and changed limits

Given. Evaluate ∫02x ex2 dx\displaystyle\int_{0}^{2} x\,e^{x^2}\,dx.

Step 1 — Inner function. Let u=x2u = x^2.

Step 2 — Differential. du=2x dx  ⟹  x dx=12 dudu = 2x\,dx \implies x\,dx = \tfrac12\,du. Here the integrand has x dxx\,dx but we need a factor of 12\tfrac12; we supply it explicitly.

Step 3 — Change the limits. When x=0, u=02=0x=0,\ u = 0^2 = 0; when x=2, u=22=4x=2,\ u = 2^2 = 4.

Step 4 — Substitute.

7
∫02x ex2 dx=∫04eu⋅12 du=12∫04eu du\quad \int_{0}^{2} x\,e^{x^2}\,dx = \int_{0}^{4} e^{u}\cdot\tfrac12\,du = \tfrac12\int_{0}^{4} e^{u}\,du

Derivation hint: x dx=12 dux\,dx = \tfrac12\,du and the xx-limits 0,20,2 become the uu-limits 0,40,4.

Step 5 — Integrate and evaluate.

8
12[eu]04=12(e4−e0)=12(e4−1)\quad \tfrac12\Big[e^{u}\Big]_{0}^{4} = \tfrac12\left(e^{4} - e^{0}\right) = \tfrac12\left(e^{4}-1\right)

Derivation hint: antiderivative of eue^u is eue^u; evaluate at the new limits 44 and 00.

  ∫02x ex2 dx=12(e4−1)≈26.80  \boxed{\;\int_{0}^{2} x\,e^{x^2}\,dx = \tfrac12\left(e^{4}-1\right) \approx 26.80\;}

(The result is a pure number — a definite integral has no units unless xx and ff carry physical units, in which case the answer carries units of [f]⋅[x][f]\cdot[x].)

Common Misconceptions

⚠️ The differential is not optional

A frequent error is to substitute u=g(x)u = g(x) in the integrand but forget to replace dxdx. Writing ∫cos⁡(x2) dx=∫cos⁡u dx\int \cos(x^2)\,dx = \int\cos u\,dx is meaningless — you must convert dxdx via dx=dug′(x)dx = \frac{du}{g'(x)}. If g′(x)g'(x) does not cancel cleanly (i.e. leftover xx's remain that cannot be expressed in uu), the substitution has failed and you need a different method. A second classic error: for definite integrals, changing the variable to uu but keeping the original xx-limits. Either change the limits to g(a),g(b)g(a), g(b) or back-substitute to xx before evaluating — never mix the two.

CounterexampleWhen the fingerprint is missing

Consider ∫cos⁡(x2) dx\displaystyle\int \cos(x^2)\,dx (note: no factor of xx). Tempting as it is to set u=x2u = x^2, we get du=2x dxdu = 2x\,dx, so dx=du2x=du2udx = \frac{du}{2x} = \frac{du}{2\sqrt{u}}, giving

9
∫cos⁡(x2) dx=∫cos⁡u2u du\quad \int \cos(x^2)\,dx = \int \frac{\cos u}{2\sqrt{u}}\,du

Derivation hint: solving du=2x dxdu = 2x\,dx for dxdx reintroduces x=ux=\sqrt u, leaving a square root in the denominator. This new integral is no simpler — in fact ∫cos⁡(x2) dx\int\cos(x^2)\,dx has no elementary antiderivative at all (it is the Fresnel integral). Substitution does not create antiderivatives that do not exist; it only reorganizes ones that do. The lesson: substitution works only when g′(x)g'(x) is genuinely present (up to a constant) in the integrand.

Connections

connection

Substitution is the integral counterpart of the Chain Rule, which it directly inverts. It is one of two pillars of integration technique, the other being Integration by Parts (the inverse of the product rule); many integrals need both. It is a special case of the more general Change of Variables Theorem used in multiple integrals, where g′(x)g'(x) generalizes to the Jacobian determinant. Trigonometric substitution — using x=sin⁡θx = \sin\theta or x=tan⁡θx=\tan\theta — is substitution run "backwards" (substituting into xx rather than reading uu off the integrand). Finally, substitution underlies the derivation of standard forms in the Fundamental Theorem of Calculus and many entries in integral tables.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1670s — Leibniz introduces the integral sign ∫\int and differential dxdx, designing notation that makes du=g′(x) dxdu = g'(x)\,dx manipulable.
- 1684 — Leibniz publishes the differential calculus (Nova Methodus), giving the chain rule that substitution inverts.
- 1690s — The Bernoulli brothers (Jakob and Johann) systematically apply changes of variable to solve early differential equations.
- 1748 — Euler's Introductio in analysin infinitorum and later Institutiones calculi integralis (1768–70) codify substitution as a standard integration technique with worked examples.
- 1820s — Cauchy places integration on rigorous footing with the definite integral as a limit of sums, clarifying when substitution is valid (continuity of g′g').
- 1854 — Riemann's formal definition of the integral makes precise the conditions under which the change-of-variables formula holds.
- Late 1800s — Generalization to multiple integrals via the Jacobian (Jacobi's determinant, 1841) extends substitution to higher dimensions.
- 20th century — Lebesgue integration and measure theory provide the most general change-of-variables theorems, validating substitution far beyond the continuous case.

Subtleties & Limits

open-problem · Where substitution gets delicate

Substitution is elementary but has genuine pitfalls worth flagging. (1) Monotonicity for definite integrals: if gg is not one-to-one over [a,b][a,b] (it doubles back), the naive limit-change can give wrong signs unless handled carefully — the rigorous theorem still holds, but interpretation requires care. (2) Existence of antiderivatives: substitution never manufactures an elementary antiderivative where none exists; functions like e−x2e^{-x^2}, sin⁡xx\frac{\sin x}{x}, and cos⁡(x2)\cos(x^2) are provably non-elementary (Liouville's theorem, 1830s–40s, settled which integrals can be expressed in closed form). (3) Improper integrals: when limits are infinite or the integrand is unbounded, substitution must be combined with limit arguments. (4) Choosing uu remains an art, not an algorithm — there is no general procedure that always finds the right inner function, which is why symbolic-integration algorithms (the Risch algorithm, 1968) are surprisingly intricate.

See Also

Chain Rule · Integration by Parts · Trigonometric Substitution · Fundamental Theorem of Calculus · Change of Variables Theorem · Antiderivatives · Differentials