Differentiation in several variables · Definition

Chain rule in several variables

multivariable calculusderivatives

Before you start you need to know

It lets you differentiate a function whose variables themselves depend on other variables, such as the temperature felt by an object moving across a hot plate.

Definition

The chain rule for \(z=f(x,y)\), with \(x=x(t)\) and \(y=y(t)\), gives the derivative of the composition as the sum of what each intermediate variable contributes: its partial of \(f\) times its own derivative.

\[\frac{dz}{dt}=\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\frac{dy}{dt}\]

With one variable, \((f\circ g)'=f'(g)\,g'\). With several, each intermediate variable is a path by which the parameter \(t\) reaches \(z\), and the contributions add up. A tree diagram helps: branches go from \(z\) to \(x\) and to \(y\), and from each one to \(t\); multiply the derivatives along each path and add the paths. With \(z=x^2y\), \(x=t\), \(y=t^2\) one gets \(2xy+x^2\cdot2t=4t^3\) after substituting, the same as differentiating \(z=t^4\).

If the intermediate variables depend on two parameters, \(x=x(s,t)\) and \(y=y(s,t)\), there are two formulas with partials: \(z_s=f_xx_s+f_yy_s\) and \(z_t=f_xx_t+f_yy_t\). In general there is one term per intermediate variable, and the formula holds for any number of variables.

In vector form, if \(\mathbf{r}(t)=\langle x(t),y(t)\rangle\), then \(\frac{d}{dt}f(\mathbf{r}(t))=\nabla f\cdot\mathbf{r}'(t)\). This is why the directional derivative uses the dot product with the gradient, and why, if \(f\) is constant along the curve, \(\nabla f\perp\mathbf{r}'\). The same idea gives implicit differentiation: from \(F(x,y)=0\) with \(y=y(x)\) we get \(\frac{dy}{dx}=-\frac{F_x}{F_y}\) if \(F_y\ne0\).

Typical errors are dropping a term, using \(y_t\) where \(y_s\) belongs, or evaluating the partials of \(f\) at the wrong point: \(f_x\) and \(f_y\) are evaluated at \((x(t),y(t))\). The rule requires \(f\) to be differentiable; the mere existence of the partials is not enough.

Think about it

A plate has temperature \(T(x,y)\) with \(T_x=2\), \(T_y=-1\) at the point where an ant is moving with velocity \(\langle3,2\rangle\). At what rate does the temperature it feels change?

\(\frac{dT}{dt}=T_xx'+T_yy'=2\cdot3+(-1)\cdot2=4\): the temperature rises by \(4\) units per unit of time.

Exercises 10

References

  • James Stewart, Daniel K. Clegg, Saleem Watson, Calculus: Early Transcendentals, 9th edition, Cengage, 2021. §14.5
  • Joel Hass, Christopher Heil, Przemyslaw Bogacki, Maurice D. Weir, George B. Thomas Jr., Thomas' Calculus, 15th edition, Pearson, 2023. §14.4
  • Jerrold E. Marsden, Anthony Tromba, Vector Calculus, 6th edition, W. H. Freeman, 2012. §2.5