On this page
You may have learned the chain rule as "outside derivative times inside derivative" without knowing why. A row of gears explains it: turning rates multiply down the line, and the chain rule says the same about a function inside a function. Below are a gear puzzle, the link to sin(x²), and a four-step check for Class 12 or JEE.
How do gears explain the chain rule?
The university textbook Thomas' Calculus builds the chain rule from three meshed gears, as set out in Robert Gardner's course notes at East Tennessee State University. Gear A makes x turns, B makes u turns and C makes y turns. Counting teeth gives u = 3x (B turns three times per turn of A) and y = u/2 (C turns half a turn per turn of B).
In the diagram above, A has 24 teeth, B has 8 and C has 16. Meshed gears pass equal numbers of teeth at the contact, so a gear with a third as many teeth turns three times as often. (We count turns and ignore direction.)
So C turns 3 × 1/2 = 3/2 times per turn of A: dy/dx = (dy/du)(du/dx) = (1/2)(3) = 3/2.
The chain rule: if y = f(u) and u = g(x), then dy/dx = (dy/du)(du/dx), with dy/du evaluated at u = g(x) (Gardner's notes, Theorem 3.2); OpenStax Calculus Volume 1 gives the same Leibniz form. Each derivative acts as a conversion factor from a small input change to an output change, so two conversions in a row multiply (University of Texas at Austin notes).
Can you predict the overall rate before calculating?
Add a fourth gear, D, with 4 teeth, driven by C. Answer before reading on.
How many turns does D make per turn of C?
Using only the rates, predict D's turns per turn of A.
Check by comparing A's teeth with D's teeth directly.
Answers: D turns 16/4 = 4 times per turn of C. The rates give 3 × 1/2 × 4 = 6, and teeth give 24/4 = 6. In (24/8)(8/16)(16/4) the middle gears cancel, just as du seems to cancel in (dy/du)(du/dx).
What does sin(x²) have to do with gears?
The NCERT Class 12 mathematics textbook states the chain rule as Theorem 4 in Chapter 5, and its Example 21 differentiates f(x) = sin(x²) by setting t = x², so that f = sin t and df/dx = cos t · 2x = 2x cos x² (NCERT, Continuity and Differentiability).
In gear terms, the inner gear takes x to u = x² at rate du/dx = 2x, and the outer gear takes u to y = sin u at rate dy/du = cos u. Unlike metal gears, these ratios change as they turn, like a gearbox that shifts as you go. At x = 1.5:
Inner gear: u = 1.5² = 2.25, and its rate is 2 × 1.5 = 3.
Outer gear: its rate is cos(2.25), about −0.628.
Overall rate: 3 × (−0.628), about −1.885.
Check with a nudge: move x from 1.5 to 1.51. Then x² goes from 2.25 to 2.2801, and sin(x²) falls from about 0.778 to about 0.759, a change of about −0.019, close to the −1.885 × 0.01 the rule predicts. The minus sign means the output runs backwards there.
At x = 0 the inner rate 2x is 0, so the whole chain stalls: the slope of sin(x²) at 0 is 0.
How do you differentiate any nested function with the gear method?
Name the gears from the inside out: x, then u, then y (more letters for more layers).
Find each gear's own rate, treating its input as the variable.
Write each rate in terms of what feeds that gear, so cos u becomes cos(x²).
Multiply all the rates.
NCERT extends the rule to three functions as a product of three derivatives (NCERT Chapter 5). Three practice functions from its Exercise 5.2:
sin(x² + 5): rates cos u and 2x, so the derivative is 2x cos(x² + 5).
cos(sin x): rates −sin u and cos x, so the derivative is −cos x · sin(sin x).
cos(√x): rates −sin u and 1/(2√x), so the derivative is −sin(√x)/(2√x).
If a derivative as a rate feels shaky, start with derivatives from first principles. For spotting the layers, see composite functions done right. To check visually, plot sin(x²) beside 2x cos(x²) with the tips on graphing tools for learning calculus.
Where can you watch rates multiply?
The Fermi Simulation Lab has interactive simulations for ideas that are easier to see than to read. If your chain rule answers keep coming out wrong, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
For your next nested function, sketch the gears, predict the overall rate, then multiply.



