How Math Works
Analysis & Calculusformulaintermediate

The Chain Rule

Chain rule: outer derivative × inner derivative, multiplied down the chain.

The formula

(f(g(x)))' = f'(g(x))·g'(x)

How to read it: differentiate the outer function (leaving the inside as is), then multiply by the derivative of the inner function

g(x)
the inner function
f'(g(x))
differentiate the outer function, leaving the inside untouched
g'(x)
the derivative of the inner function

The hook

When a function sits inside another function, the derivative flows as 'outer × inner' — the rule you'll reach for most in calculus.

In plain words

To differentiate a composite (a function inside a function), multiply the outer function's derivative by the inner function's derivative.

The intuition

Picture meshed gears. The outer wheel turns at some multiple of the inner wheel's speed. Rates of change multiply down the chain — hence 'chain' rule.

How it's built

Peel it like an onion, outermost first. Differentiate the outer f (leaving the inside g alone), then multiply by how fast g itself changes with x (that's g').

Example

For y=(x²+1)³, the outer is a cube (→3u²), the inner is x²+1 (→2x). Multiply: y'=3(x²+1)²·2x = 6x(x²+1)². At x=1 that's 6·1·4 = 24.

Common mistake

It's easy to forget to multiply by the inner derivative g'. Stopping at 3(x²+1)² — outer only — is wrong.

Where it's used

Whenever exponentials, logs, or trig functions are wrapped around other expressions; related rates in physics; and backpropagation in neural networks — all chain rule.

Where it came from

This is where Leibniz's dy/dx notation shines — dy/dx = dy/du · du/dx reads as if the fractions just cancel.

Prerequisites

Quick check

What is the derivative of y=(3x+1)²?

  • 2(3x+1)
  • 6(3x+1)
  • 6x
  • 3(3x+1)²

Practice

What is the derivative of y=(2x+1)³ at x=0?

Answer: 6

Solution:
  1. Outer: cube → 3(2x+1)² ; inner: 2x+1 → 2
  2. y'=3(2x+1)²·2 = 6(2x+1)²
  3. Plug in x=0 → 6·1 = 6

Takeaway: After the outer derivative, always multiply by the inner derivative 2.

What is the derivative of y=(x²+1)² at x=1?

Answer: 8

Solution:
  1. Outer: square → 2(x²+1) ; inner: x²+1 → 2x
  2. y'=2(x²+1)·2x = 4x(x²+1)
  3. Plug in x=1 → 4·1·2 = 8

Takeaway: Expand to x⁴+2x²+1, differentiate to 4x³+4x, at x=1 gives 8 — matches.

Differentiate y=(5x−2)⁴ with the chain rule.

Answer: undefined

Solution:
  1. Outer: 4th power → 4(5x−2)³ ; inner: 5x−2 → 5
  2. y'=4(5x−2)³·5 = 20(5x−2)³

Takeaway: Don't forget to multiply by the inner derivative (here, 5).

Keep learning in the app

Touch-and-drag widgets, self-graded practice and daily formulas — free on iOS and Android.