The Chain Rule
Most functions are built by putting one function inside another. The chain rule differentiates them: differentiate the outside, leave the inside alone, then multiply by the derivative of the inside.
For a composite function \(f(g(x))\), the derivative is \(f'(g(x)) \cdot g'(x)\): the outer function’s derivative, evaluated at the inside, times the inside’s derivative. In rate language, \(\dfrac{dy}{dx} = \dfrac{dy}{du} \cdot \dfrac{du}{dx}\): rates along a chain multiply. Each layer of a function contributes one factor, and the factor everyone forgets is the last one, the derivative of the inside.
1Functions inside functions
A composite function applies one function to the output of another. In \(\sin(3x)\), first triple \(x\), then take the sine. The function applied first is the inner function; the one applied last is the outer function. To find the outer function, ask: if I were computing this on a calculator, what would I do last?
| Expression | Outer | Inner | Derivative |
|---|---|---|---|
| \((3x + 1)^5\) | \(\square^5\) | \(3x + 1\) | \(5(3x + 1)^4 \cdot 3\) |
| \(\sin(x^2)\) | \(\sin\square\) | \(x^2\) | \(\cos(x^2) \cdot 2x\) |
| \(e^{4x}\) | \(e^{\square}\) | \(4x\) | \(e^{4x} \cdot 4\) |
| \(\ln(5x - 2)\) | \(\ln\square\) | \(5x - 2\) | \(\frac{1}{5x - 2} \cdot 5\) |
| \(\tan^3 x\) | \(\square^3\) | \(\tan x\) | \(3\tan^2 x \cdot \sec^2 x\) |
2The rule and why it works
\(\dfrac{d}{dx}[\sin(3x)]\)
- 1Outer: \(\sin(\square)\), with derivative \(\cos(\square)\). Inner: \(3x\), with derivative 3.
- 2Differentiate the outer and leave the inside alone: \(\cos(3x)\). Then multiply by the inner derivative: \(\cdot\,3\).
\(\dfrac{d}{dx}\left[(x^2 + 1)^5\right]\)
- 1Outer: \((\square)^5\), derivative \(5(\square)^4\). Inner: \(x^2 + 1\), derivative \(2x\).
- 2\(5(x^2 + 1)^4 \cdot 2x\).
- 3Expanding (x² + 1)⁵ first would take ten terms; the chain rule avoids that.
\(\frac{d}{dx}[\sin(3x)] = 3\cos(3x)\), not \(\cos(3x)\). If your answer would look the same no matter what was inside, you dropped the factor. A good habit is to write the inner derivative first so it cannot be forgotten.
\(\frac{d}{dx}\left[(x^2 + 1)^5\right]\) starts with \(5(x^2 + 1)^4\). The inside, \(x^2 + 1\), stays as written in that factor; its derivative only appears in the separate factor \(2x\).
3One layer at a time
\(\dfrac{d}{dx}\sqrt{x^2 + 9}\)
- 1Rewrite: \((x^2 + 9)^{1/2}\). Outer derivative: \(\tfrac12(\square)^{-1/2}\). Inner derivative: \(2x\).
- 2\(\tfrac12(x^2 + 9)^{-1/2} \cdot 2x = \dfrac{x}{\sqrt{x^2 + 9}}\).
\(\dfrac{d}{dx}\left[e^{-x^2}\right]\) and \(\dfrac{d}{dx}\left[\ln(x^2 + 1)\right]\)
- 1\(e^{\square}\) is its own derivative, so \(e^{-x^2} \cdot (-2x)\).
- 2\(\ln(\square)\) has derivative \(\dfrac{1}{\square}\), so \(\dfrac{1}{x^2 + 1} \cdot 2x\).
\(\dfrac{d}{dx}\left[\sin^3(2x)\right]\)
- 1\(\sin^3(2x)\) means \([\sin(2x)]^3\). Peel from the outside: a cube, around a sine, around \(2x\).
- 2Cube: \(3[\sin(2x)]^2\). Sine: \(\cos(2x)\). Innermost: 2.
- 3Multiply one factor per layer: \(3\sin^2(2x) \cdot \cos(2x) \cdot 2\).
\(\sin^2 x = (\sin x)^2\): the square is the outer layer, derivative \(2\sin x\cos x\). \(\sin(x^2)\): the sine is outer, derivative \(\cos(x^2) \cdot 2x\). Different functions, different derivatives.
4Tables, products and rates
\(h(x) = f(g(x))\); find \(h'(1)\)
| \(x\) | \(f(x)\) | \(f'(x)\) | \(g(x)\) | \(g'(x)\) |
|---|---|---|---|---|
| 1 | 6 | −2 | 3 | 5 |
| 3 | 4 | 7 | 1 | −8 |
- 1\(h'(1) = f'(g(1)) \cdot g'(1)\). Find the inside value first: \(g(1) = 3\).
- 2So the outer derivative is needed at 3, not at 1: \(f'(3) = 7\).
- 3\(h'(1) = 7 \cdot 5 = 35\).
In Worked Example 6, using \(f'(1) = -2\) gives \(-10\), which is wrong. The outer derivative is evaluated at the inner output, \(g(1) = 3\). Read the inside first, then go back to the table.
\(\dfrac{d}{dx}\left[x^2\sin(3x)\right]\)
- 1The outermost structure is a product, so the product rule leads and the chain rule works inside it.
- 2\(2x \cdot \sin(3x) + x^2 \cdot 3\cos(3x)\).
Inflating a balloon
A spherical balloon’s radius is 5 cm and growing at 0.2 cm per second. How fast is its volume \(V = \frac43\pi r^3\) growing?
- 1Volume depends on radius, and radius depends on time, so \(\dfrac{dV}{dt} = \dfrac{dV}{dr} \cdot \dfrac{dr}{dt}\).
- 2\(\dfrac{dV}{dr} = 4\pi r^2 = 4\pi(25) = 100\pi\) cm³ per cm.
- 3\(\dfrac{dV}{dt} = 100\pi \cdot 0.2 = 20\pi \approx 62.83\) cm³ per second.
“\(\dfrac{dV}{dt} = \dfrac{dV}{dr} \cdot \dfrac{dr}{dt} = 4\pi(5)^2(0.2) = 20\pi\). When the radius is 5 cm, the volume is increasing at \(20\pi\) cubic centimeters per second.”
Quick reference
| Outer function | Chain rule result |
|---|---|
| \([u]^n\) | \(n[u]^{n - 1} \cdot u'\) |
| \(\sin u\) | \(\cos u \cdot u'\) |
| \(\cos u\) | \(-\sin u \cdot u'\) |
| \(e^u\) | \(e^u \cdot u'\) |
| \(\ln u\) | \(\frac{1}{u} \cdot u'\) |
| \(\sqrt{u}\) | \(\frac{1}{2\sqrt{u}} \cdot u'\) |