The Chain Rule and How Derivatives Compose
What this article is about
The earlier differentiation rules handle functions combined by arithmetic, but not one function fed into another [1, p. 250]; cos(x²) is an example (ours). That case is the job of the chain rule. The account here is based on OpenStax Calculus Volume 1, §3.6 [1]. For what a derivative is and the limit behind it, see The derivative, from first principles to intuition.
1. The idea: a chain reaction
An example of our own: h(x) = cos(x²). Nudge x and x² moves; because x² moved, cos(x²) moves too. The book’s name for this effect is “a chain reaction”, and it means that differentiating the composite needs both functions’ derivatives, outer and inner [1, p. 250]. For our h the result is h′(x) = −sin(x²)·2x: the outer derivative, −sin, taken at the inner function x², multiplied by the inner derivative 2x.
2. The rule
The chain rule [1, p. 251]. Write h = f ∘ g, so h(x) = f(g(x)). At any x where g is differentiable and f is differentiable at g(x),
h′(x) = f′(g(x)) · g′(x).
(Our note: f is required to be differentiable at g(x), the point the inner function sends x to, not at x itself.)
Written with Leibniz’s notation, for y a function of u and u a function of x, the rule becomes [1, pp. 251, 256]
dy/dx = (dy/du) · (du/dx).
That form is common in physics, the book says, with one caution: “the final answer must be expressed entirely in terms of the original variable given in the problem” [1, pp. 256–257].
Applying it. In practice one names the outer function f and the inner one g, and multiplies f′, evaluated at g(x), by g′(x) [1, p. 251]. One caution from the book: “we never evaluate a derivative at a derivative” [1, p. 251].
3. With the power rule
When the outer function is a power, f(x) = xⁿ, the chain rule turns into a rule for h(x) = (g(x))ⁿ [1, pp. 251–252]:
h′(x) = n(g(x))ⁿ⁻¹ · g′(x)
wherever the derivative is defined [1, p. 251]. Three examples of our own:
- h(x) = (x³ − 2x)⁵ gives h′(x) = 5(x³ − 2x)⁴(3x² − 2);
- h(x) = 1/√(5 − 2x) = (5 − 2x)^(−1/2) gives h′(x) = −½(5 − 2x)^(−3/2) · (−2) = (5 − 2x)^(−3/2);
- for the tangent to h(x) = √(x² + 9) = (x² + 9)^(1/2) at x = 4: h(4) = 5 and h′(x) = x/√(x² + 9), so the slope is h′(4) = 4/5 and the tangent line is y = 0.8x + 1.8.
4. Three or more functions
With three functions in the chain, the rule is used twice. For k(x) = h(f(g(x))), wherever k is differentiable, the book gives k′(x) = h′(f(g(x))) · f′(g(x)) · g′(x) [1, p. 254]. Longer chains follow the same pattern: one derivative factor per function, each evaluated at whatever sits inside it [1, pp. 254–255]. An example of our own: k(x) = √(cos(4x) + 3), a square root of a shifted cosine of 4x, so
k′(x) = 1/(2√(cos(4x) + 3)) · (−sin(4x)) · 4 = −2 sin(4x)/√(cos(4x) + 3).
5. Using it
A growth rate. Our example: a bacterial culture holds N(t) = (t² + 1)³ thousand cells after t hours. It grows at N′(t) = 3(t² + 1)² · 2t = 6t(t² + 1)² thousand cells per hour, which at t = 1 is 24.
Values only. The rule needs nothing but values [1, p. 256]. With our numbers, if h(x) = f(g(x)) and g(2) = −1, g′(2) = 5 and f′(−1) = 3, then h′(2) = f′(g(2))·g′(2) = 3 · 5 = 15.
6. Why it is true: the book’s informal proof
The book calls its argument “a very informal proof” and says that “For simplicity’s sake we ignore certain issues”; in particular it assumes g(x) ≠ g(a) for every x ≠ a throughout some open interval around a [1, p. 255]. With that assumption the difference quotient for h at a can be split in two:
h′(a) = lim_{x→a} [f(g(x)) − f(g(a))] / [g(x) − g(a)] · [g(x) − g(a)] / (x − a).
The right-hand factor is the difference quotient of g, so its limit is g′(a). For the left-hand one, g is continuous at a because it is differentiable there, so g(x) approaches g(a); writing y = g(x) and b = g(a) turns that factor into the difference quotient of f at b, with limit f′(b) = f′(g(a)). Hence h′(a) = f′(g(a))·g′(a) [1, pp. 255–256].
Not covered here
- Derivatives of inverse functions and implicit differentiation, which the same chapter treats next [1, §§3.7–3.8].
- A proof that handles the case g(x) = g(a) near a, which the book’s informal proof sets aside [1, p. 255].
Sources
[1]OpenStax, Calculus Volume 1, §3.6 “The Chain Rule” (pp. 250–259; cited pp. 250–257). The equations on these pages are images; they were read from rendered pages 250, 251, 252, 254, 255 and 256. View at source ↗
Works cited
- Gilbert Strang and Edwin “Jed” Herman, Calculus Volume 1 (OpenStax, Rice University, 2016). openstax.org/details/books/calculus-volume-1. License: CC BY-NC-SA 4.0. Access for free at openstax.org.