Chain Rule: Stretch Factors Multiply

Category: Calculus   Level: 301

d/dx sin(x2) = cos(x2) · 2x

Send a tiny interval through x → x² → sin. Each function stretches or squeezes it by its own derivative, and the two factors multiply.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Follow one input

Put x = 1 into the machine. Squaring gives u = 1, and sine gives y ≈ 0.841. So far, nothing but plugging in.

x = 1 → u = 1 → y = sin 1 ≈ 0.841

Step 1: Follow one input

Step 2: Nudge the input

Widen the input to a small interval of length Δx = 0.05, from 1 to 1.05.

Δ x = 0.05

Step 2: Nudge the input

Step 3: The inner function stretches it

Squaring maps [1, 1.05] onto [1, 1.1025], about twice as long. Near x = 1 the factor is the derivative of x², which is 2x = 2.

Δ u = 0.1025 ≈ 2 · Δ x, du/dx = 2x = 2

Step 3: The inner function stretches it

Step 4: The outer function squeezes it

Sine maps [1, 1.1025] onto an interval about half as long. Near u = 1 the factor is the derivative of sin u, which is cos 1 ≈ 0.540.

Δ y = 0.0509 ≈ 0.540 · Δ u, dy/du = cos 1

Step 4: The outer function squeezes it

Step 5: Multiply the factors

Stretch by 2, then squeeze by 0.540: the total factor is about 1.081. The measured ratio Δy/Δx ≈ 1.02 gets closer to 1.081 as Δx shrinks.

dy/dx = cos(x2) · 2x = 0.540 · 2 ≈ 1.081

Step 5: Multiply the factors

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render chain-rule --out /tmp/chain-rule

Source: svgmath/diagrams/chain_rule.py