Chain Rule: Formula, Visual Meaning & Worked Examples
A composite function is one function wrapped inside another. Before using calculus notation, watch one tiny change pass through an inner wrapper and then an outer wrapper. The outer stage acts on what the inner stage already changed.
Move the idea
Try it: change the OUTER wrapper rate
Change one parameter and watch what changes with it.
The outer wrapper acts on the already-scaled result. ×2 inside, then ×3 outside gives ×6 overall. That multiplication is the chain rule.
Map the wrappers to functions
For y=(2x+1)², the inner wrapper is g(x)=2x+1. The outer wrapper is f(u)=u². Writing u=g(x) only gives a name to the value passed from the inner layer to the outer one.
Now read the real local rates
The inner local rate is du/dx=2. The outer local rate is dy/du=2u, so unlike the simple playground it changes with position. The mechanism is still the same: one local scale feeds the next.
Multiply because the stages are nested
A tiny Δx first becomes about g′(x)Δx. The outer function then scales that already-changed amount by f′(g(x)). Therefore dy/dx=f′(g(x))g′(x).
Two tiny checks before the formula drill.
Inner wrapper ×2, outer wrapper ×4. What is the total local stretch?
In y=(2x+1)², which part is the inner function?
Make the idea reusable.
Leibniz notation exposes the logic
Writing dy/dx=(dy/du)(du/dx) makes the intermediate variable visible. The du symbols are not literally fractions being cancelled, but the notation mirrors the correct composition of local rates.
The outer derivative keeps the inside
Differentiate the outer function with respect to its input, then evaluate that derivative at the unchanged inner expression. Only after that do you multiply by the inner derivative.
When the inner derivative is 1
If g(x)=x+c, then g′(x)=1, so the chain-rule factor is invisible. That is why some simple examples can make the rule look unnecessary even though it is still operating.
What is the chain rule?
The chain rule differentiates a composite function. If y=f(g(x)), then dy/dx=f′(g(x))·g′(x). In words: differentiate the outside function while keeping the inside expression, then multiply by the derivative of the inside function.
How to use the chain rule
- 01Identify the composition
Find the inner expression g(x) and the outer operation f(u). A useful temporary variable is u=g(x).
- 02Differentiate the outside
Compute f′(u), then replace u with the original inside expression g(x). Do not simplify away the inner structure too early.
- 03Differentiate the inside
Compute g′(x). This is the second local stretch factor.
- 04Multiply and simplify
Multiply f′(g(x)) by g′(x), then simplify the final expression if useful.
Chain rule worked examples
Square of a linear function
y′=6(3x−2) Outer derivative: 2(3x−2). Inner derivative: 3. Multiply them.
Sine of a quadratic
y′=2x cos(x²) Outer derivative: cos(x²). Inner derivative: 2x.
Exponential with an inner function
y′=5e^(5x+1) The derivative of e^u is e^u, then multiply by u′=5.
Chain rule vs product rule vs power rule
| Type | What it describes | Typical example |
|---|---|---|
| Chain rule | A function is inside another function. | sin(x²), (3x−2)^5, e^(4x) |
| Product rule | Two functions are multiplied. | x² sin(x) |
| Power rule | A plain power of x is differentiated directly. | x^7 |
Chain rule FAQ
Why do you multiply by the inner derivative?
Because a small change in x is first rescaled by the inner function before the outer function sees it. Two successive local scale factors multiply.
Do I always need to write u-substitution?
No. Using u is a learning aid that exposes the two stages. Once the structure is clear, you can apply f′(g(x))g′(x) directly.
Can the chain rule be used more than once?
Yes. Nested compositions can require repeated chain-rule layers. Differentiate from the outside inward, multiplying by each inner derivative.
How is the chain rule related to substitution in integrals?
Both track how one variable changes through another, but they solve different operations. The derivative chain rule composes local rates; substitution reorganizes an integral using a change of variable.