Mastering the Chain Rule
One function sits inside another function.
Differentiate outside, preserve inside, multiply by inside derivative.
Count layers; each normally contributes a derivative factor.
The Chain Rule is one of the most powerful tools in calculus, used to differentiate composite functions — functions nested within one another. It describes how rates of change propagate through a system of dependent variables, like a chain reaction.
The Core Concept: Outside-In Differentiation
A composite function \(h(x) = f(g(x))\) has an "outer function" \(f\) and an "inner function" \(g\). The Chain Rule states that the derivative is the derivative of the outer function (evaluated at the original inner function) multiplied by the derivative of the inner function.
The rule in two notations
Lagrange's notation: \((f(g(x)))' = f'(g(x)) \cdot g'(x)\)
Leibniz's notation: if \(y=f(u)\) and \(u=g(x)\), then \(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\)
Example: differentiating \(h(x) = \sin(x^2)\)
- Outer function \(f(u)=\sin(u)\): derivative is \(\cos(u)\).
- Inner function \(g(x)=x^2\): derivative is \(2x\).
- Apply the rule: \(h'(x) = \cos(x^2)\cdot(2x) = 2x\cos(x^2)\)
Advanced Compositions
The rule can be applied recursively for functions with multiple layers.
Nested functions: \(k(x) = \cos^4(7x^2+1)\)
Rewrite as \(k(x) = [\cos(7x^2+1)]^4\). This has three layers:
- Outermost (\(u^4\)): \(4[\cos(7x^2+1)]^3\)
- Middle (\(\cos(v)\)): \(-\sin(7x^2+1)\)
- Innermost (\(7x^2+1\)): \(14x\)
Combine all parts: \(k'(x) = -56x \cos^3(7x^2+1)\sin(7x^2+1)\)
Real-World Applications
- Related rates: used with time as the variable to find how the rate of change of one quantity affects another (for example, relating a balloon's volume change to its radius change).
- Machine learning: the Chain Rule is the engine behind "backpropagation," the algorithm used to train artificial neural networks by calculating the gradient of the network's error.
- Implicit differentiation: the Chain Rule is the justification for why we multiply by \(\frac{dy}{dx}\) when differentiating terms involving \(y\) — see the implicit differentiation lesson.
The Chain Rule is far more than a procedure. It is the essential instrument that allows calculus to move from analyzing static quantities to studying dynamic, interconnected systems — the causal chains that govern processes in science, engineering, and beyond.
Try it: differentiate sin(x²) and watch the chain rule fire →Check your understanding
- Differentiate (5x−2)⁷.
Show answer
35(5x−2)⁶.
- Differentiate e^(x²+1).
Show answer
2x e^(x²+1).
- Differentiate cos³(2x).
Show answer
−6cos²(2x)sin(2x).
Reference standard: Rule statements and notation follow OpenStax Calculus Volume 1, Chapter 3. DerivCalc's explanations and examples are independently written.