Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

The chain rule, revisited

~8 min

The chain rule differentiates a composition y=f(g(x)) by multiplying the outer function's derivative (evaluated at the inner function) by the inner function's own derivative. Nothing about that idea changes when a function depends on several variables instead of one. The multivariable chain rule, several chapters ahead, is this same rule with an extra term for every extra input variable.

Think of f(g(x)) as two machines bolted together in series. The input goes into the first machine, and whatever comes out feeds directly into the second machine. Suppose the first machine speeds up its own output by some factor at a given point. Suppose the second machine separately amplifies whatever it receives by some other factor. The combined system's total sensitivity to the input is those two factors multiplied together, not just one of them alone. The chain rule is nothing but that multiplication made precise.

The chain rule differentiates a composition y=f(g(x)) by multiplying the outer function's derivative (evaluated at the inner function) by the inner function's own derivative. Recognizing a composition is the actual skill: y=\sin(x^2) is f(u)=\sin u composed with u=g(x)=x^2, so \frac{dy}{dx}=\cos(x^2)\cdot 2x. That result is the outer derivative, evaluated at the UNCHANGED inner function, times the inner function's own derivative. A common failure is differentiating only the outer piece and forgetting the extra factor g'(x) entirely. This is especially likely when the inner function is something as visually simple as a linear expression, e.g. y=\sin(3x+1). There it's tempting to write \cos(3x+1) alone and stop, silently dropping the required factor of 3. Nothing about this idea changes when a function depends on several variables instead of one. The multivariable chain rule, several chapters ahead, is this same rule with one extra term per extra input variable a composition passes through.

Formula

Chain Rule

Recalled from Calculus I — Differential & Integral Calculus · The chain rule — first taught there.

🔖

If y = f(u) and u = g(x), then \frac{dy}{dx} = f'(g(x)) \cdot g'(x).

Loading interactive…

f∘g as two machines in series

Click each chip and watch it travel through both boxes — then hit Swap and compare f(g(x)) to g(f(x)) at the same input.

Loading interactive…

Watch the inner function's rate feed into the outer one

Drag k up — the curve oscillates faster, and its slope at every point scales by exactly the extra factor k the chain rule predicts.

Loading interactive…

Worked example

Differentiating a composition

  1. 1

    Find \dfrac{d}{dx}\left[\sin(3x^2+1)\right].

  2. 2

    Identify the layers: outer function f(u)=\sin u, inner function u=g(x)=3x^2+1.

  3. 3

    Differentiate the outer function, leaving the inner function untouched inside it: f'(u) = \cos u \implies \cos(3x^2+1).

    the inner function is copied over here, unchanged, not differentiated yet

  4. 4

    Multiply by the inner function's own derivative, g'(x)=6x.

  5. 5

    \boxed{\dfrac{d}{dx}\left[\sin(3x^2+1)\right] = 6x\cos(3x^2+1)}

Loading interactive…

Where this goes next

Chapter 4: Partial derivatives

The multivariable chain rule for z=f(x,y) where x=x(t) and y=y(t) is \dfrac{dz}{dt}=\dfrac{\partial z}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial z}{\partial y}\dfrac{dy}{dt}. That is the same "outer rate times inner rate" structure reviewed here. It's just added up once per input variable instead of applied to a single one.

Quick review

Practice from earlier coursework, pulled in for this topic.

From Calculus II — Integral Calculus & Infinite Series

Find \dfrac{d}{dx}\left[\sin(5x)\right].

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Any equivalent form counts — 2x+3, 3 + 2·x, … Use the keypad below the field for fractions, roots, and other symbols.

Why

Outer derivative \cos(5x) times inner derivative 5.

Correct answer

Also accepted:

Why

The outer function is \sin(\cdot) and the inner function is 5x -- chain rule multiplies their derivatives.

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.