☰ Course contents
Mathematics 🔬 Grade 12 Chain Rule Gears: Differentiating Composite Functions
🔬 Grade 12 · Lesson 2 of 13

Chain Rule Gears: Differentiating Composite Functions

When one function is nested inside another, their rates of change multiply — just like meshed gears.

Grade 12Calculus / AP level
Chain Rule Gears: Differentiating Composite Functions — illustration
💡
The big idea: Most real functions are built by feeding one function into another: sin(x²), (3x+1)⁵, e^(2x). The chain rule says the derivative of such a composite is the derivative of the outer function (evaluated at the inner one) times the derivative of the inner function. Picture two meshed gears — if the outer turns three times as fast as the middle and the middle turns twice as fast as the input, the outer turns six times as fast as the input. Rates chain by multiplying.
🎯 By the end, you'll be able to
  • Recognize a composite function and identify its outer and inner parts
  • Apply the chain rule in both Leibniz and prime notation
  • Differentiate composites involving powers, trig, roots, and exponentials
  • Avoid the most common error: forgetting to multiply by the inner derivative
📎 You should already know
  • Basic derivative rules (power, sin, cos, exp)
  • Composition of functions

Functions inside functions

The expression (3x + 1)⁵ is not a plain power of x — it is a plain power applied to the quantity 3x + 1. That is a composite: an inner function g(x) = 3x + 1 feeds into an outer function that raises its input to the fifth power. The power rule alone cannot handle it, because the base is moving.

We need a rule that accounts for two rates of change at once: how fast the outer function responds to its input, and how fast that input is itself changing.

Gears that mesh

Think of a train of gears. Turn the input shaft and it drives a middle gear u; the middle gear drives the output gear y. If y changes 3 units for each unit of u, and u changes 2 units for each unit of x, then y changes 3 × 2 = 6 units for each unit of x. The overall rate is the product of the individual rates. That product is the chain rule.

🔑 The chain rule
If y = f(g(x)), then the derivative is the outer derivative evaluated at the inner function, times the inner derivative: f′(g(x)) · g′(x). Differentiate the outside, leave the inside untouched, then multiply by the derivative of the inside.
\[ \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} \]
Leibniz form: the rates chain by multiplying. The intermediate du behaves as if it cancels.
🎮 Chain-Rule Gears LIVE
Mesh two gears: the overall rate is the product of the individual rates.

Peeling the layers

To differentiate f(g(x)), name the layers. The outer function is whatever you would do last when evaluating; the inner is what sits in its place. For sin(x²): the last thing you do is take the sine, so sine is outer and x² is inner. Differentiate the sine (getting cosine of the same inside), then multiply by the derivative of x².

\[ \frac{d}{dx}\,f\!\left(g(x)\right) = f'\!\left(g(x)\right)\cdot g'(x) \]
Prime notation: differentiate the outer at the inner, then times the inner derivative.
📝 Worked example: Differentiate y = (3x² + 1)⁵.
  1. Outer function: fifth power. Inner function: \( g(x) = 3x^2 + 1 \).
  2. Outer derivative, inner left alone: \( 5(3x^2 + 1)^4 \).
  3. Inner derivative: \( g'(x) = 6x \).
  4. Multiply: \( 5(3x^2 + 1)^4 \cdot 6x \).
✓ The derivative is <strong>30x(3x&sup2; + 1)&#8308;</strong>.
📝 Worked example: Differentiate y = sin(x²).
  1. Outer function: sine. Inner function: \( x^2 \).
  2. Derivative of sine is cosine of the same inside: \( \cos(x^2) \).
  3. Inner derivative: \( 2x \).
  4. Multiply: \( \cos(x^2)\cdot 2x \).
✓ The derivative is <strong>2x&nbsp;cos(x&sup2;)</strong>.
⚠️ Don't forget the inner derivative
The single most common chain-rule slip is stopping after the outer derivative. Writing the derivative of sin(x²) as just cos(x²) is wrong — it forgets the × 2x factor from the inside. Every layer you peel contributes a factor. If the inside were plain x, that factor would be 1 and you would not notice; whenever the inside is anything else, it matters.
📝 Worked example: Differentiate y = √(x² + 1).
  1. Rewrite as a power: \( (x^2 + 1)^{1/2} \). Outer: the 1/2 power. Inner: \( x^2 + 1 \).
  2. Outer derivative: \( \tfrac{1}{2}(x^2 + 1)^{-1/2} \).
  3. Inner derivative: \( 2x \).
  4. Multiply and simplify: \( \tfrac{1}{2}(x^2+1)^{-1/2}\cdot 2x = \dfrac{x}{\sqrt{x^2+1}} \).
✓ The derivative is <strong>x &divide; &radic;(x&sup2; + 1)</strong>.

Check your understanding

1. What is the derivative of y = (2x + 1)³?
Outer derivative 3(2x+1)² times inner derivative 2 gives 6(2x+1)². Missing the ×2 is the classic error.
2. What is the derivative of y = cos(3x)?
Derivative of cosine is −sine of the same inside, times the inner derivative 3: −3 sin(3x).
3. In y = sin(x²), which is the OUTER function?
The last operation performed is taking the sine, so sine is the outer function and x² is the inner one.
4. What is the derivative of y = (x² + 1)¹⁰?
Outer derivative 10(x²+1)⁹ times inner derivative 2x gives 20x(x²+1)⁹.
5. What is the derivative of y = e^(x²)?
The derivative of e^u is e^u times u′. With u = x², u′ = 2x, giving 2x · e^(x²).
✅ Key takeaways
  • A composite function nests an inner function inside an outer one, like sin(x²) or (3x+1)⁵.
  • Chain rule: d/dx f(g(x)) = f′(g(x)) · g′(x) — differentiate the outside at the inside, then times the inside's derivative.
  • In Leibniz form dy/dx = dy/du · du/dx, the intermediate rate appears to cancel, which is why rates multiply.
  • Identify the outer function as the last operation you would perform when evaluating.
  • Never forget the inner derivative — that omitted factor is the number-one chain-rule mistake.
  • The rule extends to any number of nested layers: each layer contributes one multiplied factor.