Suppose the temperature at a point is $T(x, y)$ and you walk along a path $x(t)$, $y(t)$. How fast does the temperature you feel change? It changes because $x$ changes and because $y$ changes, and both effects add. This is the partial derivative version of the one-variable chain rule.
Key idea
Why it works
A tree diagram keeps track of the routes. Put $z$ at the top, the intermediate variables in the middle, and the independent variables at the bottom. Label each branch with its derivative. For $\frac{\partial z}{\partial s}$, follow every path from $z$ down to $s$, multiply the labels along it, and add.
Worked examples
Worked example: Along a path
- $\frac{\partial z}{\partial x} = 2xy$, $\frac{\partial z}{\partial y} = x^2$, $\frac{dx}{dt} = -\sin t$, $\frac{dy}{dt} = \cos t$.
- $$\frac{dz}{dt} = 2xy(-\sin t) + x^2\cos t = -2\cos t\sin^2 t + \cos^3 t.$$
- At $t = 0$: ${}0 + 1 = 1$. Check: $z(t) = \cos^2 t\sin t$, whose derivative at ${}0$ is also ${}1$.
Answer: $\frac{dz}{dt} = \cos^3 t - 2\cos t\sin^2 t$; it equals ${}1$ at $t = 0$
Worked example: Two independent variables
- Paths to $s$: $z \to x \to s$ and $z \to y \to s$.
- $\frac{\partial z}{\partial x} = 2x + y$, $\frac{\partial x}{\partial s} = 1$, $\frac{\partial z}{\partial y} = x$, $\frac{\partial y}{\partial s} = t$.
- At $(1, 2)$: $x = 3$, $y = 2$, so $\frac{\partial z}{\partial s} = (6 + 2)(1) + 3(2) = 14$.
Answer: ${}14$
Worked example: Three intermediate variables
- Three routes lead from $w$ to $t$, one through each intermediate variable.
- $\frac{dw}{dt} = \frac{\partial w}{\partial x}\frac{dx}{dt} + \frac{\partial w}{\partial y}\frac{dy}{dt} + \frac{\partial w}{\partial z}\frac{dz}{dt}$, which is $\nabla w \cdot \mathbf{r}'(t)$.
Answer: three terms, one per path
Common mistake