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.
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
Widen the input to a small interval of length Δx = 0.05, from 1 to 1.05.
Δ x = 0.05
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
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
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
cd svg-generator python3 -m svgmath render chain-rule --out /tmp/chain-rule
Source: svgmath/diagrams/chain_rule.py