If \(y = f(g(x))\) and both \(f\) and \(g\) are differentiable where needed, the chain rule says \[ \frac{dy}{dx} = f'(g(x))\, g'(x). \] In words: evaluate the outer derivative at the inner output, then multiply by the inner derivative. You are composing two rates of change, so you multiply the two local scales. For the meaning of a single derivative before you stack them, see what a derivative actually measures.
The picture: two gears, not one
A tiny change \(dx\) first moves the inner function by about \(g'(x)\,dx\). That change becomes the input change for \(f\). Near the current inner value \(u = g(x)\), the outer function scales input changes by about \(f'(u)\). So the net change in \(y\) is about \[ dy \approx f'(g(x)) \cdot \bigl(g'(x)\, dx\bigr). \] Divide by \(dx\) and you recover the product. Forgetting either factor is the usual exam slip: people differentiate the outer shell and leave the inside frozen, or they differentiate the inside and forget the outer slope.
Worked example 1: power of a linear expression
Let \(y = (3x + 1)^4\). Outer function: \(f(u) = u^4\), so \(f'(u) = 4u^3\). Inner function: \(g(x) = 3x + 1\), so \(g'(x) = 3\). Therefore \[ y' = 4(3x + 1)^3 \cdot 3 = 12(3x + 1)^3. \] Check at \(x = 0\): \(y = 1\), and the formula gives \(y' = 12\). Expanding \(y = 81x^4 + 108x^3 + 54x^2 + 12x + 1\) and differentiating term by term also gives \(324x^3 + 324x^2 + 108x + 12\), which equals \(12(3x + 1)^3\). At \(x = 0\) both routes say \(12\).
Worked example 2: sine of a quadratic
Let \(y = \sin(x^2)\). Outer: \(f(u) = \sin u\), so \(f'(u) = \cos u\). Inner: \(g(x) = x^2\), so \(g'(x) = 2x\). Therefore \[ y' = \cos(x^2) \cdot 2x = 2x\cos(x^2). \] Check at \(x = 0\): \(y = \sin 0 = 0\), and \(y' = 0\). That matches a horizontal tangent at the origin for this even looking composition. At \(x = 1\), \(y' = 2\cos(1)\), which is positive since \(\cos 1 > 0\).
Where the chain rule shows up next
Implicit differentiation is the chain rule with \(y\) treated as a function of \(x\): every time \(y\) sits inside another function, you pick up a factor of \(dy/dx\). Read implicit differentiation intuition when the curve is an equation rather than an explicit formula. Related tools: the numerical derivative calculator for a slope check (an estimate, not a proof), and the calculus foundations map for study order.
Common mistakes
- Differentiating only the outer function and writing \(4(3x+1)^3\) without the factor \(3\).
- Writing \(\cos(x^2)\) and dropping the \(2x\).
- Treating \(\sin(x^2)\) as \((\sin x)^2\). Those are different compositions and have different derivatives.
Sources
- OpenStax, Calculus Volume 1, The Chain Rule
- MIT OCW 18.01SC, Single Variable Calculus
- Paul's Online Math Notes, Chain Rule
Frequently asked questions
What is the chain rule in one sentence?
If y = f(g(x)), then dy/dx = f'(g(x)) times g'(x): the outer function's rate at the inner value, multiplied by how fast the inner function is changing.
Why do we multiply the derivatives?
A small change in x first changes the inner output by about g'(x) dx. That change then feeds the outer function and is scaled by about f'(g(x)). The product of the two scales is the net change in y per unit x.
When do I need the chain rule?
Whenever the expression is a composition: one function applied to the output of another. Powers of a non linear expression, sine of a polynomial, and e to a function of x are common cases.