The Chain Rule for Partial Derivatives

Both variables depend on time, so both count.

Two reasons for z to change

Let z = f(x, y), and let x and y both depend on the time t. Then z depends on t too, and as t changes, z changes for two reasons at once: x is moving and y is moving.

Over a short time Δt, x changes by about (dx/dt)Δt and y by about (dy/dt)Δt. The change in x alone raises z by about ∂z/∂x times the change in x, and the change in y alone raises z by about ∂z/∂y times the change in y. For small changes the two rises add.

One term per variable

Adding the two contributions and dividing by Δt gives the chain rule: dz/dt = ∂z/∂x · dx/dt + ∂z/∂y · dy/dt. There is one term for each variable that moves, and each term is the partial derivative of z with respect to that variable times the rate at which that variable changes.

As a tree, t branches to x and to y, and both branch to z. Multiply along each branch, then add the branches.

Take z = xy with x = t² and y = 3t. Then ∂z/∂x = y and ∂z/∂y = x, while dx/dt = 2t and dy/dt = 3. So dz/dt = y × 2t + x × 3. At t = 1, x = 1 and y = 3, so dz/dt = 3 × 2 + 1 × 3 = 9.

Substituting first agrees: z = t² × 3t = 3t³, so dz/dt = 9t², which is 9 at t = 1. The chain rule is needed when the substitution is long, or when only the rates at one moment are known.

∇fvdz/dt = fx ẋ + fy ẏ = (3.3)(−1.1) + (0.8)(1.2) = −2.68t = 0.6

dz/dt = fx ẋ + fy ẏ = −3.73 + 1.05 = −2.68: the climb is the east slope times the east speed plus the north slope times the north speed

Park the walker where the path runs along a contour

A walker on the path x = 2 cos t, y = 1.5 sin t, over the bowl z = x² + y²/2. The gold arrow is the gradient (∂z/∂x, ∂z/∂y) = (2x, y), and the chalk arrow is the velocity (dx/dt, dy/dt). At t = 0.6 the walker is at about (1.65, 0.85): the x term is 3.30 × (−1.13) = −3.73, the y term is 0.85 × 1.24 = 1.05, and dz/dt = −2.68. The walker is going downhill.

Reading the instrument

Along this path z = 4 cos² t + 1.125 sin² t, and differentiating that directly gives dz/dt = −2.875 sin 2t, which is −2.68 at t = 0.6. The chain rule gives the same rate without writing z in terms of t.

Where the path runs along a contour of the bowl, the two terms cancel and dz/dt = 0: the walker moves without climbing. That happens where sin 2t = 0, at the ends of the ellipse’s axes.

With one variable

If z depends on x alone, there is no second term, and the rule becomes dz/dt = dz/dx · dx/dt, the ordinary chain rule. The partial derivative is then an ordinary derivative, because nothing else is being held constant.

For z = x³ with x = 2t + 1, dz/dt = 3x² × 2. At t = 1, x = 3, so dz/dt = 27 × 2 = 54.

Two parameters

If x and y each depend on two variables s and t, then z does too, and each of its partial derivatives gets one term through x and one through y: ∂z/∂s = ∂z/∂x · ∂x/∂s + ∂z/∂y · ∂y/∂s, and the same with t in place of s.

Take z = x²y with x = s + t and y = s − t, at s = 2 and t = 1, where x = 3 and y = 1. There ∂z/∂x = 2xy = 6 and ∂z/∂y = x² = 9. Since ∂x/∂s = 1 and ∂y/∂s = 1, ∂z/∂s = 6 + 9 = 15. Since ∂x/∂t = 1 and ∂y/∂t = −1, ∂z/∂t = 6 − 9 = −3.

The usual mistakes

Leaving out a term. If y is changing as well as x, then ∂z/∂x · dx/dt is only part of dz/dt.

Crossing the pairs. ∂z/∂x goes with dx/dt, the rate of its own variable, never with dy/dt.

Adding the rates without the partial derivatives. Each rate is weighted by how strongly z depends on that variable at that point.

A kite

In the application below, the length of a kite’s line is L = √(x² + y²), and the kite moves downwind and upward at the same time. The rate at which the line must be let out has one term from each motion.

Worked example: A Kite Rising and Drifting: How Fast the Flier Must Let Out Line, and Where the Kite Goes When the Line Is Held

Question A kite is 40 meters downwind of the flier's hand, measured horizontally, and 30 meters above it. Treat the line as straight, so that its length is L(x, y) = √x2 + y2 meters when the kite is x meters downwind and y meters up. (a) At this moment the kite is rising at 0.6 meters per second and moving downwind at 1.2 meters per second. Find the rate at which the flier must let out line. (b) Later, with the kite in the same position, the flier holds the line at a fixed length while the kite still rises at 0.6 meters per second. Find the rate at which the kite moves horizontally, and whether it moves toward the flier or away.

  1. 1.(a) At this moment L = √402 + 302 = √1600 + 900 = 50 meters. The length depends on x and y, and both depend on the time, so the chain rule gives dLds = ∂ L∂ xdxds + ∂ L∂ ydyds.

    x = 40 my = 30 mL = 50 mhandkite(a) L2= 402+ 302, so L = 50 m
    x = 40 my = 30 mL = 50 mhandkite(a) L2= 402+ 302, so L = 50 m
    (a) The kite is 40 meters downwind and 30 meters up, so the straight line is 50 meters long.
  2. 2.Holding y constant, ∂ L∂ x = x√x2 + y2 = 4050 = 0.8; holding x constant, ∂ L∂ y = y√x2 + y2 = 3050 = 0.6.

    x = 40 my = 30 mL = 50 mhandkite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.6
    x = 40 my = 30 mL = 50 mhandkite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.6
    Holding one distance at a time: ∂ L∂ x = xL = 0.8 and ∂ L∂ y = yL = 0.6.
  3. 3.So dLds = 0.8 × 1.2 + 0.6 × 0.6 = 0.96 + 0.36 = 1.32. The flier must let out line at 1.32 meters per second.

    x = 40 my = 30 mL = 50 mhand1.20.6kite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.60.8 × 1.2 + 0.6 × 0.6 = 1.32 m/s
    x = 40 my = 30 mL = 50 mhand1.20.6kite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.60.8 × 1.2 + 0.6 × 0.6 = 1.32 m/s
    Each rate of the kite, in meters per second, is weighted by its partial derivative: the line must pay out at 0.8 × 1.2 + 0.6 × 0.6 = 1.32 meters per second.
  4. 4.(b) Now dLds = 0 and dyds = 0.6, so 0.8dxds + 0.6 × 0.6 = 0, which gives dxds = −0.360.8 = −0.45.

    x = 40 my = 30 mL = 50 mhand0.6kite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.60.8 × 1.2 + 0.6 × 0.6 = 1.32 m/s(b) 0.8 × (x rate) + 0.6 × 0.6 = 0
    x = 40 my = 30 mL = 50 mhand0.6kite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.60.8 × 1.2 + 0.6 × 0.6 = 1.32 m/s(b) 0.8 × (x rate) + 0.6 × 0.6 = 0
    (b) With the line held at 50 meters, the kite can move only along the circle of that radius about the hand.
  5. 5.The negative sign means that x is decreasing: the kite moves toward the flier at 0.45 meters per second horizontally, climbing along a circle of radius 50 meters about the flier's hand. Check: the velocity (−0.45, 0.6) is at right angles to the line, since 40 × (−0.45) + 30 × 0.6 = −18 + 18 = 0.

    x = 40 my = 30 mL = 50 mhand0.60.45kite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.60.8 × 1.2 + 0.6 × 0.6 = 1.32 m/s(b) 0.8 × (x rate) + 0.6 × 0.6 = 0x rate = −0.45 m/s: toward the flier
    x = 40 my = 30 mL = 50 mhand0.60.45kite(a) L2= 402+ 302, so L = 50 mrates in x and y: x/L = 0.8, y/L = 0.60.8 × 1.2 + 0.6 × 0.6 = 1.32 m/s(b) 0.8 × (x rate) + 0.6 × 0.6 = 0x rate = −0.45 m/s: toward the flier
    Rising at 0.6 meters per second along that circle, the kite moves toward the flier at 0.45 meters per second.

Answer: (a) 1.32 meters per second; (b) 0.45 meters per second horizontally, toward the flier

Common mistakes

  • Adding the two speeds, 1.2 + 0.6 = 1.8 meters per second. Each rate is weighted by its partial derivative: at this position, moving downwind lengthens the line by 0.8 meters for each meter moved, and rising lengthens it by only 0.6 meters.
  • Reading dxds = −0.45 as a speed away from the flier. x is the distance downwind, so a negative rate means the distance is shrinking and the kite is moving toward the flier.

More partial derivatives problems, worked step by step →

Practice The Chain Rule for Partial Derivatives in the app