Tutorials › Calculus I › Deriving the Chain Rule from the Difference Quotient

Product, Quotient, and Chain Rules · Tutorial 456 of 1495

Deriving the Chain Rule from the Difference Quotient

Learn how the change in an inner function leads to the chain rule, and why the proof must also handle increments that vanish.

Intermediate 9 min read

What You'll Learn

  • State the differentiability conditions for the chain rule at a point.
  • Factor the composite difference quotient through the change in the inner function.
  • Explain why direct division by that change can fail.
  • Use a remainder argument to prove the rule, including when the inner change is zero.
  • Apply the result in worked examples and check each derivative directly.
  • Recognize the error of omitting the inner function’s derivative.

Why a Composite Function Needs a Derivative Rule

A composite function changes in two stages. A small change in the input first changes the value of an inner function; that change then changes the value of an outer function. The derivative of the composite must account for both stages.

The chain rule expresses this relationship. Here we derive it from the definition of derivative, rather than treating it as a formula to memorize. The key step is to track the change in the inner function and relate it to the original input increment.

Definition: A function \(u\) is differentiable at \(a\) if the limit \(\lim_{h\to 0}\frac{u(a+h)-u(a)}{h}\) exists as a finite real number. Its value is the derivative \(u'(a)\).

For functions \(g\) and \(f\), their composition is the function \(f\circ g\) defined by \((f\circ g)(x)=f(g(x))\), wherever \(g(x)\) is in the domain of \(f\).

The Chain Rule

Theorem: Suppose \(g\) is defined on an open interval containing \(a\), \(g\) is differentiable at \(a\), and \(f\) is defined on an open interval containing \(b=g(a)\) and differentiable at \(b\). Then \(f\circ g\) is differentiable at \(a\), and \[ (f\circ g)'(a)=f'(g(a))g'(a). \]

The derivative \(f'(g(a))\) measures the outer function’s rate of change at the value reached by the inner function. The factor \(g'(a)\) measures how quickly the inner function’s value changes as the input moves from \(a\). Both factors are needed.

Factoring Through the Inner Change

Write \(b=g(a)\). For a nonzero input increment \(h\), define the change in the inner function by \(\Delta g=g(a+h)-g(a)\). When \(\Delta g\ne 0\), the composite difference quotient can be factored as

$$ \frac{f(g(a+h))-f(g(a))}{h} = \frac{f(g(a)+\Delta g)-f(g(a))}{\Delta g} \cdot \frac{\Delta g}{h}. $$

This factorization suggests the proof. As \(h\to 0\), differentiability of \(g\) implies \(g(a+h)\to g(a)\), so \(\Delta g\to 0\). The first factor then approaches \(f'(g(a))\), and the second approaches \(g'(a)\). Their product approaches the claimed chain-rule value.

There is an important detail: \(\Delta g\) may equal zero even when \(h\ne 0\). In that case, the first factor in the displayed product divides by zero and is not defined. A proof must therefore avoid assuming that the inner change is always nonzero.

A Complete Proof That Includes Zero Inner Changes

Differentiability of \(f\) at \(b\) means that the difference between \(f(b+k)\) and its linear change \(f'(b)k\), divided by \(k\), tends to zero as \(k\to 0\). We encode this remainder in a function \(\rho\): for \(y\ne b\), set

$$ \rho(y)=\frac{f(y)-f(b)-f'(b)(y-b)}{y-b}, \qquad \rho(b)=0. $$

By the definition of \(f'(b)\), \(\rho(y)\to 0\) as \(y\to b\). For every \(y\) sufficiently close to \(b\), including \(y=b\), its definition gives

$$ f(y)-f(b)=\bigl(f'(b)+\rho(y)\bigr)(y-b). $$

For \(y=b\), both sides are zero, so this identity does not require division by \(y-b\). Now take \(y=g(a+h)\). For all sufficiently small nonzero \(h\), this value lies in the interval on which \(f\) is defined. Substitution and division by \(h\) give

$$ \frac{f(g(a+h))-f(g(a))}{h} = f'(b)\frac{g(a+h)-g(a)}{h} + \rho(g(a+h))\frac{g(a+h)-g(a)}{h}. $$

As \(h\to 0\), the first difference quotient on the right tends to \(g'(a)\). In particular, it remains bounded for all sufficiently small nonzero \(h\). Also, differentiability of \(g\) at \(a\) implies continuity there, so \(g(a+h)\to b\). Consequently \(\rho(g(a+h))\to 0\). The second term therefore tends to zero: it is the product of a quantity tending to zero and a bounded quantity. Taking limits yields

$$ (f\circ g)'(a) = f'(b)g'(a) = f'(g(a))g'(a). $$

This proves the chain rule under the stated assumptions. Because the identity used in the proof remains valid when \(g(a+h)=g(a)\), the argument also covers zero inner changes.

Worked Examples

Worked Example: A Quadratic Outer Function and a Linear Inner Function

Let \(f(t)=t^2+1\) and \(g(x)=3x-2\). Find \((f\circ g)'(1)\), then check it from the composite difference quotient.

First evaluate the inner function at the point: \(g(1)=3(1)-2=1\). The derivatives are \(f'(t)=2t\) and \(g'(x)=3\), so \(f'(g(1))=f'(1)=2\). The chain rule gives

$$ (f\circ g)'(1)=f'(g(1))g'(1)=2\cdot 3=6. $$

For a direct check, \(g(1+h)=3(1+h)-2=1+3h\), while \(f(g(1))=f(1)=2\). Thus, for \(h\ne 0\),

$$ \frac{f(g(1+h))-f(g(1))}{h} = \frac{(1+3h)^2+1-2}{h} = \frac{1+6h+9h^2+1-2}{h} = \frac{6h+9h^2}{h} = 6+9h. $$

Taking \(h\to 0\) gives \(6\), agreeing with the chain-rule result.

Worked Example: A Cubic Outer Function at a Point

Let \(f(t)=t^3\) and \(g(x)=x^2+1\). Find \((f\circ g)'(1)\) and verify the result using the difference quotient.

At \(x=1\), the inner function has value \(g(1)=1^2+1=2\). Since \(f'(t)=3t^2\) and \(g'(x)=2x\), we obtain \(f'(g(1))=3(2)^2=12\) and \(g'(1)=2(1)=2\). Therefore

$$ (f\circ g)'(1)=12\cdot 2=24. $$

To check directly, \(g(1+h)=(1+h)^2+1=2+2h+h^2\). Set \(\delta=2h+h^2\), so \(g(1+h)=2+\delta\) and \(g(1)=2\). Then

$$ \frac{f(g(1+h))-f(g(1))}{h} = \frac{(2+\delta)^3-2^3}{h} = \frac{12\delta+6\delta^2+\delta^3}{h}. $$

Here \(\delta/h=2+h\), so \(\delta\to 0\) and \(\delta/h\to 2\). Rewrite the quotient as \(12(\delta/h)+6\delta(\delta/h)+\delta^2(\delta/h)\). Its limit is \(12(2)+6(0)(2)+0^2(2)=24\), as required.

Worked Example: A Reciprocal Function at a Nonzero Value

Let \(f(t)=1/t\) for \(t\ne 0\), and \(g(x)=x+2\). Find \((f\circ g)'(0)\) and check it directly.

The inner value is \(g(0)=2\), which is nonzero, so \(f\) is defined and differentiable at that value. From the difference quotient for \(f\), for \(k\ne 0\) sufficiently close to zero,

$$ \frac{f(2+k)-f(2)}{k} = \frac{\frac{1}{2+k}-\frac12}{k} = \frac{-k}{2(2+k)k} = -\frac{1}{2(2+k)}. $$

The limit is \(-1/4\), so \(f'(2)=-1/4\). Also \(g'(0)=1\). The chain rule gives \((f\circ g)'(0)=(-1/4)(1)=-1/4\).

Directly, for nonzero \(h\) sufficiently close to zero,

$$ \frac{f(g(0+h))-f(g(0))}{h} = \frac{\frac{1}{2+h}-\frac12}{h} = -\frac{1}{2(2+h)}. $$

As \(h\to 0\), this tends to \(-1/4\), confirming the result. The restriction to \(h\) near zero also ensures \(2+h\ne 0\), so the composite is defined.

A Common Mistake: Omitting the Inner Rate of Change

For \(f(t)=t^3\) and \(g(x)=x^2+1\), one might differentiate the outer function and write \(3(x^2+1)^2\), stopping there. That accounts for how the outer function changes with its own input, but not how quickly \(x^2+1\) changes with \(x\). The missing factor is \(g'(x)=2x\). The correction is

$$ \frac{d}{dx}(x^2+1)^3 = 3(x^2+1)^2(2x) = 6x(x^2+1)^2. $$

At \(x=1\), the incomplete calculation gives \(3(2)^2=12\), while the corrected derivative gives \(6(1)(2)^2=24\). The difference is precisely the inner rate of change.

When the Rule Applies

The chain rule is a pointwise result: it applies at \(a\) when \(g\) is differentiable at \(a\), and \(f\) is differentiable at \(g(a)\). The composite must be defined near \(a\); the theorem’s open-interval assumptions ensure this. If either required derivative does not exist, this theorem alone does not establish that the composite is differentiable.

The difference-quotient derivation also explains the structure of the answer. A small input increment \(h\) produces an inner change approximately equal to \(g'(a)h\). The outer function responds at a rate approximately \(f'(g(a))\). Combining these rates gives the product \(f'(g(a))g'(a)\). The proof makes that approximation exact by taking limits, and its remainder argument avoids dividing by an inner change that might be zero.

Check Your Understanding

Use the theorem and its proof to answer these questions.

  1. State the differentiability assumptions needed to apply the chain rule at \(a\).
  2. In the factorization of the composite difference quotient, what problem occurs if \(g(a+h)=g(a)\)?
  3. Why does \(\rho(g(a+h))\) tend to zero in the proof?
  4. For \(f(t)=t^2\) and \(g(x)=2x+1\), use the chain rule to find \((f\circ g)'(0)\).
  5. What factor is missing from the incorrect expression \(3(x^2+1)^2\) for the derivative of \((x^2+1)^3\)?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon