Math Bytes · Calculus · Episode 8 · "Derivatives: chain rule and advanced topics"
The chain rule
The chain rule finds the derivative of a function inside another function: take the derivative of the outside, leaving the inside alone, then multiply by the derivative of the inside. dy/dx = f′(g(x)) · g′(x).
Two layers
Some functions have another function stuck inside them. In (3x + 1)² there are two layers:
- the outside layer is the squaring,
( )² - the inside layer is
3x + 1
The power rule alone can't handle this, because what's being squared isn't just x.
The chain rule
If y = f(g(x)), then
dy/dx = f′(g(x)) · g′(x)
In words: outside′(inside) × inside′. Take the derivative of the outside function, but keep the inside expression sitting in it untouched. Then multiply by the derivative of the inside.
Worked example
Find the derivative of y = (3x + 1)², and its value at x = 1.
- Outside: the power rule on
( )²gives2( ). Leave the inside alone:2(3x + 1). - Inside: the derivative of
3x + 1is3. - Multiply:
dy/dx = 2(3x + 1) · 3 = 6(3x + 1). - At x = 1:
3 · 1 + 1 = 4, sody/dx = 6 · 4 = 24.
Check by expanding: (3x + 1)² = 9x² + 6x + 1, whose derivative is 18x + 6. At x = 1: 18 + 6 = 24. Same answer.
Try it yourself
- Find the derivative of
(5x − 2)². What is it atx = 1? - Find the derivative of
(x² + 1)³.
(Answers: 1. 2(5x − 2) · 5 = 10(5x − 2), which is 30 at x = 1. 2. 3(x² + 1)² · 2x = 6x(x² + 1)².)
Good to know
- "Leaving the inside alone" means the outside derivative is evaluated at the inside expression, not at
x:2(3x + 1), not2x. - With more layers, keep peeling: multiply by one more inside derivative for each layer.
- Leibniz form: if
y = f(u)andu = g(x), thendy/dx = dy/du · du/dx. - Checks: outside′ of
(3x + 1)²is2(3x + 1), inside′ is3, product6(3x + 1), and24atx = 1.
Answer to the comment question
y = (2x + 1)³. What's dy/dx at x = 0? dy/dx = 6. Outside: 3(2x + 1)². Inside: the derivative of 2x + 1 is 2. So dy/dx = 3(2x + 1)² · 2 = 6(2x + 1)². At x = 0: 6 · 1² = 6. Check by expanding: (2x + 1)³ = 8x³ + 12x² + 6x + 1, derivative 24x² + 24x + 6, which is 6 at x = 0.
Test your knowledge
Quick quiz: The chain rule
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- OpenStax, "Calculus Volume 1, 3.6 The Chain Rule": h′(x) = f′(g(x))·g′(x); the chain rule combined with the power rule
- College Board, "AP Calculus AB and BC Course and Exam Description": Unit 3, Differentiation: Composite, Implicit, and Inverse Functions (the chain rule)
- Wolfram MathWorld, "Chain Rule": dy/dx = dy/du · du/dx for composite functions
- MIT OpenCourseWare, "18.01 Single Variable Calculus (Fall 2006)": lecture notes on the chain rule
Video transcript
How do you take the derivative of a function stuck inside another function?
Take (3x + 1)². There's an outside layer, the squaring, and an inside layer, 3x + 1.
The chain rule says peel it like an onion. Take the derivative of the outside, leaving the inside alone. Then multiply by the derivative of the inside.
Outside: the power rule gives 2(3x + 1). Inside: the derivative of 3x + 1 is 3.
Multiply: 6(3x + 1). At x = 1, that's 6 · 4, which is 24.
Your turn. y = (2x + 1)³. What's the derivative at x = 0? Comment your answer below!
That's your byte.
More from Calculus
- Calculus EP5The derivative as a limit
- Calculus EP6The power rule
- Calculus EP10Related rates
- Calculus EP11Position, velocity, acceleration