The multivariable chain rule explains how a change in one variable travels through a network of related variables. It is essential when a quantity depends on several intermediate quantities, which themselves depend on one or more independent variables. This rule appears in physics, economics, engineering, machine learning, and any field that models systems with connected inputs and outputs.
A dependency tree is a helpful visual tool because it shows every path through which change can flow.
Understanding Calculus: The Multivariable Chain Rule
The rule is easiest to understand as a sequence of small effects. Imagine temperature depends on position in a room. A student walks through the room, so position changes with time.
The temperature reading changes because the student moves east or west, and because the student moves north or south. Each direction has its own contribution. The total rate of temperature change is found by combining those contributions.
A steep temperature slope matters only if the motion has a component in that direction. Moving along a line of constant temperature produces no temperature change, even if the nearby temperature slopes are large.
Each product in a chain rule calculation has a physical meaning. One factor describes how strongly the final quantity responds to an intermediate variable. The next factor describes how quickly that intermediate variable responds to the original input.
Their product gives one route for change. Units provide a useful check. If pressure changes by pascals per degree and temperature changes by degrees per second, the product has units of pascals per second.
That is the correct kind of unit for a pressure rate. If units do not cancel in this way, a derivative may have been chosen incorrectly or a factor may be missing.
This idea appears whenever a measurement is calculated from other changing measurements. In physics, the kinetic energy of an object depends on its velocity, while velocity depends on time. If an object moves in more than one direction, its speed depends on several velocity components.
In engineering, a sensor output may depend on voltage and temperature, both of which vary during operation. In biology, a drug concentration can affect a response through several linked body processes.
Scientists use the chain rule to estimate which changing input contributes most to a result. This helps distinguish a large effect from a small one instead of relying on intuition alone.
Students often make errors by following only one route from an input to an output. A variable can influence the final quantity in two or more separate ways, and every route must be included. Another common error is treating a partial derivative like an ordinary derivative.
A partial derivative describes change while the other direct inputs are held fixed. It does not mean those inputs are truly fixed in the full situation. Keep the levels of dependence clear by writing the outer quantity first, then its inputs, then the quantities beneath them.
For functions of two spatial coordinates, the gradient gives the direction of greatest increase. The rate along a moving path depends on how the velocity points relative to that gradient. Motion toward higher values gives a positive rate, motion toward lower values gives a negative rate, and perpendicular motion gives zero rate.
Key Facts
- If z = f(x, y), x = x(t), and y = y(t), then dz/dt = (partial z/partial x)(dx/dt) + (partial z/partial y)(dy/dt).
- If z = f(x, y), x = x(s, t), and y = y(s, t), then partial z/partial s = (partial z/partial x)(partial x/partial s) + (partial z/partial y)(partial y/partial s).
- For partial z/partial t in the same setup, partial z/partial t = (partial z/partial x)(partial x/partial t) + (partial z/partial y)(partial y/partial t).
- Each term in the chain rule corresponds to one path from the output variable to the input variable in the dependency tree.
- When several paths connect an output to an input, add the products of derivatives along all paths.
- Gradient form: if z = f(x, y) and r(t) = <x(t), y(t)>, then dz/dt = grad f · r'(t).
Vocabulary
- Dependent variable
- A dependent variable is a quantity whose value is determined by one or more other variables.
- Independent variable
- An independent variable is an input variable that is not treated as depending on another variable in the problem.
- Intermediate variable
- An intermediate variable is a variable that depends on inputs and also affects a later output.
- Partial derivative
- A partial derivative measures how a multivariable function changes with respect to one variable while the other variables are held constant.
- Dependency tree
- A dependency tree is a diagram that shows how variables depend on one another and which derivative paths must be included.
Common Mistakes to Avoid
- Using only one path from input to output is wrong because the total derivative must include every path that connects the variables.
- Forgetting to evaluate all derivatives at the correct point is wrong because each derivative must match the values of its own variables at the given input.
- Mixing up d and partial derivative notation is wrong because d is used for total change along a path, while partial derivatives hold other variables constant.
- Treating intermediate variables as independent is wrong when they both depend on the same input, because their changes may occur together through that shared input.
Practice Questions
- 1 Let z = x^2y + y^3, x = 2t, and y = t^2. Find dz/dt at t = 1.
- 2 Let z = e^(xy), x = s + t, and y = s^2 - t. Find partial z/partial s at s = 1 and t = 0.
- 3 A temperature T depends on pressure P and volume V, and both P and V depend on time. Explain why dT/dt needs two terms and describe what each term represents.