Calculus 1Differentiation Rules

The Chain Rule

(f(g(x)))′ = f′(g(x)) · g′(x).

Not started Jump to practice

Most functions in practice are built in layers: $\sin(3x)$, $(x^2 + 1)^{10}$, $\sqrt{1 + x^4}$. You know Composition of Functions and the derivatives of the outer pieces, from Derivatives of Trig Functions and the power rule. The chain rule tells how the layers' rates combine: they multiply.

Key idea

If $y = f(u)$ and $u = g(x)$, then $$\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}, \qquad\text{that is,}\qquad \big(f(g(x))\big)' = f'\big(g(x)\big)\cdot g'(x).$$ Differentiate the outside, leaving the inside alone, then multiply by the derivative of the inside.

Picture three linked gears. If gear $u$ turns 3 times for every turn of gear $x$, and gear $y$ turns 2 times for every turn of gear $u$, then $y$ turns $2 \times 3 = 6$ times for every turn of $x$. Rates of change behave the same way: a change in $x$ is stretched by $g'(x)$ on its way to $u$, then stretched again by $f'(u)$ on its way to $y$.

$x \to u = x^2 \to y = \sin u$. A short interval is stretched by about $2x$, then by about $\cos u$. The overall stretch is the product $\cos(x^2)\cdot 2x$.

Why it works

For a small change $\Delta x$, write $\frac{\Delta y}{\Delta x} = \frac{\Delta y}{\Delta u}\cdot\frac{\Delta u}{\Delta x}$, which is true algebra whenever $\Delta u \ne 0$. As $\Delta x \to 0$, $\Delta u \to 0$ too (because $g$ is continuous), so $\frac{\Delta u}{\Delta x} \to g'(x)$ and $\frac{\Delta y}{\Delta u} \to f'(u)$. The product of the limits is the limit of the product. (A careful proof also handles the case where $\Delta u$ can be 0, but the idea is this.)

Worked example: A power of a polynomial

Differentiate $(3x^2 + 1)^5$.
  1. Inside $u = 3x^2 + 1$, outside $u^5$.
  2. Outer derivative: $5u^4 = 5(3x^2 + 1)^4$, with the inside left alone.
  3. Inner derivative: $6x$.
  4. Multiply: $5(3x^2 + 1)^4 \cdot 6x$.

Answer: $30x(3x^2 + 1)^4$

Worked example: Trig with an inside

Differentiate $\sin(4x)$ and $\sqrt{x^2 + 9}$.
  1. $\sin(4x)$: outer $\cos(4x)$, inner rate $4$, so the derivative is $4\cos(4x)$.
  2. $\sqrt{x^2 + 9} = (x^2 + 9)^{1/2}$: outer $\frac{1}{2}(x^2 + 9)^{-1/2}$, inner rate $2x$.
  3. Multiply: $\frac{2x}{2\sqrt{x^2 + 9}} = \frac{x}{\sqrt{x^2 + 9}}$.

Answer: $4\cos(4x)$ and $\frac{x}{\sqrt{x^2 + 9}}$

Worked example: From a table

$g(1) = 3$, $g'(1) = 2$, $f'(1) = 5$, $f'(3) = -4$. Find $h'(1)$ for $h(x) = f(g(x))$.
  1. $h'(1) = f'\big(g(1)\big)\cdot g'(1) = f'(3)\cdot 2$.
  2. $= (-4)(2) = -8$. The outer rate is read at the inside value $g(1) = 3$, not at 1.

Answer: $-8$

Common mistake

Forgetting to multiply by the derivative of the inside: writing $\frac{d}{dx}(3x^2 + 1)^5 = 5(3x^2 + 1)^4$. Check with a case you can do another way: $(2x)^2 = 4x^2$ has derivative $8x$. The chain rule gives $2(2x)\cdot 2 = 8x$; forgetting the inner factor gives $4x$, which is wrong.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Also used in other ladders:

Sources and further reading

  • OpenStax Calculus Volume 1, 3.6 The Chain Rule
  • MIT OpenCourseWare 18.01SC Single Variable Calculus, Unit 1: The Chain Rule
@teddyrookbook GitHub