One Output, Two Independent Parameters
A quantity can depend on several intermediate variables, while those variables depend in turn on more than one parameter. In that situation, the output can change when either parameter changes. To find its partial derivatives, trace the dependencies separately: first ask how the output changes as \(s\) varies with \(t\) fixed, then how it changes as \(t\) varies with \(s\) fixed.
Suppose \(x=x(s,t)\), \(y=y(s,t)\), and \(z=z(s,t)\), and define \(w=f(x(s,t),y(s,t),z(s,t))\). The partial derivative \(w_s\) measures change with respect to \(s\) while \(t\) is held fixed. The partial derivative \(w_t\) measures change with respect to \(t\) while \(s\) is held fixed. Each intermediate variable may contribute to either derivative, but its contribution uses the derivative with respect to the parameter being varied.
Keep the Two Dependency Paths Separate
The formulas have the same structure, but they use different derivatives of the intermediate variables. For \(w_s\), use \(x_s,y_s,z_s\); for \(w_t\), use \(x_t,y_t,z_t\). In each case, multiply the change along a path by the rate at which the output responds to that intermediate variable, then add the contributions.
| Parameter being varied | Contributions to the output derivative |
|---|---|
| \(s\), with \(t\) fixed | \(f_xx_s,\ f_yy_s,\ f_zz_s\) |
| \(t\), with \(s\) fixed | \(f_xx_t,\ f_yy_t,\ f_zz_t\) |
The partial derivatives \(f_x,f_y,f_z\) describe the output’s sensitivity to changes in its own inputs. The derivatives such as \(x_s\) and \(z_t\) describe how those inputs respond to the parameters. The chain rule combines these two kinds of information.
Worked Example: Computing Both Derivatives and Checking Them Directly
Let \(f(x,y,z)=x^2+yz\), where \(x=s+t\), \(y=s-t\), and \(z=st\). Find \(w_s\) and \(w_t\).
First find the partial derivatives of \(f\) and of the intermediate variables:
For the \(s\) derivative, use only the \(s\)-derivatives of the intermediate variables:
For the \(t\) derivative, use the \(t\)-derivatives instead:
Check by substituting the intermediate variables into \(f\) first:
Differentiating this expression gives \(w_s=2s+2t+2st-t^2\) and \(w_t=2s+2t+s^2-2st\). The second expression is the same as \(s^2+2s+2t-2st\), so both chain-rule results check.
Why the Formula Works
The two formulas follow from the same local principle: a small change in \(s\) and \(t\) produces changes in \(x,y,z\), and those input changes produce a change in \(w\). Differentiability lets us describe these changes by their linear parts, with errors that become negligible compared with the size of the parameter change.
Evaluate the Derivatives at the Right Inputs
In an application, the expressions \(f_x,f_y,f_z\) are first found as functions of \(x,y,z\). To use them in the chain rule, evaluate them at the current intermediate values \(x(s,t),y(s,t),z(s,t)\). The derivatives \(x_s,x_t,y_s,y_t,z_s,z_t\), by contrast, come from differentiating the intermediate-variable formulas with respect to their parameters.
Worked Example: Evaluating Both Partial Derivatives at a Point
Let \(f(x,y,z)=xy+z^2\), with \(x=s^2+t\), \(y=e^s\), and \(z=\cos t\). Find \(w_s\) and \(w_t\), then evaluate them at \((s,t)=(1,0)\).
The derivatives of the outer function are \(f_x=y\), \(f_y=x\), and \(f_z=2z\). The parameter derivatives are \(x_s=2s\), \(y_s=e^s\), \(z_s=0\), and \(x_t=1\), \(y_t=0\), \(z_t=-\sin t\). Thus
At \((1,0)\), the intermediate values are \(x=1\), \(y=e\), and \(z=1\). The outer derivatives there are \(f_x=e\), \(f_y=1\), and \(f_z=2\). Also \(x_s=2\), \(y_s=e\), \(z_s=0\), while \(x_t=1\), \(y_t=0\), and \(z_t=0\). Therefore
To check, substitute into the composite function: \(w=(s^2+t)e^s+\cos^2t\). Direct differentiation gives \(w_s=e^s(s^2+2s+t)\) and \(w_t=e^s-2\cos t\sin t\). At \((1,0)\), these are \(3e\) and \(e\), as obtained from the chain rule.
A Dependency Path Can Have More Than One Contribution
The sum in each chain-rule formula is important. A parameter can change several intermediate variables at once, and every resulting route to the output contributes. A zero derivative on one route removes only that route’s contribution; it does not remove the other terms.
Worked Example: Tracking Three Separate Contributions
Let \(f(x,y,z)=xyz\), where \(x=s+t\), \(y=s^2-t\), and \(z=st\). Find \(w_s\) and \(w_t\) at \((1,2)\), and verify the answers by differentiating the composite expression.
For the outer function, \(f_x=yz\), \(f_y=xz\), and \(f_z=xy\). For the intermediate variables, \(x_s=1\), \(y_s=2s\), \(z_s=t\), and \(x_t=1\), \(y_t=-1\), \(z_t=s\). At \((1,2)\), \(x=3\), \(y=-1\), and \(z=2\). Consequently, \(f_x=-2\), \(f_y=6\), and \(f_z=-3\), while \(x_s=1,y_s=2,z_s=2\) and \(x_t=1,y_t=-1,z_t=1\).
The \(s\)-derivative is
The \(t\)-derivative is
For a direct check, the composite expression is \(w=(s+t)(s^2-t)st\). Applying the product rule at \((1,2)\), the \(s\)-derivative is
For the \(t\)-derivative, the product rule gives
Both direct calculations agree with the chain-rule values.
Common Mistake: Mixing the Parameter Derivatives
A frequent error is to use an \(s\)-derivative of an intermediate variable when calculating \(w_t\), or to omit a term because the same variable also depends on the other parameter. The \(t\)-derivative must use \(x_t,y_t,z_t\) throughout.
The mistake happens to give the correct value at \(t=0\), because \(z_t=-\sin 0=0\) there. That accidental agreement at one point does not make the formula correct. Checking the general derivative, or checking at a point where \(\sin t\ne0\), exposes the missing contribution.
Using the Chain Rule Reliably
A dependable calculation keeps the two parameter paths distinct from the beginning. Before substituting lengthy expressions, write down which derivatives belong to each parameter. Then evaluate the outer partial derivatives at the intermediate values and simplify each result.
Compute \(f_x,f_y,f_z\) with \(x,y,z\) treated as independent inputs.
Calculate \(x_s,y_s,z_s\) and separately \(x_t,y_t,z_t\).
Use the \(s\)-derivatives only in the formula for \(w_s\), and the \(t\)-derivatives only in the formula for \(w_t\).
Evaluate the outer partials at the intermediate values, simplify, and, when practical, differentiate the composite expression directly to verify the result.
This method is useful whenever several quantities respond to multiple controls, coordinates, or parameters. For example, if a modeled output depends on three intermediate measurements and each measurement depends on two experimental settings, the two partial derivatives describe distinct sensitivities. Keeping the paths separate makes clear which setting causes each contribution and prevents one parameter’s rates of change from being mistakenly assigned to the other.
Check Your Understanding
For each question, keep track of which parameter is being varied and which is held fixed.
- If \(w=f(x(s,t),y(s,t),z(s,t))\), write the formula for \(w_s\) and identify where each factor is evaluated.
- Write the corresponding formula for \(w_t\). Which derivatives of the intermediate variables appear in it?
- For \(x=s+t\), \(y=s-t\), and \(z=st\), list \(x_s,y_s,z_s\) and \(x_t,y_t,z_t\).
- Why can a chain-rule calculation for \(w_t\) be wrong even if it gives the right answer at one particular point?
- State the differentiability conditions that allow the two-parameter chain rule to apply.