Intuition What this page is for
The parent note gave you the machinery. Here we stress-test it. We list every kind of situation the chain rule can be dropped into — clean cases, sign traps, zeros, degenerate inputs, limits, a real-world word problem, an exam twist — then we work an example for each cell so that when an exam hands you something weird, you have already seen its shape.
Before anything, one promise: we never write a symbol without saying what it means.
z = f ( x , y ) means a machine f that eats two numbers x , y and spits out one number z .
∂ x ∂ z (read "partial dee z by dee x") is the rate z changes when you nudge only x and freeze y . See Partial Derivatives .
d t d z (round-free d ) is the rate when z ultimately depends on the single variable t .
We introduce more symbols (J for the Jacobian matrix, ∑ for summation) later, at the exact moment we first use them .
Every problem this topic throws lives in one of these cells:
#
Cell (what makes it tricky)
Which example
A
Case 1: one independent variable, clean
Ex 1
B
Case 2: two independent variables (polar)
Ex 2
C
Sign / quadrant trap (a component goes negative)
Ex 3
D
Zero input : a link derivative is 0 at a point
Ex 4
E
Degenerate : two inputs collapse to the same variable
Ex 5
F
Explicit reappearance : t appears directly and through x , y
Ex 6
G
Limiting behaviour : rate as t → a special value
Ex 7
H
Real-world word problem (units matter)
Ex 8
I
Exam twist: Jacobian / matrix form
Ex 9
We hit every cell below.
Before we compute, look at the dependency tree for this problem. It shows the two roads from the deep variable t up to the output z : one road passes through x , the other through y . That is the picture behind "two paths".
Worked example Ex 1 (Cell A)
z = x 2 y , x = cos t , y = sin t . Find d t d z and evaluate at t = 2 π .
Forecast: at t = π /2 we sit at the top of the unit circle, x = 0 , y = 1 . Guess: since x = 0 there, does d t d z vanish? Hold that thought.
∂ x ∂ z = 2 x y , ∂ y ∂ z = x 2 . Why this step? Freeze one variable, differentiate the other — that is what ∂ means.
d t d x = − sin t , d t d y = cos t . Why? Ordinary single-variable derivatives — see Single-variable Chain Rule .
d t d z = 2 x y ( − sin t ) + x 2 cos t . Why? The tree above has exactly two paths (t → x → z and t → y → z ): multiply the link-derivatives along each path, then add the two paths.
Substitute x = cos t , y = sin t into step 3: 2 ( cos t ) ( sin t ) ( − sin t ) + ( cos t ) 2 cos t = − 2 cos t sin 2 t + cos 3 t .
At t = π /2 : cos t = 0 , so both terms are 0 . d t d z = 0 .
Verify: direct substitution z = cos 2 t sin t . Differentiate directly: d t d z = 2 cos t ( − sin t ) sin t + cos 2 t cos t = − 2 cos t sin 2 t + cos 3 t . ✓ Matches step 4. The forecast was right — the x = 0 factor kills both paths.
The next figure does two jobs at once. On the left is the polar dependency tree: the output z reaches each ultimate variable r and θ through both doors x and y — that is why every polar chain-rule sum has two terms. On the right is the geometric picture: the point ( x , y ) on a ray at angle θ , and the red radial arrow showing the direction you move when you increase r . Increasing r slides the point straight out along that arrow, which is exactly why ∂ z / ∂ r turns out to be the Directional Derivative of f in the radial direction.
Worked example Ex 2 (Cell B)
z = f ( x , y ) with x = r cos θ , y = r sin θ . Take the concrete f = x 2 + y 2 and find ∂ r ∂ z and ∂ θ ∂ z .
Forecast: z = x 2 + y 2 is exactly r 2 , so guess ∂ z / ∂ r = 2 r and ∂ z / ∂ θ = 0 (angle doesn't change distance-squared).
∂ x ∂ z = 2 x = 2 r cos θ , ∂ y ∂ z = 2 y = 2 r sin θ . Why? Partials of f , then rewrite in polar using x = r cos θ , y = r sin θ .
∂ r ∂ x = cos θ , ∂ r ∂ y = sin θ . Why? Hold θ fixed, differentiate in r .
∂ r ∂ z = ( 2 r cos θ ) ( cos θ ) + ( 2 r sin θ ) ( sin θ ) = 2 r cos 2 θ + 2 r sin 2 θ = 2 r ( cos 2 θ + sin 2 θ ) = 2 r . Why? Sum the two paths from the left tree; then use cos 2 θ + sin 2 θ = 1 .
∂ θ ∂ x = − r sin θ , ∂ θ ∂ y = r cos θ ; so ∂ θ ∂ z = ( 2 r cos θ ) ( − r sin θ ) + ( 2 r sin θ ) ( r cos θ ) = − 2 r 2 cos θ sin θ + 2 r 2 sin θ cos θ = 0 .
Verify: direct z = r 2 ⇒ ∂ z / ∂ r = 2 r , ∂ z / ∂ θ = 0 . ✓ Both match the forecast. Step 3 is the directional derivative of f along the red radial arrow in the figure.
The figure below plants the point at t = 3 π /4 on the unit circle: it lives in quadrant II , where the horizontal coordinate x = cos t is negative (red, pointing left) but the vertical coordinate y = sin t is positive (mint, pointing up). Keeping these signs straight is the whole game.
Worked example Ex 3 (Cell C)
z = x y , x = cos t , y = sin t . Find d t d z at t = 4 3 π (second quadrant, where x < 0 , y > 0 ).
Forecast: in quadrant II, x = cos ( 3 π /4 ) < 0 but y > 0 . A student who forgets signs may keep everything positive. Watch the signs carefully.
∂ x ∂ z = y , ∂ y ∂ z = x . Why? ∂ ( x y ) / ∂ x = y , freezing y ; and ∂ ( x y ) / ∂ y = x .
d t d x = − sin t , d t d y = cos t . Why? These are the ordinary single-variable derivatives of cos t and sin t ; the minus sign on d t d x is exactly the trap this cell is about — differentiating cosine flips the sign, so the negative must be carried into the sum.
d t d z = y ( − sin t ) + x ( cos t ) . Now substitute x = cos t and y = sin t : = ( sin t ) ( − sin t ) + ( cos t ) ( cos t ) = − sin 2 t + cos 2 t = cos 2 t . Why the last equality? The identity cos 2 t − sin 2 t = cos 2 t .
At t = 3 π /4 : 2 t = 3 π /2 , so cos ( 3 π /2 ) = 0 . Thus d t d z = 0 .
Verify: z = cos t sin t = 2 1 sin 2 t , so d t d z = cos 2 t . ✓ The trap: at t = 3 π /4 the term x cos t = cos 2 ( 3 π /4 ) = + 2 1 (positive because it's cos 2 ) while − sin 2 t = − 2 1 ; they cancel to 0 . If you'd dropped the negative sign on sin 2 , you'd wrongly get + 1 .
Worked example Ex 4 (Cell D)
z = x 2 + y 3 , x = t 2 , y = t . Find d t d z at t = 0 .
Forecast: at t = 0 , d t d x = 2 t = 0 . So the x -path derivative is switched off. Guess: only the y -path survives.
∂ x ∂ z = 2 x , ∂ y ∂ z = 3 y 2 . Why? Partial in x freezes y , so y 3 is a constant and drops, leaving 2 x ; partial in y freezes x , so x 2 drops and y 3 becomes 3 y 2 by the power rule.
d t d x = 2 t , d t d y = 1 . Why? These are ordinary single-variable derivatives: d t d t 2 = 2 t and d t d t = 1 by the power rule.
d t d z = 2 x ⋅ 2 t + 3 y 2 ⋅ 1 . Substitute x = t 2 , y = t : = 2 t 2 ⋅ 2 t + 3 t 2 = 4 t 3 + 3 t 2 . Why? Sum the two paths, then plug the parametrisation in.
At t = 0 : 4 ( 0 ) + 3 ( 0 ) = 0 . Both paths give 0 here because x = 0 and y = 0 too.
Verify: direct z = ( t 2 ) 2 + t 3 = t 4 + t 3 , so d t d z = 4 t 3 + 3 t 2 . ✓ At t = 0 this is 0 . The lesson: when a link derivative is 0 you don't drop the whole rule — you keep both terms, and that term simply contributes nothing.
Worked example Ex 5 (Cell E)
z = f ( x , y ) = x 2 + 3 x y + y 2 but with x = t and y = t (both inputs are the same variable). Find d t d z .
Forecast: the two doors now open onto the same street. You still write two paths — one via x , one via y — then add. Don't be tempted to "count t once".
∂ x ∂ z = 2 x + 3 y , ∂ y ∂ z = 3 x + 2 y . Why? Partial in x treats y constant, and vice versa — even though later both equal t , the partials are taken independently.
d t d x = 1 , d t d y = 1 . Why? Each of x = t and y = t is the identity map in t , and d t d t = 1 ; both links change at unit rate, which is precisely why both paths survive with equal weight.
d t d z = ( 2 x + 3 y ) ( 1 ) + ( 3 x + 2 y ) ( 1 ) = ( 2 x + 3 y ) + ( 3 x + 2 y ) = 5 x + 5 y . Why? Sum both paths, then collect like terms.
Substitute x = y = t : d t d z = 5 t + 5 t = 10 t .
Verify: direct z = t 2 + 3 t ⋅ t + t 2 = 5 t 2 , so d t d z = 10 t . ✓ Had you "counted t once" and used only ∂ z / ∂ x = 2 t + 3 t = 5 t , you'd get 5 t — half the truth. The collapse of inputs does not collapse the number of paths.
Worked example Ex 6 (Cell F)
w = f ( x , y , t ) = x y + t 2 , with x = t , y = t 2 . Find d t d w .
Forecast: t appears three ways: through x , through y , and sitting right there as t 2 . Three paths, three products. Miss the explicit one and you'll be off.
To avoid confusion, we keep one output symbol: the machine is f , and w = f is its output value. All partials below are partials of f ; the total derivative on the left is written d t d w since w is that same output.
∂ x ∂ f = y , ∂ y ∂ f = x , ∂ t ∂ f = 2 t . Why? Each partial freezes the other two slots; the last one, freezing x , y , captures the explicit t in t 2 .
d t d x = 1 , d t d y = 2 t . Why? These are ordinary single-variable derivatives of the parametrisation: d t d t = 1 and d t d t 2 = 2 t by the power rule — they measure how fast each intermediate variable moves as t moves.
d t d w = ∂ x ∂ f d t d x + ∂ y ∂ f d t d y + ∂ t ∂ f . Why? The tree has a direct branch to t plus two indirect branches — see Implicit Differentiation (multivariable) .
= y ( 1 ) + x ( 2 t ) + 2 t . Substitute x = t , y = t 2 : = t 2 + t ⋅ 2 t + 2 t = t 2 + 2 t 2 + 2 t = 3 t 2 + 2 t .
Verify: direct w = t ⋅ t 2 + t 2 = t 3 + t 2 , so d t d w = 3 t 2 + 2 t . ✓ Drop the + 2 t explicit term and you'd wrongly get 3 t 2 .
Worked example Ex 7 (Cell G)
z = e x y , x = t , y = t 1 (for t > 0 ). Find d t d z and its limit as t → ∞ .
Forecast: here x y = t ⋅ t 1 = 1 always, so z = e 1 = e is constant . A constant has zero rate. Guess d t d z = 0 everywhere, so the limit is 0 .
To differentiate z = e x y we treat the exponent as a single lump: let u = x y , so z = e u . The single-variable fact d u d e u = e u (the exponential is its own derivative) then gives, by the ordinary chain rule, ∂ x ∂ z = e u ∂ x ∂ u = e x y ⋅ y and ∂ y ∂ z = e u ∂ y ∂ u = e x y ⋅ x . Why e here? Because the variable sits in the exponent , and e u is the one function whose derivative is itself — that is the tool that answers "how does e something change?"
d t d x = 1 , d t d y = − t 2 1 . Why the minus? t 1 = t − 1 has derivative − t − 2 .
d t d z = y e x y ( 1 ) + x e x y ( − t 2 1 ) . Why this step? Two paths reach t (via x and via y ), so we multiply each path's links and add — this is the chain rule sum of Cell A. Now substitute x = t , y = 1/ t , x y = 1 (the constraint that makes the exponent constant): = t 1 e − t ⋅ e ⋅ t 2 1 = t e − t e = 0 .
Limit as t → ∞ : it's identically 0 , so the limit is 0 .
Verify: direct z = e t ⋅ ( 1/ t ) = e 1 = e , constant, derivative 0 . ✓ The two paths exactly cancel — a beautiful check that the chain rule respects hidden constraints.
Worked example Ex 8 (Cell H)
A metal plate's temperature is T ( x , y ) = x 2 + 2 y degrees Celsius, where x , y are in metres. A bug walks along x = 1 + t , y = 2 − t (t in seconds). How fast does the bug feel the temperature changing at t = 0 ?
Forecast: moving in + x warms it (since T grows with x 2 ), moving in − y cools it (since T grows with y ). The net could be either sign — compute.
∂ x ∂ T = 2 x ( °C/m ) , ∂ y ∂ T = 2 ( °C/m ) . Why? Partial in x freezes y : 2 y is constant and drops, leaving 2 x ; partial in y freezes x : x 2 drops and 2 y becomes 2 . The units are °C per metre because T is in °C and x , y in metres.
d t d x = 1 ( m/s ) , d t d y = − 1 ( m/s ) . Why? These are ordinary derivatives of the bug's path: d t d ( 1 + t ) = 1 and d t d ( 2 − t ) = − 1 ; the minus says the bug moves in the − y direction, and the units are metres per second.
d t d T = 2 x ( 1 ) + 2 ( − 1 ) = 2 x − 2 ( °C/s ) . Why? Sum the two paths; note the units m °C ⋅ s m = s °C line up.
At t = 0 : x = 1 + 0 = 1 , so d t d T = 2 ( 1 ) − 2 = 0 °C/s.
Verify: direct T = ( 1 + t ) 2 + 2 ( 2 − t ) = 1 + 2 t + t 2 + 4 − 2 t = t 2 + 5 , so d t d T = 2 t ; at t = 0 that's 0 °C/s. ✓ Warming and cooling exactly balance at the start.
First, two pieces of notation, each defined before use.
The summation symbol ∑ . The sign k = 1 ∑ n a k is shorthand for "add up the terms a k as the counter k runs from 1 to n ": it just means a 1 + a 2 + ⋯ + a n . We use it because the chain-rule "add over all paths" is exactly such a running sum, one term per intermediate variable k .
The Jacobian matrix J . A Jacobian matrix is a table that collects all the first partials of a vector-valued map into a grid: row i is "the i -th output", column k is "with respect to the k -th input". We write it J . For a map ( x , y ) ↦ ( u , v ) ,
J ( u , v ) = ∂ x ∂ u ∂ x ∂ v ∂ y ∂ u ∂ y ∂ v .
The deep fact (proved in the parent note ): composing two maps chains their Jacobians by matrix multiplication , J outer ∘ inner = J outer J inner . And matrix multiplication is exactly "sum over paths": entry ( i , j ) of the product is k ∑ ( J outer ) ik ( J inner ) k j — the sum, over every intermediate variable k , of "outer rate through k " times "inner rate to k ". That sum-over-k is the tree's paths added up. The figure shows this: the inner map pushes an input change into the intermediate slots, and the outer map's rows gather those pushes.
Worked example Ex 9 (Cell I)
u = x + y , v = x − y , with x = r cos θ , y = r sin θ . Find the Jacobian ∂ ( r , θ ) ∂ ( u , v ) using the matrix product J ( u , v ) J ( x , y ) .
Forecast: the general chain rule is J u ∘ x = J u J x — matrix multiply. See Gradient and Jacobian . Guess the outer Jacobian is a constant matrix.
Inner map partials: ∂ r ∂ x = cos θ , ∂ θ ∂ x = − r sin θ , ∂ r ∂ y = sin θ , ∂ θ ∂ y = r cos θ . Why? Each is an ordinary partial of x = r cos θ or y = r sin θ , freezing the other variable. So
J ( x , y ) = ( cos θ sin θ − r sin θ r cos θ ) .
Outer map: u = x + y , v = x − y gives J ( u , v ) = ( 1 1 1 − 1 ) . Why constant? u , v are linear in x , y , so their partials are numbers (∂ u / ∂ x = 1 , ∂ u / ∂ y = 1 , ∂ v / ∂ x = 1 , ∂ v / ∂ y = − 1 ).
Multiply — each entry is a sum over the intermediate variable, i.e. a path sum ∑ k :
J = ( 1 1 1 − 1 ) ( cos θ sin θ − r sin θ r cos θ ) = ( cos θ + sin θ cos θ − sin θ − r sin θ + r cos θ − r sin θ − r cos θ ) .
Why this step? Row i of the outer matrix times column j of the inner matrix adds "outer rate through x " and "outer rate through y " — exactly the two paths to output i from input j .
Verify: substitute directly. u = r cos θ + r sin θ , so ∂ u / ∂ r = cos θ + sin θ ✓ and ∂ u / ∂ θ = − r sin θ + r cos θ ✓. v = r cos θ − r sin θ , so ∂ v / ∂ r = cos θ − sin θ ✓ and ∂ v / ∂ θ = − r sin θ − r cos θ ✓. The matrix product is the chain rule.
Recall Which cell was hardest, and why?
Cell E (degenerate) and Cell F (explicit reappearance) trip most people.
The number of paths in the tree never shrinks just because two inputs equal the same variable ::: true — sum all paths regardless
In w = f ( x , y , t ) with x , y depending on t , how many terms? ::: three — two indirect plus one explicit ∂ f / ∂ t
"Compute two ways." Whenever possible, also substitute and differentiate directly. If the chain-rule answer and the direct answer disagree, a path was dropped or a sign flipped.