Chain Rule: Derivatives of Compositions and Nested Functions

Capítulo 7

Estimated reading time: 5 minutes

+ Exercise

Why the Chain Rule Exists: “Functions Inside Functions”

A composition happens when the output of one function becomes the input of another. If y = f(g(x)), then g acts first (the “inside”), and f acts second (the “outside”). The chain rule is the differentiation rule that matches this nesting.

Chain Rule (core idea): if y = f(g(x)), then

y' = f'(g(x)) · g'(x)

Read it as: “Differentiate the outside (keeping the inside as-is), then multiply by the derivative of the inside.”

Intuition Through Two Composition Stories

1) Temperature conversion inside another formula

Continue in our app.
  • Listen to the audio with the screen off.
  • Earn a certificate upon completion.
  • Over 5000 courses for you to explore!
Or continue reading below...
Download App

Download the app

Suppose a model uses Fahrenheit temperature F, but you measure Celsius C. The conversion is F(C) = (9/5)C + 32. If a cost/energy model depends on Fahrenheit via E(F) = F^2, then the combined model is E(C) = (F(C))^2 = ((9/5)C + 32)^2. A small change in C changes F, which then changes E. The chain rule captures this two-step sensitivity: dE/dC = (dE/dF)(dF/dC).

2) Area as a function of radius as a function of time

Area of a circle depends on radius: A(r) = πr^2. If radius changes over time, r = r(t), then area becomes A(t) = π(r(t))^2. The rate area changes in time is

dA/dt = (dA/dr)(dr/dt) = 2πr(t) · r'(t)

This is a practical way to compute “rate of a rate”: how fast area changes depends on how fast radius changes.

Two Reliable Workflows

Approach 1: Identify Outer and Inner Functions

Use this checklist:

  • Find the outer operation (power, square root, reciprocal, trig, exponential, etc.).
  • Everything inside that operation is the inner function.
  • Differentiate the outer function as if the inside were a single variable.
  • Multiply by the derivative of the inside.

Template: if y = [g(x)]^n, then y' = n[g(x)]^{n-1} · g'(x).

Approach 2: u-Substitution Notation (Organize the Steps)

This is not integration substitution; it is just a bookkeeping method for derivatives.

  • Set u = g(x) (the inside).
  • Rewrite y = f(u) (the outside).
  • Compute dy/du and du/dx.
  • Multiply: dy/dx = (dy/du)(du/dx).

This approach is especially helpful for multi-layer nesting.

Worked Examples (Step-by-Step)

1) Powers of Linear Expressions: (ax+b)n

Example: Differentiate y = (3x - 5)^4.

Outer/inner method:

  • Outer: ( )^4
  • Inner: 3x - 5

Differentiate outer: 4(3x - 5)^3, then multiply by inner derivative 3:

y' = 4(3x - 5)^3 · 3 = 12(3x - 5)^3

u-notation method:

  • u = 3x - 5 so du/dx = 3
  • y = u^4 so dy/du = 4u^3
  • dy/dx = (4u^3)(3) = 12u^3 = 12(3x - 5)^3

2) Square Roots: sqrt(g(x))

Example: Differentiate y = √(x^2 + 1).

Rewrite as a power: y = (x^2 + 1)^{1/2}.

  • Outer: ( )^{1/2}
  • Inner: x^2 + 1

Differentiate outer: (1/2)(x^2 + 1)^{-1/2}, multiply by inner derivative 2x:

y' = (1/2)(x^2 + 1)^{-1/2} · 2x = x(x^2 + 1)^{-1/2}

Optional simplification back to radicals:

y' = x / √(x^2 + 1)

3) Rational Expressions with Embedded Polynomials

Example: Differentiate y = 1 / (x^2 - 3x + 2)^5.

Rewrite using a negative exponent:

y = (x^2 - 3x + 2)^{-5}

  • Outer: ( )^{-5}
  • Inner: x^2 - 3x + 2

Differentiate outer: -5(x^2 - 3x + 2)^{-6}, multiply by inner derivative 2x - 3:

y' = -5(x^2 - 3x + 2)^{-6}(2x - 3)

Optional rewrite without negative exponents:

y' = -5(2x - 3) / (x^2 - 3x + 2)^6

4) A Nested Composition (Two Layers)

Example: Differentiate y = (2x + 1)^3 inside a square root: y = √((2x + 1)^3).

Rewrite: y = ((2x + 1)^3)^{1/2} = (2x + 1)^{3/2}.

Now it is a single chain rule step:

y' = (3/2)(2x + 1)^{1/2} · 2 = 3(2x + 1)^{1/2}

This illustrates a useful strategy: algebraic simplification can reduce the number of chain-rule layers.

5) Multi-Layer u-Notation (Very Organized)

Example: Differentiate y = (5 - (x^2 + 1)^3)^4.

There are multiple nestings. Use staged substitutions:

  • Let u = 5 - v
  • Let v = (x^2 + 1)^3
  • Let w = x^2 + 1

Rewrite: y = u^4, u = 5 - v, v = w^3, w = x^2 + 1.

Compute each derivative:

  • dy/du = 4u^3
  • du/dv = -1
  • dv/dw = 3w^2
  • dw/dx = 2x

Multiply them in a chain:

dy/dx = (dy/du)(du/dv)(dv/dw)(dw/dx) = 4u^3 · (-1) · 3w^2 · 2x

Substitute back:

y' = -24x(5 - (x^2 + 1)^3)^3 (x^2 + 1)^2

Common Pitfalls (and How to Avoid Them)

Pitfall 1: Forgetting to Multiply by the Derivative of the Inside

Wrong pattern: d/dx[(3x-5)^4] = 4(3x-5)^3 (missing the ·3)

Fix: always ask: “What is the inside function, and what is its derivative?” If the inside is not just x, you need an extra factor.

Pitfall 2: Misidentifying the Inner Function

Example: y = (x^2 + 1)^5. The inner function is x^2 + 1, not just x^2. Treat the entire expression inside the parentheses as a single unit.

A quick check: put brackets around the inside: y = [x^2 + 1]^5. Everything in brackets is the inner function.

Pitfall 3: Overcomplicating by Using Product Rule Unnecessarily

Example: y = (x^2 + 1)^{-1} is often mistakenly treated as a quotient and expanded into extra steps. It is already a simple chain rule form: outer is ( )^{-1}, inner is x^2 + 1.

Similarly, y = √(x^2+1) is usually easiest as (x^2+1)^{1/2} with chain rule, not by rewriting as a fraction or introducing extra rules.

Practice Sets (Escalating Difficulty)

Set A: Single-Layer Compositions

  • 1. d/dx (x + 7)^6
  • 2. d/dx (4x - 1)^{1/2}
  • 3. d/dx (2 - 3x)^9
  • 4. d/dx (x^3 + 5)^4
  • 5. d/dx (1 + x^2)^{-3}

Set B: Square Roots and Rational Forms

  • 1. d/dx √(3x^2 - x + 4)
  • 2. d/dx 1/√(x^2 + 9)
  • 3. d/dx (x^2 - 4x + 1)^{-2}
  • 4. d/dx √(1/(x^2 + 1))
  • 5. d/dx 1/(2x^3 - x + 5)^4

Set C: Multi-Layer Nesting (Use u-Notation if Helpful)

  • 1. d/dx (1 + (2x - 3)^5)^4
  • 2. d/dx √(5 - (x^2 + 1)^3)
  • 3. d/dx (3x + 2)^{-2} inside another power: ( (3x+2)^{-2} + 1 )^6
  • 4. d/dx (2 - √(x^2 + 4x + 5))^7
  • 5. d/dx 1/(1 + (x^2 - 1)^3)^2

Set D: Applied Composition (Rates)

  • 1. A circle’s radius is r(t) = 3t^2 + 1. Find dA/dt for A = πr^2.
  • 2. Fahrenheit is F(C) = (9/5)C + 32. If E(F) = √(F + 10), find dE/dC.
  • 3. A quantity follows Q(t) = (1 + t^2)^5. Find Q'(t) and evaluate at t = 0.

Now answer the exercise about the content:

When differentiating a composition y = f(g(x)), which expression correctly applies the chain rule?

You are right! Congratulations, now go to the next page

You missed! Try again.

For y = f(g(x)), differentiate the outside function while keeping the inside intact, then multiply by the derivative of the inside: y' = f'(g(x))·g'(x).

Next chapter

Putting Rules Together: Multi-Step Differentiation and Simplification

Arrow Right Icon
Free Ebook cover Derivatives from Scratch: Rules, Meaning, and Real-World Rates
64%

Derivatives from Scratch: Rules, Meaning, and Real-World Rates

New course

11 pages

Download the app to earn free Certification and listen to the courses in the background, even with the screen off.