Chain Rule

Definitionnoun phrase

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.

In Spanish
regla de la cadena
Also called
chain rule for derivatives, composite function rule, outside-inside rule
Grade level
Calculus
CalculusAP

Chain Rule in a picture

The chain rule on y = (3x + 1) to the 4thAn outer box ( ) to the 4th holds an inner box u = 3x + 1. Differentiate the outer to get 4(3x + 1) cubed, multiply by the inner derivative 3, and get 12(3x + 1) cubed. In Leibniz form, dy/dx = dy/du times du/dx.y = (3x + 1)⁴outer: ( )⁴inner: u = 3x + 1Differentiate the outer,keep the inner inside:4(3x + 1)³Multiply by the innerderivative:× 312(3x + 1)³dy/dx =dy/dx = dy/du · du/dxrates multiply: 4u³ per u, and 3 u per x
Peel the function from the outside in: the outer power gives 4(3x + 1)3, and the inner function contributes a factor of 3. Together, 12(3x + 1)3.

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

Chain rule
ddx( f(g(x)) ) = f′(g(x)) · g′(x)
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

Warm-up

Differentiate y = (2x − 5)3.

  1. Outer: u3, so its derivative is 3u2 = 3(2x − 5)2.
  2. Inner: u = 2x − 5, so u′ = 2.
  3. Multiply: 3(2x − 5)2 · 2 = 6(2x − 5)2.

Answer: y′ = 6(2x − 5)2.

Example 2: A square root

Core

Find f′(x) for f(x) = √x2 + 9, then evaluate f′(4).

  1. Write f(x) = (x2 + 9)12.
  2. Outer derivative: 12(x2 + 9)−12. Inner derivative: 2x.
  3. Multiply: f′(x) = 2x2√x2 + 9 = x√x2 + 9.
  4. f′(4) = 4√25 = 45.

Answer: f′(x) = x√x2 + 9, so f'(4) = 4/5.

Example 3: Chain rule from a table

Test-style

Let h(x) = f(g(x)). You know g(2) = 5, g′(2) = 3, f(5) = 1 and f′(5) = −4. Find h′(2).

  1. Chain rule: h′(2) = f′(g(2)) · g′(2).
  2. Inner value first: g(2) = 5, so you need f′(5) = −4.
  3. Multiply: −4 · 3 = −12.

Answer: h'(2) = -12

Common mistakes

✗ Mistakeddx(x2 + 1)3 = 3(x2 + 1)2.
✓ Instead3(x2 + 1)2 · 2x = 6x(x2 + 1)2.

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.

✗ Mistakeddx(x2 + 1)3 = 3(2x)2.
✓ Instead3(x2 + 1)2 · 2x.

The inner function stays unchanged inside the outer derivative. Its derivative goes outside as a separate factor.

✗ MistakeUsing f′(2) for h′(2) when h = f(g(x)).
✓ InsteadUse f′(g(2)).

The outer derivative is evaluated at the inner function’s output, not at the original input.

Not to be confused with

Chain Rulevs.Product rule

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.

Chain Rulevs.Power 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

Question 1 of 3

What is ddx(x2 + 1)5?

Show answer and explanation

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.

Question 2 of 3

What is ddxe4x?

Show answer and explanation

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.

Question 3 of 3

Which function needs the chain rule?

Show answer and explanation

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.

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

  1. OpenStax, Calculus Volume 1, 3.6 The Chain Rule
  2. 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

TermChain Ruleddxf(g(x))
DefinitionOuter derivative with the inner left inside, times the inner derivative: f′(g(x))g′(x). Example: (3x + 1)4 → 12(3x + 1)3.
Study the full deck

Browse all terms in the Math Dictionary · More calculus terms · Random term