What is the chain rule in calculus?
The chain rule is the rule for the derivative of a composite function: if y = f(g(x)), then y′ = f′(g(x)) · g′(x). Differentiate the outer function, leave the inner function inside, then multiply by the derivative of the inner function. For (x2 + 1)3, the derivative is 3(x2 + 1)2 · 2x.
Chain Rule in a picture
Formal definition and notation
If g is differentiable at x and f is differentiable at g(x), then the composite h(x) = f(g(x)) is differentiable at x and h′(x) = f′(g(x)) g′(x). In Leibniz notation, if y = f(u) and u = g(x), then dydx = dydu · dudx. For a chain of three functions the rule repeats: (f(g(k(x))))′ = f′(g(k(x))) g′(k(x)) k′(x).
| Symbol | Read it as | Meaning |
|---|---|---|
| f(g(x)) | f of g of x | a composite function: g inner, f outer |
| f′(g(x)) · g′(x) | f prime of g of x, times g prime of x | the chain rule |
| dydu · dudx | d y d u times d u d x | Leibniz form: rates of change multiply |
Key facts
- Spot the chain rule whenever something other than plain x sits inside a power, root, exponential, log or trig function.
- The inner function stays the same in the first factor; only its derivative is multiplied on.
- Power chain: ddx(5x − 2)6 = 6(5x − 2)5 · 5.
- Exponential chain: ddxe3x = 3e3x. Log chain: ddxln (x2 + 1) = 2xx2 + 1.
- If the inner function is just x, its derivative is 1 and the chain rule changes nothing.
- Leibniz form explains the name: rates link like a chain. If u changes 3 times as fast as x and y changes 2 times as fast as u, then y changes 6 times as fast as x.
Chain rule
- g(x)
- the inner function
- f′(g(x))
- the derivative of the outer function, with the inner left unchanged inside
- g′(x)
- the derivative of the inner function
Power form, the most common case: ddx( un ) = nun − 1 · u′.
Chain Rule examples, step by step
Example 1: Power of a linear function
Differentiate y = (2x − 5)3.
- Outer: u3, so its derivative is 3u2 = 3(2x − 5)2.
- Inner: u = 2x − 5, so u′ = 2.
- Multiply: 3(2x − 5)2 · 2 = 6(2x − 5)2.
Answer: y′ = 6(2x − 5)2.
Example 2: A square root
Find f′(x) for f(x) = √x2 + 9, then evaluate f′(4).
- Write f(x) = (x2 + 9)12.
- Outer derivative: 12(x2 + 9)−12. Inner derivative: 2x.
- Multiply: f′(x) = 2x2√x2 + 9 = x√x2 + 9.
- f′(4) = 4√25 = 45.
Answer: f′(x) = x√x2 + 9, so f'(4) = 4/5.
Example 3: Chain rule from a table
Let h(x) = f(g(x)). You know g(2) = 5, g′(2) = 3, f(5) = 1 and f′(5) = −4. Find h′(2).
- Chain rule: h′(2) = f′(g(2)) · g′(2).
- Inner value first: g(2) = 5, so you need f′(5) = −4.
- Multiply: −4 · 3 = −12.
Answer: h'(2) = -12
Common mistakes
This forgets the inner derivative, the most common chain rule error. The inside is x2 + 1, not x, so its derivative 2x must be multiplied on.
The inner function stays unchanged inside the outer derivative. Its derivative goes outside as a separate factor.
The outer derivative is evaluated at the inner function’s output, not at the original input.
Not to be confused with
The product rule is for two functions multiplied, f(x) · g(x). The chain rule is for one function inside another, f(g(x)). x2ex needs the product rule; ex2 needs the chain rule.
The power rule alone handles xn. When the base is an expression, like (4x + 1)n, you need the power rule and the chain rule.
Quick check: 3 questions
What is ddx(x2 + 1)5?
Answer: B. Outer: 5(x2 + 1)4; inner derivative: 2x. The product is 10x(x2 + 1)4. The first choice forgets the inner derivative and the third replaces the inside with its derivative.Show answer and explanation
What is ddxe4x?
Answer: C. The derivative of eu is eu, times u′ = 4: 4e4x. e4x forgets the inner derivative, and 4xe4x − 1 wrongly uses the power rule on an exponential.Show answer and explanation
Which function needs the chain rule?
Answer: D. √5x − 1 has the inner function 5x − 1 inside a root. The others are powers of plain x, handled by the power rule alone.Show answer and explanation
Chain Rule: frequently asked questions
When do you use the chain rule?
Use it whenever you differentiate a function of a function: an expression other than plain x inside a power, root, exponential, logarithm or trig function. Examples: (3x − 7)4, √x2 + 1, e5x, ln (2x). If the inside is just x, as in x4, the chain rule is not needed.
What is the chain rule formula?
For y = f(g(x)), the derivative is f′(g(x)) · g′(x): the outer derivative with the inner function left inside, times the inner derivative. In Leibniz notation, dydx = dydu · dudx, where u is the inner function. The common power form is ddxun = nun − 1u′.
Why is it called the chain rule?
Because rates of change link together like a chain. If y depends on u, and u depends on x, then a small change in x changes u, which in turn changes y. The overall rate is the product of the links: dydu times dudx. With more nested functions, the chain just gets longer.
Practice and tools
Sources
- OpenStax, Calculus Volume 1, 3.6 The Chain Rule
- OpenStax, Calculus Volume 1, 3.3 Differentiation Rules
Updated November 2026·Reviewed by the Effortless Math team·Standards: n/a
Cite this entry
Effortless Math Team. “Chain Rule.” Effortless Math Dictionary. Updated November 2026. https://www.effortlessmath.com/math-dictionary/chain-rule/
Flashcard
Browse all terms in the Math Dictionary · More calculus terms · Random term