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



Chain rule

Chain Rule

The composition of differentiable functions is differentiable. In particular, if $x(t)$ and $y(t)$ are differentiable functions of a parameter $t$, and if $f(x,y)$ is a differentiable function of $x$ and $y$, then $f(x(t),y(t))$ is a differentiable function of $t$. We compute its derivative with the chain rule

Chain rule (simple case): Suppose that $f(x,y)$ is a differentiable function of $(x,y)$, and that ${\bf r}(t)$ is a differentiable parametrized curve in the $x$-$y$ plane. Then $f({\bf r}(t))$ is a differentiable function of $t$, and $$\frac{d f({\bf r}(t))}{dt} = f_x({\bf r}(t))\, x'(t) + f_y({\bf r}(t)) \, y'(t).$$ This is also written as $$\frac{d f({\bf r}(t))}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt}.$$


The reason behind the chain rule is simple. Since $f(x,y)$ is differentiable, we can approximate changes in $f$ by its linearization, so $$\Delta f \approx f_x \Delta x + f_y \Delta y.$$ Dividing by $\Delta t$ and taking a limit as $\Delta t \to 0$ gives the chain rule. For functions of three of more variables, we just add a term for each variable. If $f(x,y,z)$ is a function of three variables, then $$\frac{d f({\bf r}(t))}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt} + \frac{\partial f}{\partial z} \frac{dz}{dt}.$$

  Example 1: The temperature at a point $(x,\,y)$ in the plane is $T(x,\,y)^{\circ}C$. If a bug crawls on the plane so that its position at time $t$ $($in minutes$)$ is given by $$x(t) \,=\, \sqrt{1+t},\qquad y(t) \,=\, 5+\frac{1}{3} t\,,$$ determine how fast the temperature is rising on the bug's path after $3$ minutes when $$T_x(2,\,6)\ = \ 20,\qquad T_y(2,\, 6)\ = \ 3\,.$$
Solution: the temperature on the bug's path is $S(t) = T(x(t),\,y(t))$. Thus by the Chain Rule for Paths, $$\frac{d S}{d t} \ = \ \frac{\partial T}{\partial x}\, \frac{d x}{dt} + \frac{\partial T}{\partial y}\,\frac{dy}{dt}.$$
But $$\frac{dx}{dt} \,=\, \frac{1}{2\sqrt{1+t}}\,, \qquad \frac{dy}{dt}\,=\, \frac{1}{3}\,.$$ Thus $$\frac{d T}{d t} \ = \ \frac{1}{2\sqrt{1+t}} \,\frac{\partial T}{\partial x}\, +\, \frac{1}{3}\frac{\partial T}{\partial y}\,.$$ Now when $t = 3$, the bug is at the point $(2,\,6)$, in which case $$T_x(2,\,6)\ = \ 20,\qquad T_y(2,\, 6)\ = \ 3\,.$$ Consequently, $$\frac{d T}{d t} \ = \ \frac{20}{4} + \frac{1}{3}\times 3 \ = \ 6^{\circ}C\hbox{/min}\,.$$


Implicit Differentiation Revisited. Back in single-variable calculus, we used the single-variable chain rule to compute $dy/dx$ for the level set of a function $f(x,y)$. Let's see what that means in terms of partial derivatives.

Let $C$ be a curve defined by an equation $f(x,y)=c$, and let ${\bf r}(t)$ be a parametrization of that curve. Since $f({\bf r}(t))=c$ for all $t$, $df/dt=0$. But by the chain rule, $$f_x \frac{dx}{dt} + f_y \frac{dy}{dt} = \frac{df}{dt} = 0,$$ so $$\frac{dy}{dx}=\frac{dy/dt}{dx/dt} = -\frac{f_x}{f_y}.$$ Note that the vector $\langle -f_y, f_x \rangle$ is tangent to the curve, while the vector $\langle f_x, f_y \rangle$ is perpendicular to $\langle -f_y, f_x \rangle$, and so is perpendicular to the curve. The line through $(a,b)$ and perpendicular to the curve is called the normal line.

  Example 2: Find the slope of the tangent line and the normal line to the curve $x^3+y^2=5$ at the point $(1,2)$.

Solution: Let $f(x,y)=x^3+y^2$. Then $$f_x=3x^2 \qquad \hbox{and} \qquad f_y=2y$$ and $$\frac{dy}{dx} = -\frac{3x^2}{2y}.$$
Plugging in $(x,y)=(1,2)$ gives $$\frac{dy}{dx} = -\frac34.$$ This is the slope of the tangent line. The normal line has slope $$\frac{f_y}{f_x}=\frac{2y}{3x^2}=\frac43.$$