Chain rule in physics

Differentiate dependent variables and recognise chained changes. Theory, formulas, worked examples and interactive graphs.

What it is

The chain rule is the procedure for differentiating a composite function, that is, a function built by applying one function to the result of another. If z depends on y, and y in turn depends on x, the chain rule says the rate of change of z with respect to x is the product of the rate of change of z with respect to y and the rate of change of y with respect to x: dz/dx = (dz/dy)(dy/dx).

This idea captures something intuitive: if z changes fast when y changes, and y in turn changes fast when x changes, then z changes even faster when x changes, because the two effects multiply in a chain.

Why it appears in physics

It appears because many physical quantities depend on a variable through an intermediate one: potential energy depends on position, which in turn depends on time, so the rate of change of potential energy with respect to time requires chaining both dependencies. The same happens with pressure depending on depth, which depends on time if a fluid's level changes, or with temperature depending on position, which depends on time if an object moves through a temperature field.

The chain rule also constantly appears when using derived units or changes of variable: if you know how a quantity changes with respect to a convenient intermediate variable, and how that intermediate variable changes with respect to the final variable of interest, you can combine both pieces of information without having to restate the problem from scratch.

Visual or geometric idea

The visual idea is this: imagine three gears connected in a chain. If the first gear turns one revolution, it makes the second gear turn a certain number of revolutions, and that second gear makes the third turn another number of revolutions. The relation between the first and third revolution is the product of the two intermediate relations, exactly as in the chain rule.

Another image is a road map: if you travel from A to B at a speed relative to a certain stretch, and from B to C at another speed relative to another stretch, the effective speed from A to C combines both stages by multiplying their effects, not adding them.

Minimal symbolic language

If z = f(y) and y = g(x), then z = f(g(x)) is a composite function, and its derivative is dz/dx = f'(g(x))·g'(x), which in Leibniz notation is written dz/dx = (dz/dy)(dy/dx). This notation clearly shows why the rule works: it is as if the term dy "cancels" between the numerator of one factor and the denominator of the other, although this is an intuitive simplification, not a literal algebraic manipulation of the symbols dz, dy, dx as separate fractions.

With more than two links in the chain, the rule extends by multiplying all the intermediate derivatives: if w depends on z, z depends on y, and y depends on x, then dw/dx = (dw/dz)(dz/dy)(dy/dx).

What the result means

The result of applying the chain rule is the total rate of change of a quantity with respect to the final variable of interest, accounting for all intermediate links of dependency. Each factor in the product represents how much that specific link of the chain "amplifies" or "attenuates" the change.

If any of the intermediate factors is zero at a specific point, the total result will also be zero at that point, regardless of the value of the other factors: this reflects that if a link in the chain does not transmit change at that instant, no change propagates through that chain at that point.

When not to use it

Do not apply the chain rule if the dependency between the variables is not really a composition of functions, but an implicit relation among several variables with no clear order of dependency: in those cases implicit differentiation is needed instead of the direct chain rule.

Also do not forget to evaluate each intermediate derivative at the correct point: the derivative of the outer function must be evaluated at the value the inner function takes at that point, not at the original variable directly, a very common error when applying the rule hastily.

Operational summary

Identify the chain of dependencies between the variables (which depends on which), differentiate each link of the chain separately treating the other variables as momentarily constant, multiply all intermediate derivatives in the correct order, and evaluate each one at the appropriate point according to the variable it directly depends on.

Procedure

Before calculating

Identify the complete chain of dependencies between the variables: which quantity depends on which other, and how many intermediate links there are between the final variable of interest and the quantity you want to differentiate.

Check that the relation is indeed a composition of functions (one explicitly depends on another), not an implicit relation among variables with no clear order.

Step 1: identify the mathematical object

Explicitly write each link of the chain as an independent function: if z depends on y, and y depends on x, write z = f(y) and y = g(x) separately before combining them.

Identify which is the final variable with respect to which you want to differentiate, and make sure the chain of dependencies ends at that variable.

Step 2: choose the operation

Differentiate each link of the chain separately: calculate dz/dy treating y as the independent variable of that stage, and calculate dy/dx treating x as the independent variable of the next stage.

Multiply all the intermediate derivatives in the correct order to obtain the total derivative: dz/dx = (dz/dy)(dy/dx), extending the product if there are more than two links.

Step 3: preserve units and signs

Check that the units cancel correctly through the chain: the units of y must cancel between the denominator of dz/dy and the numerator of dy/dx, leaving the final units of z over x.

Preserve the sign of each intermediate derivative separately before multiplying: a sign change in any link reverses the sign of the final result if the number of negative factors is odd.

Step 4: calculate

Evaluate each intermediate derivative at the correct point: the derivative of the outer function dz/dy must be evaluated at the value y takes at the point of interest, not at the value of x directly.

Multiply the numerical or symbolic results of each link only after having correctly evaluated each one at its corresponding variable.

Step 5: interpret the result

Interpret the final result as the combined rate of change through the entire chain of dependencies: it represents how much the final quantity changes per unit change in the initial variable, accounting for all intermediate links.

If any intermediate link turns out to be zero at the point of interest, check that the total result is also zero, and explain physically why that link stops the propagation of change at that point.

Self-check checklist

Check that you correctly identified all links of the dependency chain, that you differentiated each link separately before combining them, that you evaluated each intermediate derivative at the correct point, and that the units cancel consistently along the chain.

Guided example

Physical situation

An object oscillates with position x(t) = A sin(ωt). Its elastic potential energy is U(x) = ½kx². The task is to calculate dU/dt, the rate of change of potential energy with respect to time.

Mathematical translation

Potential energy depends on x, and x depends on t, so the chain rule is needed: dU/dt = (dU/dx)(dx/dt).

Step-by-step calculation

First, dU/dx = kx (differentiating U with respect to x). Second, dx/dt = Aω cos(ωt) (differentiating x with respect to t). Multiplying: dU/dt = kx · Aω cos(ωt) = k·(A sin(ωt))·Aω cos(ωt) = kA²ω sin(ωt)cos(ωt).

Reading the result

The result shows that potential energy changes fastest when the product sin(ωt)cos(ωt) is largest, which happens midway through each oscillation (not at the extremes nor at the center), reflecting that potential energy changes fastest when the object moves at an intermediate speed between its oscillation extremes.

Common error avoided

This avoids differentiating U with respect to t directly by substituting x(t) into U(x) before differentiating and applying only the trigonometric rules without recognizing the composition: without the explicit chain rule, it is easy to forget to multiply by dx/dt, obtaining only kx instead of the complete result.

Inverse example

Given result

When applying the chain rule to calculate dz/dx, one of the intermediate factors (dy/dx) turns out to be exactly zero at a certain point.

What physical question it can answer

This allows one to conclude that, at that specific point, a change in variable x produces no change in the intermediate variable y, and therefore none in z either, regardless of how much z changes with respect to y at that point: the intermediate link "cuts" the propagation chain of change at that exact instant.

Common errors

Error 1: forgetting to multiply by the derivative of the inner function

It seems reasonable to differentiate only the outer function and stop there. It fails because the chain rule requires multiplying by the derivative of the inner function, which represents how much that intermediate variable changes with respect to the final variable. Detect it by checking whether the calculated derivative has the correct units with respect to the final variable. Correct it by explicitly identifying each link of the chain before differentiating, and multiplying all intermediate derivatives without omitting any. Mini-example: differentiating U(x(t)) with respect to t without multiplying by dx/dt gives a result with incorrect units.

Error 2: evaluating the outer derivative at the wrong variable

It seems reasonable to evaluate the derivative of the outer function directly at the final variable, instead of at the value the intermediate variable takes. It fails because dz/dy must be evaluated at the value of y corresponding to the point of interest, not at the value of x. Detect it by checking whether the substituted value corresponds to the intermediate variable or the final variable. Correct it by first substituting the value of the intermediate variable (calculated from the final variable) before evaluating the outer derivative. Mini-example: when differentiating U(x) = kx² with x(t) = At, dU/dx must be evaluated at x = At, not directly at t.

Error 3: confusing the chain rule with implicit differentiation

It seems reasonable to apply the chain rule's product of derivatives to any relation between variables. It fails when the relation between the variables has no clear direction of dependency (neither is an explicit function of the other), in which case implicit differentiation is needed, a different procedure. Detect it by checking whether one variable can be written explicitly as a function of the other. Correct it by using implicit differentiation when the relation is symmetric between the variables, instead of forcing an artificial composition. Mini-example: in x² + y² = r², neither x nor y is a simple explicit function of the other over the whole domain, and implicit differentiation is needed.

Error 4: losing intermediate factors in a chain with more than two links

It seems reasonable to multiply only the first two factors of a long chain, forgetting the additional links. It fails because each intermediate link contributes multiplicatively to the final result, and omitting one completely changes the magnitude of the result. Detect it by explicitly counting how many links the dependency chain has before multiplying. Correct it by writing the full chain of dependent variables before differentiating each link separately. Mini-example: if w depends on z, z depends on y, and y depends on x, forgetting the factor dz/dy leaves the result incomplete.

Error 5: reversing the order of the multiplied factors

It seems reasonable to multiply the intermediate derivatives in any order without paying attention to which variable depends on which. It fails if a fraction is accidentally inverted, for example using dx/dy instead of dy/dx in some link, producing a result with incorrect units or magnitude. Detect it by checking that each derivative has the "upper" variable in the chain in the numerator and the "lower" variable in the denominator, in the correct order. Correct it by explicitly writing each derivative with its correct numerator and denominator before multiplying. Mini-example: using dt/dx instead of dx/dt in the chain reverses the units of the final result.

Quick detection rule

If the result of a chain rule application does not have the correct units for the final variable, if multiplying by some intermediate link is missing, or if a derivative appears "inverted" (numerator and denominator swapped), the error is probably in the setup of the dependency chain, not in the final arithmetic.

Physical applications

1. Energy in oscillating systems

It appears when calculating how the potential or kinetic energy of an oscillator changes with respect to time, when the energy depends on position and position depends on time. It is calculated by chaining dU/dx with dx/dt. The result shows at which points of the cycle energy changes fastest. The dangerous error is substituting x(t) into U(x) and differentiating without recognizing the explicit composition. As a final control, the learner must explain why the rate of change of energy depends on both position and instantaneous velocity.

2. Thermodynamics and chained state variables

It appears when calculating how the pressure or volume of a gas changes with respect to time, when those quantities depend on temperature, which in turn depends on time in a heating process. It is calculated by chaining the derivative of the equation of state with respect to temperature with the rate of change of temperature with respect to time. The result predicts the rate of change of the thermodynamic variable of interest. The dangerous error is differentiating directly without identifying the intermediate variable (temperature) connecting both quantities. As a final control, the learner must explain why heating a gas faster increases its pressure faster, for the same total temperature change.

3. Fields and gradients in motion

It appears when calculating how a field quantity (temperature, electric potential) perceived by an object moving through that field changes, when the field depends on position and position depends on time. It is calculated by chaining the field's gradient with the object's velocity. The result gives the rate of change perceived by the moving object. The dangerous error is confusing the rate of change of the field at a fixed point with the rate of change perceived by a moving observer. As a final control, the learner must explain why an object moving faster through a field perceives faster changes, even though the field itself does not change with time at each fixed point.

4. Unit changes and auxiliary variables

It appears when converting a known rate of change with respect to one variable into a rate of change with respect to another related variable, using an auxiliary intermediate variable. It is calculated by chaining the derivative with respect to the auxiliary variable with the derivative of that auxiliary variable with respect to the final variable. The result allows reusing already calculated information without repeating the whole analysis. The dangerous error is forgetting the conversion factor when changing variables, keeping only the derivative with respect to the auxiliary variable. As a final control, the learner must explain why changing variables requires multiplying by the derivative of that variable with respect to the new variable of interest.

5. Reactions and processes with multiple dependent stages

It appears when calculating the rate of change of a final quantity in a process with several chained stages, where each stage depends on the previous one (for example, the rate of an overall reaction depending on a rate-limiting intermediate step). It is calculated by multiplying the rates of change of each stage in the full chain. The result identifies which stage dominates the overall behavior if its intermediate factors are much smaller or larger than the others. The dangerous error is analyzing each stage in isolation without combining their effects multiplicatively. As a final control, the learner must explain why a very slow intermediate stage limits the speed of the entire chained process.

Practice

Level 1: recognition

Identify, for three given physical relations (energy and position-time, pressure and temperature-time, field and position-time), which is the intermediate variable connecting the final quantity with the variable of interest.

Exercise: explain why calculating dU/dt when U depends on x and x depends on t requires the chain rule.

Level 2: direct application

Calculate the derivative of a simple composite function using the chain rule, explicitly identifying the outer and inner function.

Exercise: given U(x) = ½kx² and x(t) = A sin(ωt), calculate dU/dt using the chain rule.

Level 3: choosing the tool

Decide whether a relation between variables requires the chain rule (explicit composition) or implicit differentiation (symmetric relation with no clear direction of dependency).

Exercise: given the relation x² + y² = 25, decide whether the chain rule can be applied directly or implicit differentiation is needed.

Level 4: physical interpretation

Interpret the result of a chain rule application in terms of which link dominates or limits the total change.

Exercise: given a chain of three links where one of the intermediate factors is much smaller than the others, explain the effect this has on the final result.

Level 5: intentional error

Analyze a calculation where multiplying by the derivative of the inner function was forgotten, or where the outer derivative was evaluated at the wrong variable. Detect the error, correct it, and explain the physical consequence.

Exercise: invent a plausible error when applying the chain rule by forgetting an intermediate link, show why it seems reasonable, correct it, and state the incorrect result it would have produced.