M408M Learning Module Pages

Main page

Chapter 10: Parametric Equations and Polar Coordinates

Chapter 12: Vectors and the Geometry of Space


Chapter 13: Vector Functions


Chapter 14: Partial Derivatives


Learning module LM 14.1: Functions of 2 or 3 variables:

Learning module LM 14.3: Partial derivatives:

Learning module LM 14.4: Tangent planes and linear approximations:

Learning module LM 14.5: Differentiability and the chain rule:

      Differentiability
      Chain rule
      General chain rule
      Worked problems

Learning module LM 14.6: Gradients and directional derivatives:

Learning module LM 14.7: Local maxima and minima:

Learning module LM 14.8: Absolute maxima and Lagrange multipliers:

Chapter 15: Multiple Integrals



General chain rule

General Chain Rule The General Version of the Chain Rule starts with a function $f(x,y)$, where $x$ and $y$ are themselves functions $x = x(s,\, t)$ and $y = y(s,\,t)$ of two other variables $s$ and $ t$, so that the composition $${\color{darkerblue}z\ = \ f(x(s, \,t), y(s, \,t))}$$ is now a function of $s$ and $ t$. The partial derivatives of $z$ become:

Chain Rule, General Version: when $z = f(x(s,\, t), \,y(s, \,t))$ is the composition of $z = f(x , \,y )$ and $x = x(s, \,t),\ y = y(s, \,t)$ then its partial derivatives are given by $$\frac{\partial z}{\partial s} \ = \ \frac{\partial }{\partial s} f(x(s,\, t), \,y(s, \,t)) \ = \ \frac{\partial f}{\partial x}\, \frac{\partial x}{\partial s} + \frac{\partial f}{\partial y}\,\frac{\partial y}{\partial s},$$ $$\frac{\partial z}{\partial t} \ = \ \frac{\partial }{\partial t} f(x(s,\, t), \,y(s, \,t)) \ = \ \frac{\partial f}{\partial x}\, \frac{\partial x}{\partial t} + \frac{\partial f}{\partial y}\,\frac{\partial y}{\partial t}.$$

The one and two variable chain rules set the pattern for more variables. If $w = f(x, \,y,\, z)$ and $$x \ = \ x(r, \,s,\, t), \qquad y \ = \ y(r, \,s, \,t), \qquad z \ = \ z(r,\, s, \,t),$$ then $$w \ = \ f(x(r, \,s, \,t), y(r,\, s, \,t), z(r, \,s, \,t))$$ is a function of $r, \,s,$ and $ t$ such that $$\frac{\partial w}{\partial r} \ = \ \frac{\partial f}{\partial x}\frac{\partial x}{\partial r} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial r} + \frac{\partial f}{\partial z} \frac{\partial z}{\partial r}\,$$ and so on for functions $f(x_1,\, x_2,\, \ldots, \, x_n)$ of $n$ variables for any $n$.

  Example: Determine $\displaystyle \frac{\partial z}{\partial s}$ when $$z \ = \ f(x,\, y) \ = \ \frac{x}{x+y}$$ and $$x\,=\, 3se^{t},\qquad y\,=\, 1+s e^{-t}\,.$$ Solution: By the Chain Rule, $$\frac{\partial z}{\partial s} \ = \ \frac{\partial z}{\partial x}\, \frac{\partial x}{\partial s} + \frac{\partial z}{\partial y}\,\frac{\partial y}{\partial s}.$$ But when $$z \ = \ \frac{x}{x+y}\,,$$ $$ \frac{\partial z}{\partial x} \, = \, \frac{(x+y)-x}{(x+y)^2}\,=\,\frac{y}{(x+y)^2}, \quad \frac{\partial z}{\partial y} \, = \, -\frac{x}{(x+y)^2}.$$ On the other hand, $$ \frac{\partial x}{\partial s} \ = \ 3e^{t}\,, \qquad \frac{\partial y}{\partial s} \ = \ e^{-t}\,.$$Consequently, $$\frac{\partial z}{\partial s}\ = \ \frac{1}{(x+y)^2}\Bigl(3y e^t - xe^{-t}\Bigr)\,.$$ We can now substitute for $x,\, y$ in terms of $s,\,t$: $$\frac{\partial z}{\partial s} \ = \ \frac{3 e^t}{(3se^t + 1 + s e^{-t})^2}\,.$$

Why do we care about such compositions? These compositions come up whenever we switch coordinate systems. In the plane for example, both rectangular and polar coordinates are important, so often there's a need to change coordinates, writing $$x\ = \ x(r, \theta) \ = \ r \cos \theta\,, \qquad y \ = \ y(r, \theta) \ = \ r \sin \theta\,.$$ The chain rule then tells us that $$ \frac{\partial }{\partial r} f(r \cos \theta,\ r\sin \theta)\ = \ \frac{\partial f}{\partial x}\frac{\partial x}{\partial r}+ \frac{\partial f}{\partial y} \frac{\partial y}{\partial r} \ = \ \cos \theta \frac{\partial f}{\partial x} + \sin \theta \frac{\partial f}{ \partial y}\,,$$ and so on.