Section 10.5 The Chain Rule
Motivating Questions
What is the Chain Rule and how do we use it to find a derivative?
How can we use a tree diagram to guide us in applying the Chain Rule?
In singlevariable calculus, we encountered situations in which some quantity \(z\) depends on \(y\) and, in turn, \(y\) depends on \(x\text{.}\) A change in \(x\) produces a change in \(y\text{,}\) which consequently produces a change in \(z\text{.}\) Using the language of differentials that we saw in the previous section, these changes are naturally related by
In terms of instantaneous rates of change, we then have
and thus
This most recent equation we call the Chain Rule.
In the case of a function \(f\) of two variables where \(z = f(x,y)\text{,}\) it might be that both \(x\) and \(y\) depend on another variable \(t\text{.}\) A change in \(t\) then produces changes in both \(x\) and \(y\text{,}\) which then cause \(z\) to change. In this section we will see how to find the change in \(z\) that is caused by a change in \(t\text{,}\) leading us to multivariable versions of the Chain Rule involving both regular and partial derivatives.
Preview Activity 10.5.1.
Suppose you are driving around in the \(xy\)plane in such a way that your position \(\vr(t)\) at time \(t\) is given by function
The path taken is shown on the left of Figure 10.5.1.
Suppose, furthermore, that the temperature at a point in the plane is given by
and note that the surface generated by \(T\) is shown on the right of Figure 10.5.1. Therefore, as time passes, your position \((x(t), y(t))\) changes, and, as your position changes, the temperature \(T(x,y)\) also changes.
The position function \(\vr\) provides a parameterization \(x = x(t)\) and \(y = y(t)\) of the position at time \(t\text{.}\) By substituting \(x(t)\) for \(x\) and \(y(t)\) for \(y\) in the formula for \(T\text{,}\) we can write \(T = T(x(t), y(t))\) as a function of \(t\text{.}\) Make these substitutions to write \(T\) as a function of \(t\) and then use the Chain Rule from single variable calculus to find \(\frac{dT}{dt}\text{.}\) (Do not do any algebra to simplify the derivative, either before taking the derivative, nor after.)

Now we want to understand how the result from part (a) can be obtained from \(T\) as a multivariable function. Recall from the previous section that small changes in \(x\) and \(y\) produce a change in \(T\) that is approximated by
\begin{equation*} \Delta T \approx T_x\Delta x + T_y\Delta y. \end{equation*}The Chain Rule tells us about the instantaneous rate of change of \(T\text{,}\) and this can be found as
\begin{equation} \lim_{\Delta t \to 0} \frac{\Delta T}{\Delta t} = \lim_{\Delta t \to 0} \frac{T_x \Delta x + T_y \Delta y}{\Delta t}.\label{eq_PA_10_5_1}\tag{10.5.1} \end{equation}Use equation (10.5.1) to explain why the instantaneous rate of change of \(T\) that results from a change in \(t\) is
\begin{equation} \frac{dT}{dt} = \frac{\partial T}{\partial x} \frac{dx}{dt} + \frac{\partial T}{\partial y} \frac{dy}{dt}.\label{eq_PA_10_5_2}\tag{10.5.2} \end{equation} Using the original formulas for \(T\text{,}\) \(x\text{,}\) and \(y\) in the problem statement, calculate all of the derivatives in Equation (10.5.2) (with \(T_x\) and \(T_y\) in terms of \(x\) and \(y\text{,}\) and \(x'\) and \(y'\) in terms of \(t\)), and hence write the righthand side of Equation (10.5.2) in terms of \(x\text{,}\) \(y\text{,}\) and \(t\text{.}\)
Compare the results of parts (a) and (c). Write a couple of sentences that identify specifically how each term in (c) relates to a corresponding terms in (a). This connection between parts (a) and (c) provides a multivariable version of the Chain Rule.
Subsection 10.5.1 The Chain Rule
As Preview Activity 10.3.1 suggests, the following version of the Chain Rule holds in general.
The Chain Rule.
Let \(z = f(x,y)\text{,}\) where \(f\) is a differentiable function of the independent variables \(x\) and \(y\text{,}\) and let \(x\) and \(y\) each be differentiable functions of an independent variable \(t\text{.}\) Then
It is important to note the differences among the derivatives in (10.5.3). Since \(z\) is a function of the two variables \(x\) and \(y\text{,}\) the derivatives in the Chain Rule for \(z\) with respect to \(x\) and \(y\) are partial derivatives. However, since \(x = x(t)\) and \(y = y(t)\) are functions of the single variable \(t\text{,}\) their derivatives are the standard derivatives of functions of one variable. When we compose \(z\) with \(x(t)\) and \(y(t)\text{,}\) we then have \(z\) as a function of the single variable \(t\text{,}\) making the derivative of \(z\) with respect to \(t\) a standard derivative from single variable calculus as well.
To understand why this Chain Rule works in general, suppose that some quantity \(z\) depends on \(x\) and \(y\) so that
Next, suppose that \(x\) and \(y\) each depend on another quantity \(t\text{,}\) so that
Combining Equations (10.5.4) and (10.5.5), we find that
which is the Chain Rule in this particular context, as expressed in Equation (10.5.3).
Activity 10.5.2.
In the following questions, we apply the Chain Rule in several different contexts.

Suppose that we have a function \(z\) defined by \(z(x,y) = x^2+xy^3\text{.}\) In addition, suppose that \(x\) and \(y\) are restricted to points that move around the plane by following a circle of radius \(2\) centered at the origin that is parameterized by
\begin{equation*} x(t) = 2\cos(t), \ \mbox{and } \ y(t) = 2\sin(t). \end{equation*}Use the Chain Rule to find the resulting instantaneous rate of change \(\frac{dz}{dt}\text{.}\)
Substitute \(x(t)\) for \(x\) and \(y(t)\) for \(y\) in the rule for \(z\) to write \(z\) in terms of \(t\) and calculate \(\frac{dz}{dt}\) directly. Compare to the result of part (i.).

Suppose that the temperature on a metal plate is given by the function \(T\) with
\begin{equation*} T(x,y) = 100(x^2 + 4y^2), \end{equation*}where the temperature is measured in degrees Fahrenheit and \(x\) and \(y\) are each measured in feet.
Find \(T_x\) and \(T_y\text{.}\) What are the units on these partial derivatives?
Suppose an ant is walking along the \(x\)axis at the rate of 2 feet per minute toward the origin. When the ant is at the point \((2,0)\text{,}\) what is the instantaneous rate of change in the temperature \(dT/dt\) that the ant experiences. Include units on your response.
Suppose instead that the ant walks along an ellipse with \(x = 6\cos(t)\) and \(y = 3\sin(t)\text{,}\) where \(t\) is measured in minutes. Find \(\frac{dT}{dt}\) at \(t = \pi/6\text{,}\) \(t=\pi/4\text{,}\) and \(t = \pi/3\text{.}\) What does this seem to tell you about the path along which the ant is walking?
Suppose that you are walking along a surface whose elevation is given by a function \(f\text{.}\) Furthermore, suppose that if you consider how your location corresponds to points in the \(xy\)plane, you know that when you pass the point \((2,1)\text{,}\) your velocity vector is \(\vv=\langle 1,2\rangle\text{.}\) If some contours of \(f\) are as shown in Figure 10.5.2, estimate the rate of change \(df/dt\) when you pass through \((2,1)\text{.}\)
Subsection 10.5.2 Tree Diagrams
Up to this point, we have applied the Chain Rule to situations where we have a function \(z\) of variables \(x\) and \(y\text{,}\) with both \(x\) and \(y\) depending on another single quantity \(t\text{.}\) We may apply the Chain Rule, however, when \(x\) and \(y\) each depend on more than one quantity, or when \(z\) is a function of more than two variables. It can be challenging to keep track of all the dependencies among the variables, and thus a tree diagram can be a useful tool to organize our work. For example, suppose that \(z\) depends on \(x\) and \(y\text{,}\) and \(x\) and \(y\) both depend on \(t\text{.}\) We may represent these relationships using the tree diagram shown at left Figure 10.5.3. We place the dependent variable at the top of the tree and connect it to the variables on which it depends one level below. We then connect each of those variables to the variable on which each depends.
To represent the Chain Rule, we label every edge of the diagram with the appropriate derivative or partial derivative, as seen at right in Figure 10.5.3. To calculate an overall derivative according to the Chain Rule, we construct the product of the derivatives along all paths connecting the variables and then add all of these products. For example, the diagram at right in Figure 10.5.3 illustrates the Chain Rule
Activity 10.5.3.

Figure 10.5.4 shows the tree diagram we construct when (a) \(z\) depends on \(w\text{,}\) \(x\text{,}\) and \(y\text{,}\) (b) \(w\text{,}\) \(x\text{,}\) and \(y\) each depend on \(u\) and \(v\text{,}\) and (c) \(u\) and \(v\) depend on \(t\text{.}\)
Label the edges with the appropriate derivatives.
Use the Chain Rule to write \(\frac{dz}{dt}\text{.}\)

Suppose that \(z=x^2  2xy^2\) and that
\begin{align*} x\amp =r\cos(\theta)\\ y\amp =r\sin(\theta). \end{align*}Construct a tree diagram representing the dependencies of \(z\) on \(x\) and \(y\) and \(x\) and \(y\) on \(r\) and \(\theta\text{.}\)
Use the tree diagram to find \(\frac{\partial z}{\partial r}\text{.}\)
Now suppose that \(r = 3\) and \(\theta=\pi/6\text{.}\) Find the values of \(x\) and \(y\) that correspond to these given values of \(r\) and \(\theta\text{,}\) and then use the Chain Rule to find the value of the partial derivative \(\frac{\partial z}{\partial \theta}_{(3,\frac{\pi}{6})}\text{.}\)
Subsection 10.5.3 Summary

The Chain Rule is a tool for differentiating a composite for functions. In its simplest form, it says that if \(f(x,y)\) is a function of two variables and \(x(t)\) and \(y(t)\) depend on \(t\text{,}\) then
\begin{equation*} \frac{df}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}. \end{equation*} A tree diagram can be used to represent the dependence of variables on other variables. By following the links in the tree diagram, we can form chains of partial derivatives or derivatives that can be combined to give a desired partial derivative.
Exercises 10.5.4 Exercises
1.
Use the chain rule to find \(\frac{dz}{dt}\text{,}\) where
First the pieces:
\(\frac{\partial z}{\partial x} =\)
\(\frac{\partial z}{\partial y} =\)
\(\frac{dx}{dt} =\)
\(\frac{dy}{dt} =\)
End result (in terms of just \(t\)):
\(\frac{dz}{dt} =\)
\(2xy+y^{2}\)
\(x^{2}+2xy\)
\(5t^{4}\)
\(2t^{1}\)
\(\left(2\!\left(1+\left(1\right)t^{5}\right)\!\left(3+\left(1\right)t^{2}\right)+\left(3+\left(1\right)t^{2}\right)^{2}\right)\!\left(1\right)\cdot 5t^{4}+\left(2\!\left(1+\left(1\right)t^{5}\right)\!\left(3+\left(1\right)t^{2}\right)+\left(1+\left(1\right)t^{5}\right)^{2}\right)\!\left(1\right)\cdot 2t^{1}\)
2.
Use the chain rule to find \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\text{,}\) where
First the pieces:
\(\frac{\partial z}{\partial x} =\) \(\frac{\partial z}{\partial y} =\)
\(\frac{\partial x}{\partial s} =\) \(\frac{\partial x}{\partial t} =\)
\(\frac{\partial y}{\partial s} =\) \(\frac{\partial y}{\partial t} =\)
And putting it all together:
\(\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}\) and \(\frac{\partial z}{\partial t} = \frac{\partial z}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial z}{\partial y}\frac{\partial y}{\partial t}\)
3.
Suppose \(\displaystyle w = \frac{x}{y} + \frac{y}{z}\text{,}\) where
\(x = e^{5t},\ y = 2 + \sin \left( 3t \right)\text{,}\) and \(z = 2 + \cos \left( 6t \right)\text{.}\)
A) Use the chain rule to find \(\frac{dw}{dt}\) as a function of x, y, z, and t. Do not rewrite x, y, and z in terms of t, and do not rewrite \(e^{5t}\) as x.
\(\frac{dw}{dt}\) =
Note: You may want to use exp() for the exponential function. Your answer should be an expression in x, y, z, and t; e.g. “3x  4y”
B) Use part A to evaluate \(\frac{dw}{dt}\) when \(t = 0\text{.}\)
4.
If \(z = \left(x+y\right)e^{y}\) and \(x = u^{2}+v^{2}\) and \(y = u^{2}v^{2}\text{,}\) find the following partial derivatives using the chain rule. Enter your answers as functions of \(u\) and \(v\text{.}\)
\(\displaystyle \frac{\partial z}{\partial u} =\)
\(\displaystyle \frac{\partial z}{\partial v} =\)
5.
If
find \(\partial z/\partial u\) and \(\partial z/\partial v\text{.}\) The variables are restricted to domains on which the functions are defined.
\(\partial z/\partial u =\)
\(\partial z/\partial v =\)
6.
Let \(z=g(u,v)\) and \(u(r,s),v(r,s)\text{.}\) How many terms are there in the expression for \(\partial z/\partial r\text{?}\)
terms
\(2\)
7.
Let \(W(s,t) = F(u(s,t), v(s,t))\) where
\(W_s(1,0) =\) \(W_t(1,0) =\)
8.
The radius of a right circular cone is increasing at a rate of 3 inches per second and its height is decreasing at a rate of 5 inches per second. At what rate is the volume of the cone changing when the radius is 40 inches and the height is 40 inches?
cubic inches per second
\(1675.51608191456\)
9.
In a simple electric circuit, Ohm's law states that \(V = IR\text{,}\) where V is the voltage in volts, I is the current in amperes, and R is the resistance in ohms. Assume that, as the battery wears out, the voltage decreases at 0.03 volts per second and, as the resistor heats up, the resistance is increasing at 0.02 ohms per second. When the resistance is 100 ohms and the current is 0.02 amperes, at what rate is the current changing?
amperes per second
\(0.000304\)
10.
Suppose \(z = x^{2} \sin y\text{,}\) \(x = 2 s^{2} + 1 t^{2}\text{,}\) \(y = 6 s t\text{.}\)
A. Use the chain rule to find \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\) as functions of x, y, s and t.
\(\frac{\partial z}{\partial s} =\)
\(\frac{\partial z}{\partial t} =\)
B. Find the numerical values of \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\) when \(\left( s , t \right) = \left( 3 , 3 \right)\text{.}\)
\(\frac{\partial z}{\partial s} \left( 3 , 3 \right) =\)
\(\frac{\partial z}{\partial t} \left( 3 , 3 \right) =\)
11.
Find the indicated derivative. In each case, state the version of the Chain Rule that you are using.
\(\frac{df}{dt}\text{,}\) if \(f(x,y) = 2x^2y\text{,}\) \(x=\cos(t)\text{,}\) and \(y=\ln(t)\text{.}\)
\(\frac{\partial f}{\partial w}\text{,}\) if \(f(x,y) = 2x^2y\text{,}\) \(x=w+z^2\text{,}\) and \(y=\frac{2z+1}{w}\)
\(\frac{\partial f}{\partial v}\text{,}\) if \(f(x,y,z) = 2x^2y+z^3\text{,}\) \(x=uv+2w\text{,}\) \(y=w2^vu^3\text{,}\) and \(z = u^2v\)
12.
Let \(z = u^2  v^2\) and suppose that
Find the values of \(u\) and \(v\) that correspond to \(x=0\) and \(y=2\pi/3\text{.}\)

Use the Chain Rule to find the general partial derivatives
\begin{equation*} \frac{\partial z}{\partial x} \ \mbox{and} \ \frac{\partial z}{\partial y} \end{equation*}and then determine both \(\frac{\partial z}{\partial x}\bigm_{(0, \frac{2\pi}{3})}\) and \(\frac{\partial z}{\partial y}\bigm_{(0, \frac{2\pi}{3})}\text{.}\)
13.
Suppose that \(T = x^2 + y^2  2z\) where
Construct a tree diagram representing the dependencies among the variables.

Apply the chain rule to find the partial derivatives
\begin{equation*} \frac{\partial T}{\partial\rho}, \frac{\partial T}{\partial\phi}, \ \mbox{and} \ \frac{\partial T}{\partial\theta}. \ \end{equation*}
14.
Suppose that the temperature on a metal plate is given by the function \(T\) with
where the temperature is measured in degrees Fahrenheit and \(x\) and \(y\) are each measured in feet. Now suppose that an ant is walking on the metal plate in such a way that it walks in a straight line from the point \((1,4)\) to the point \((5,6)\text{.}\)
Find parametric equations \((x(t),y(t))\) for the ant's coordinates as it walks the line from \((1,4)\) to \((5,6)\text{.}\)
What can you say about \(\frac{dx}{dt}\) and \(\frac{dy}{dt}\) for every value of \(t\text{?}\)
Determine the instantaneous rate of change in temperature with respect to \(t\) that the ant is experiencing at the moment it is halfway from \((1,4)\) to \((5,6)\text{,}\) using your parametric equations for \(x\) and \(y\text{.}\) Include units on your answer.
15.
There are several proposed formulas to approximate the surface area of the human body. One model^{ 1 } uses the formula
where \(A\) is the surface area in square meters, \(h\) is the height in centimeters, and \(w\) is the weight in kilograms.
Since a person's height \(h\) and weight \(w\) change over time, \(h\) and \(w\) are functions of time \(t\text{.}\) Let us think about what is happening to a child whose height is \(60\) centimeters and weight is \(9\) kilograms. Suppose, furthermore, that \(h\) is increasing at an instantaneous rate of 20 centimeters per year and \(w\) is increasing at an instantaneous rate of \(5\) kg per year.
Determine the instantaneous rate at which the child's surface area is changing at this point in time.
16.
Let \(z = f(x,y) = 50  (x+1)^2  (y+3)^2\) and \(z = h(x,y) = 24  2x  6y\text{.}\)
Suppose a person is walking on the surface \(z = f(x,y)\) in such a way that she walks the curve which is the intersection of \(f\) and \(h\text{.}\)
Show that \(x(t) = 4 \cos(t)\) and \(y(t) = 4 \sin(t)\) is a parameterization of the “shadow” in the \(xy\)plane of the curve that is the intersection of the graphs of \(f\) and \(h\text{.}\)
Use the parameterization from part (a) to find the instantaneous rate at which her height is changing with respect to time at the instant \(t = 2\pi/3\text{.}\)
17.
The voltage \(V\) (in volts) across a circuit is given by Ohm's Law: \(V = IR\text{,}\) where \(I\) is the current (in amps) in the circuit and \(R\) is the resistance (in ohms). Suppose we connect two resistors with resistances \(R_1\) and \(R_2\) in parallel as shown in Figure 10.5.5. The total resistance \(R\) in the circuit is then given by
Assume that the current, \(I\text{,}\) and the resistances, \(R_1\) and \(R_2\text{,}\) are changing over time, \(t\text{.}\) Use the Chain Rule to write a formula for \(\frac{dV}{dt}\text{.}\)
Suppose that, at some particular point in time, we measure the current to be 3 amps and that the current is increasing at \(\frac{1}{10}\) amps per second, while resistance \(R_1\) is 2 ohms and decreasing at the rate of 0.2 ohms per second and \(R_2\) is 1 ohm and increasing at the rate of \(0.5\) ohms per second. At what rate is the voltage changing at this point in time?