Resources
The chain rule and reading the layers
The chain rule is one line long, and once an expression has been broken into layers, applying it is bookkeeping. Almost every mistake made with it happens before that point.
The course names this directly. Topic 3.1’s suggested skill is to identify an appropriate rule based on the classification of a given expression, and the framework’s own parenthetical example is the chain rule for a composite function. The rule is not the skill. Classifying the expression is.
What the rule says
Suppose \(g\) is differentiable at \(x\) and \(h\) is differentiable at \(g(x)\). Then the composition \(h \circ g\) is differentiable at \(x\), and
\[(h \circ g)'(x) = h'\big(g(x)\big) \cdot g'(x).\]Both hypotheses matter, and they are evaluated at different points: \(g\) at \(x\), and \(h\) at the value \(g\) produced. That mismatch is the whole content of the rule, and it is what the notation is trying to warn you about.
In Leibniz notation, writing \(u = g(x)\),
\[\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx},\]which is easier to remember and easier to misread, because it suggests two fractions cancelling. They are not fractions. What is true is the statement above.
Applied once, on \((3x+1)^5\): the outer function is \(h(u) = u^5\) and the inner is \(g(x) = 3x+1\), so \(h'(u) = 5u^4\) and \(g'(x) = 3\). Substituting \(u = g(x)\) into \(h'\) and multiplying,
\[\frac{d}{dx}(3x+1)^5 = 5(3x+1)^4 \cdot 3 = 15(3x+1)^4.\]Notice what would go wrong with \(5u^4\) left as it stands: the answer would be in terms of a variable the question never mentioned. Substituting \(g(x)\) back in is not cosmetic. It is the half of the rule that says where \(h'\) is being evaluated.
Reading the layers
The tool below lays a composite out in layers, outermost first. Each layer contributes exactly one factor, and the derivative is the product of those factors — a product of ordinary numbers, once \(x\) is fixed.
Seven composites. The stack lists the layers from the outside in; each row shows the factor that layer contributes and its value at the chosen x. The product row is the chain rule's answer, and the line beneath compares it against a slope measured directly from the function by a symmetric difference with a step of one hundred-thousandth. The two agree to four decimals at every position on the slider, for all seven functions, which is the point: the chain rule is not a mnemonic, it is a true statement about a number you could have measured instead.
Two things are worth watching as the slider moves. The factors change independently — the inner one can be small while the outer one is large, and the product is neither. And the measured slope tracks the product everywhere, including at the values of \(x\) where the function is steep enough that a graph would be no help.
The three-layer case is the same rule applied twice. There is no separate rule for three layers; the middle factor is what appears when the inner function of the outer function is itself a composition.
Two functions that look alike
\(\sin(x^2)\) and \((\sin x)^2\) are built from the same two ingredients in opposite order, and their derivatives have nothing in common:
\[\frac{d}{dx}\sin(x^2) = 2x\cos(x^2), \qquad \frac{d}{dx}(\sin x)^2 = 2\sin x \cos x = \sin(2x).\]At \(x = 0.8\) the first is 1.2834 and the second is 0.9996. Switch between them in the tool and the stack rearranges: what was the outer factor becomes the inner one. Neither function is harder than the other. Reading which is which is the entire task, and it is the same reading problem as composing functions in the first place.
The factor that goes missing
The characteristic chain rule error is writing \(\cos(x^2)\) for the derivative of \(\sin(x^2)\) — differentiating the outer layer and stopping. In the stack that is visible as dropping a row. At \(x = 0.8\) the outer factor is 0.8021 and the true derivative is 1.2834, so the omission costs a factor of \(2x = 1.6\), and at \(x = 0.05\) it would cost a factor of \(0.1\) in the other direction. The error does not have a characteristic size; it has a characteristic shape.
The last function in the tool is a reminder from the previous article. The chain rule handles \((x^2)^3\) correctly and returns \(3(x^2)^2 \cdot 2x = 6x^5\), but the expression is \(x^6\), and the power rule gives \(6x^5\) in one step. A rule being applicable is not the same as it being the right one.
Before differentiating a composite, say out loud what the outermost operation is — the last thing you would do if you were evaluating the function at a number. For \(\sin(x^2)\) you would square first and take the sine last, so the sine is outermost. That test costs a few seconds and settles the layer order before any writing starts, which is where the order needs to be settled.