Chain Rule

The chain rule is one of the most powerful and frequently used techniques in differential calculus. It tells us how to differentiate a composite function — that is, a function built by plugging one function inside another. For example, sin(x²) is the composition of sin(u) with u = x², and the chain rule gives us a systematic way to find its derivative without expanding or approximating anything. At its core, the chain rule captures a simple intuition: if a small change in x causes a change in an intermediate quantity u, and that change in u causes a change in the final output y, then the overall rate of change of y with respect to x is the product of those two individual rates. This multiplicative structure makes the chain rule both elegant and computationally powerful, applicable in physics, engineering, economics, and virtually every field that uses calculus. Mastering the chain rule requires recognising composite structure in functions — identifying the 'outer' and 'inner' functions — and then applying the rule carefully. It extends naturally to chains of three or more functions and combines with the product and quotient rules to handle complex expressions. Every student of calculus will use the chain rule hundreds of times, so developing fluency with it is essential.

Key takeaways
  • Identify the Composite Structure
  • State the Chain Rule Formula
  • Differentiate the Outer Function
  • Differentiate the Inner Function
  • Multiply the Results
  • Extended Chain Rule for Multiple Compositions

Identify the Composite Structure

A composite function has the form y = f(g(x)). You must identify the outer function f and the inner function g. For example, in y = (3x + 1)⁵, the outer function is f(u) = u⁵ and the inner function is g(x) = 3x + 1. Always ask: 'What is the last operation performed?' That operation defines the outer function.

State the Chain Rule Formula

If y = f(g(x)), then the derivative is dy/dx = f′(g(x)) · g′(x). In Leibniz notation, if y = f(u) and u = g(x), then dy/dx = (dy/du) · (du/dx). These two forms are equivalent and both are useful in different contexts. The Leibniz form is especially intuitive because the 'du' terms appear to cancel, though this is not rigorous justification — it is a helpful mnemonic.

Differentiate the Outer Function

Differentiate f with respect to its argument u, treating u as the variable, then substitute back g(x) for u. For y = (3x+1)⁵, we have f(u) = u⁵, so f′(u) = 5u⁴. Substituting back: f′(g(x)) = 5(3x+1)⁴. Do not yet simplify — keep the inner function intact at this stage.

Differentiate the Inner Function

Compute g′(x), the derivative of the inner function with respect to x. For g(x) = 3x + 1, we have g′(x) = 3. This step is straightforward for simple inner functions but requires care when the inner function is itself composite — in that case, the chain rule must be applied again (extended chain rule).

Multiply the Results

The final derivative is the product of the two parts: dy/dx = f′(g(x)) · g′(x) = 5(3x+1)⁴ · 3 = 15(3x+1)⁴. Always multiply, never add. A common error is forgetting to multiply by g′(x) — this is sometimes called the 'missing chain' mistake. Double-check by asking whether you have accounted for the rate of change of the inner function.

Extended Chain Rule for Multiple Compositions

For a triple composition y = f(g(h(x))), the derivative is dy/dx = f′(g(h(x))) · g′(h(x)) · h′(x). Each link in the chain contributes a factor. For example, if y = sin((2x+1)³), set h(x) = 2x+1, g(u) = u³, f(v) = sin(v). Then dy/dx = cos((2x+1)³) · 3(2x+1)² · 2 = 6(2x+1)²cos((2x+1)³).

The Key Equation

dydx=f′(g(x))⋅g′(x)\frac{dy}{dx} = f'(g(x)) \cdot g'(x)
  • y — Composite function (varies): The dependent variable defined as y = f(g(x))
  • f'(g(x)) — Derivative of the outer function (varies): The derivative of f with respect to its argument u = g(x), evaluated at the inner function
  • g'(x) — Derivative of the inner function (varies): The derivative of the inner function g with respect to x
  • \frac{dy}{dx} — Overall derivative (varies): The rate of change of the composite function y with respect to x

Worked Example

Problem. Find the derivative of y = √(sin(x²)) with respect to x.

dydx=xcos⁡(x2)sin⁡(x2)\frac{dy}{dx} = \frac{x\cos(x^2)}{\sqrt{\sin(x^2)}}

Answer. x·cos(x²) divided by the square root of sin(x²)

Figure
Diagram
Chain Rule: Composite Function LayersInputxInner functionu = g(x)Outputy = f(u)apply gapply fChain Rule Formulady/dx = f ′(g(x)) · g′(x)du/dx = g′(x)×dy/du = f ′(u)Example: y = (3x+1)⁵dy/dx = 5(3x+1)⁴ · 3 = 15(3x+1)⁴
Origins · 1 minGottfried Wilhelm Leibniz and how this was discovered
GW
Gottfried Wilhelm Leibniz
1646–1716 · German

Leibniz independently developed calculus at the same time as Isaac Newton, and it is his notation — dy/dx for derivatives and ∫ for integrals — that we use today. The Leibniz notation dy/dx = (dy/du)(du/dx) makes the chain rule almost self-evident, as the intermediate variable u appears to cancel like a fraction. His systematic symbolic approach transformed calculus into an efficient computational tool and laid the foundation for modern mathematical notation. Leibniz was also a philosopher and polymath who designed one of the first mechanical calculators, the 'Stepped Reckoner,' capable of performing multiplication and division. He envisioned a universal logical language for resolving all disputes — centuries before computer science was born.

  • Basic Differentiation Rules — The chain rule builds on the power rule, product rule, and quotient rule; you must be comfortable differentiating standard functions before composing them.
  • Composite Functions — Understanding how to form and decompose composite functions f(g(x)) is essential for identifying where and how to apply the chain rule.
  • Implicit Differentiation — Implicit differentiation relies on the chain rule applied to expressions where y is treated as a function of x, making the chain rule indispensable.
  • Product and Quotient Rules — Complex expressions often require the chain rule combined with the product or quotient rule; the three rules work together in advanced differentiation.
  • Derivatives of Trigonometric Functions — Trigonometric functions frequently appear as outer or inner functions in chain rule problems, so knowing their derivatives is necessary for fluency.