4.1.16 · D2Calculus I — Limits & Derivatives

Visual walkthrough — Chain rule — proof, composite function derivatives

2,047 words9 min readBack to topic

Everything rests on one earlier idea: the derivative as a limit of a difference quotient. If that phrase means nothing yet, Step 1 rebuilds it from zero.


Step 1 — What a "rate" even is (the slope of a tiny secant)

WHAT. Pick a function — a machine that eats a number and outputs a number. Nudge the input by a tiny amount we'll call ("delta-x", read as "a small change in "). The output changes by some amount. The rate is

Term by term: is the nudged input; is how much the output moved (the rise); is how much the input moved (the run). The fraction is the slope of the secant line joining the two dots.

WHY. We need one honest number for "how fast the output responds to the input". Slope = rise/run is exactly that. As shrinks to , the secant snuggles onto the curve and its slope becomes the derivative — the instantaneous rate. That shrinking limit is written .

PICTURE. The blue curve; two dots a distance apart; the orange secant; the run and rise labelled. Watch the secant tilt toward the green tangent as the dots close in.

Figure — Chain rule — proof, composite function derivatives

Step 2 — A composite is TWO machines in a row

WHAT. Now chain two machines. The inner machine eats and outputs a middle value we name ("" is just a nickname for the inner output). The outer machine eats that and outputs the final number . The whole pipeline is

Term by term: runs first and lands at ; acts on that ; is the name for the two-step journey .

WHY. Most real functions are secretly stacked like this — , , . If we can differentiate a stack, we can differentiate almost anything. We must first name the middle station , because the whole proof is about how a wiggle travels through it.

PICTURE. Two boxes on a conveyor belt: enters the -box, exits as on the middle rail, enters the -box, exits as .

Figure — Chain rule — proof, composite function derivatives

Step 3 — Wiggle the input; watch the wiggle get relayed

WHAT. Nudge the input: . This forces the middle station to move by an amount we name the inner increment

Term by term: is how far the middle rail slid because we pushed . Then the outer machine turns that into a final move .

WHY. This is the heart of the "gear-ratio" story. One push at the input () becomes a push at the middle (), which becomes a push at the output (). We want the total ratio , and the natural move is to route it through the middle.

PICTURE. Three number-lines stacked: the -line with a small arrow ; the -line with a bigger arrow ; the -line with an even bigger arrow . Each amplification is one machine.

Figure — Chain rule — proof, composite function derivatives

Step 4 — The naïve split (route through the middle)

WHAT. Write the rate we want and multiply-and-divide by :

Term by term: the left fraction is "final move per middle move" — as it becomes . The right fraction is "middle move per input move" — as it becomes . Their product is the total stretch.

WHY. This is the gear-ratio intuition made algebraic: total speed-up (outer gear ratio) (inner gear ratio). It gives the correct answer .

PICTURE. Two gears meshed: small input gear (ratio ) drives a big output gear (ratio ); a caption reads "total product". A red warning tag hangs off the in the denominator.

Figure — Chain rule — proof, composite function derivatives

Step 5 — The hole: when the middle rail does NOT move

WHAT. The split in Step 4 divides by . But can be exactly even when . Two ways this happens:

  • Flat patch: if is constant on a stretch, every nudge gives .
  • Wiggly zero-crosser: near hits infinitely often.

Dividing by is undefined, so the "one-line proof" is not yet a proof.

WHY. A theorem must hold in every case, not just the friendly ones. We can't wave away ; we must build machinery that survives it. That's the whole reason for Step 6.

PICTURE. Left panel: a flat plateau of — two dots at different but identical height, so . Right panel: the spiky crossing zero over and over near the origin, each crossing a place where .

Figure — Chain rule — proof, composite function derivatives

Step 6 — The repair: an "error function" that multiplies instead of divides

WHAT. Because is differentiable at , define one bookkeeping function that measures how far the secant slope sits from the true tangent slope :

Term by term: is a stand-in for "the outer machine's input nudge" (later we'll plug ). The first branch is secant slope minus tangent slope — the error. The second branch patches the hole: we simply define the error to be when .

Because is precisely the limit of that secant slope, , so is continuous at (no jump). Now rearrange the first branch to a form valid for all (including , where both sides are ):

WHY. Look: now sits on top, multiplied — never on the bottom. This is the magic. The identity holds even when (it reads ). So we can safely substitute the troublesome .

PICTURE. The tangent line (green, slope ) and a secant (orange). The vertical gap between them, scaled per unit of , is exactly ; as the gap collapses to zero — is continuous at .

Figure — Chain rule — proof, composite function derivatives

WHAT. Put into the multiply-form of Step 6:

Now divide by allowed, since in the limit :

Let and track each piece:

  • differentiable continuous , so . (This is the differentiable ⇒ continuous fact.)
  • — the inner rate.

So the whole thing tends to .

WHY. We only ever divided by (never by ), so no step was illegal. The error term politely vanishes because drags to . What survives is precisely the product of the two rates.

PICTURE. A collapsing bar chart: three bars for , , ; as the middle bar shrinks to nothing and the surviving product settles at .

Figure — Chain rule — proof, composite function derivatives

Step 8 — See it on a real example:

WHAT. Inner so ; outer so . Assemble:

WHY. This makes the abstract product concrete and exposes the classic trap: it is (inside kept intact), not . The inner rate is a separate multiplied factor, never smuggled inside the cosine.

PICTURE. Top: speeding up its oscillations as grows. Bottom: the computed overlaid on a numerical slope of — they land on top of each other, confirming the formula.

Figure — Chain rule — proof, composite function derivatives

The one-picture summary

Everything on one canvas: input nudge enters the inner gear (ratio ), becomes the middle nudge , enters the outer gear (ratio ), becomes the output nudge — and the total ratio is the product. The little error term that made the proof honest is drawn fading to zero.

Figure — Chain rule — proof, composite function derivatives
Recall Feynman retelling — the whole walkthrough in plain words

A composite is two machines on a belt. Push the input a hair (Step 1's rate idea). That push reaches a middle rail and slides it by (Step 3). The middle push then reaches the output and slides it by . To get "output-per-input" you route through the middle: (output-per-middle) × (middle-per-input) (Step 4) — gear ratios multiply. But there's a trap: the middle rail can stand still () even when you pushed the input, and you can't divide by a still rail (Step 5). Fix: instead of dividing by , write the outer machine's response as where is a tiny "error" that we define to be when nothing moves (Step 6). Now is multiplied, never in a denominator, so it's safe. Divide only by , shrink it, and fades away because a differentiable can't jump — so eases to zero too (Step 7). What's left is exactly . Test it on : , keeping the inside intact (Step 8).

Connections

  • Derivative — limit definition — Step 1 is literally this; the whole proof is a limit of a difference quotient.
  • Continuity implies differentiability fails converse — Step 7 uses "differentiable ⇒ continuous " to force .
  • Product rule and Quotient rule — sibling rules often stacked with the chain rule.
  • Implicit differentiation — the chain rule applied to .
  • Related rates — the same multiplication in a time setting.
  • Inverse function derivative — chain-rule .