Section 14.2 The Multivariable Chain Rule
Consider driving an offroad vehicle along a dirt road. As you drive, your elevation likely changes. What factors determine how quickly your elevation rises and falls? After some thought, generally one recognizes that one's velocity (speed and direction) and the terrain influence your rise and fall.
One can represent the terrain as the surface defined by a multivariable function \(f(x,y)\text{;}\) one can represent the path of the offroad vehicle, as seen from above, with a vectorvalued function \(\vec r(t) = \langle x(t), y(t)\rangle\text{;}\) the velocity of the vehicle is thus \(\vrp(t) = \langle x'(t),y'(t)\rangle\text{.}\)
Consider FigureÂ 14.2.1 in which a surface \(z=f(x,y)\) is drawn, along with a dashed curve in the \(xy\)plane. Restricting \(f\) to just the points on this circle gives the curve shown on the surface (i.e., â€śthe path of the offroad vehicle.â€ť) The derivative \(\frac{df}{dt}\) gives the instantaneous rate of change of \(f\) with respect to \(t\text{.}\) If we consider an object traveling along this path, \(\frac{df}{dt}=\frac{dz}{dt}\) gives the rate at which the object rises/falls (i.e., â€śthe rate of elevation changeâ€ť of the vehicle.) Conceptually, the Multivariable Chain Rule combines terrain and velocity information properly to compute this rate of elevation change.
Abstractly, let \(z\) be a function of \(x\) and \(y\text{;}\) that is, \(z=f(x,y)\) for some function \(f\text{,}\) and let \(x\) and \(y\) each be functions of \(t\text{.}\) By choosing a \(t\)value, \(x\) and \(y\)values are determined, which in turn determine \(z\text{:}\) this defines \(z\) as a function of \(t\text{.}\) The Multivariable Chain Rule gives a method of computing \(\frac{dz}{dt}\text{.}\)
Subsection 14.2.1 Multivariable Chain Rule, Part I
Theorem 14.2.3. Multivariable Chain Rule, Part I.
Let \(z=f(x,y)\text{,}\) \(x=g(t)\) and \(y=h(t)\text{,}\) where \(f\text{,}\) \(g\) and \(h\) are differentiable functions. Then \(z = f(x,y) = f\big(g(t),h(t)\big)\) is a function of \(t\text{,}\) and
The Chain Rule of SectionÂ 2.5 states that
If \(t=g(x)\text{,}\) we can express the Chain Rule as
recall that the derivative notation is deliberately chosen to reflect their fractionlike properties. A similar effect is seen in TheoremÂ 14.2.3. In the second line of equations, one can think of the \(dx\) and \(\partial x\) as â€śsort ofâ€ť canceling out, and likewise with \(dy\) and \(\partial y\text{.}\)
Notice, too, the third line of equations in TheoremÂ 14.2.3. The vector \(\langle\,f_x,f_y\rangle\) contains information about the surface (terrain); the vector \(\langle x',y'\rangle\) can represent velocity. In the context measuring the rate of elevation change of the offroad vehicle, the Multivariable Chain Rule states it can be found through a product of terrain and velocity information.
We now practice applying the Multivariable Chain Rule.
Example 14.2.5. Using the Multivariable Chain Rule.
Let \(z=x^2y+x\text{,}\) where \(x=\sin(t)\) and \(y=e^{5t}\text{.}\) Find \(\frac{dz}{dt}\) using the Chain Rule.
Following TheoremÂ 14.2.3, we find
Applying the theorem, we have
This may look odd, as it seems that \(\frac{dz}{dt}\) is a function of \(x\text{,}\) \(y\) and \(t\text{.}\) Since \(x\) and \(y\) are functions of \(t\text{,}\) \(\frac{dz}{dt}\) is really just a function of \(t\text{,}\) and we can replace \(x\) with \(\sin(t)\) and \(y\) with \(e^{5t}\text{:}\)
The previous example can make us wonder: if we substituted for \(x\) and \(y\) at the end to show that \(\frac{dz}{dt}\) is really just a function of \(t\text{,}\) why not substitute before differentiating, showing clearly that \(z\) is a function of \(t\text{?}\)
That is, \(z = x^2y+x = (\sin(t) )^2e^{5t}+\sin(t) \text{.}\) Applying the Chain and Product Rules, we have
which matches the result from the example.
This may now make one wonder â€śWhat's the point? If we could already find the derivative, why learn another way of finding it?â€ť In some cases, applying this rule makes deriving simpler, but this is hardly the power of the Chain Rule. Rather, in the case where \(z=f(x,y)\text{,}\) \(x=g(t)\) and \(y=h(t)\text{,}\) the Chain Rule is extremely powerful when we do not know what \(f\text{,}\) \(g\) and/or \(h\) are. It may be hard to believe, but often in â€śthe real worldâ€ť we know rateofchange information (i.e., information about derivatives) without explicitly knowing the underlying functions. The Chain Rule allows us to combine several rates of change to find another rate of change. The Chain Rule also has theoretic use, giving us insight into the behavior of certain constructions (as we'll see in the next section).
We demonstrate this in the next example.
Example 14.2.6. Applying the Multivariable Chain Rule.
An object travels along a path on a surface. The exact path and surface are not known, but at time \(t=t_0\) it is known that :
Find \(\frac{dz}{dt}\) at time \(t_0\text{.}\)
The Multivariable Chain Rule states that
By knowing certain ratesofchange information about the surface and about the path of the particle in the \(xy\)plane, we can determine how quickly the object is rising/falling.
We next apply the Chain Rule to solve a max/min problem.
Example 14.2.7. Applying the Multivariable Chain Rule.
Consider the surface \(z=x^2+y^2xy\text{,}\) a paraboloid, on which a particle moves with \(x\) and \(y\) coordinates given by \(x=\cos(t)\) and \(y=\sin(t)\text{.}\) Find \(\frac{dz}{dt}\) when \(t=0\text{,}\) and find where the particle reaches its maximum/minimum \(z\)values.
It is straightforward to compute
Combining these according to the Chain Rule gives:
When \(t=0\text{,}\) \(x=1\) and \(y=0\text{.}\) Thus \(\ds\frac{dz}{dt} = (2)(0)+ (1)(1) = 1\text{.}\) When \(t=0\text{,}\) the particle is moving down, as shown in FigureÂ 14.2.8.
To find where \(z\)value is maximized/minimized on the particle's path, we set \(\frac{dz}{dt}=0\) and solve for \(t\text{:}\)
We can use the First Derivative Test to find that on \([0,2\pi]\text{,}\) \(z\) has reaches its absolute minimum at \(t=\pi/4\) and \(5\pi/4\text{;}\) it reaches its absolute maximum at \(t=3\pi/4\) and \(7\pi/4\text{,}\) as shown in FigureÂ 14.2.8.
We can extend the Chain Rule to include the situation where \(z\) is a function of more than one variable, and each of these variables is also a function of more than one variable. The basic case of this is where \(z=f(x,y)\text{,}\) and \(x\) and \(y\) are functions of two variables, say \(s\) and \(t\text{.}\)
Theorem 14.2.9. Multivariable Chain Rule, Part II.

Let \(z=f(x,y)\text{,}\) \(x=g(s,t)\) and \(y=h(s,t)\text{,}\) where \(f\text{,}\) \(g\) and \(h\) are differentiable functions. Then \(z\) is a function of \(s\) and \(t\text{,}\) and
\(\displaystyle \frac{\partial z}{\partial s} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial s} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial s}\)
\(\displaystyle \frac{\partial z}{\partial t} = \frac{\partial f}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial f}{\partial y}\frac{\partial y}{\partial t}\)

Let \(z = f(x_1,x_2,\ldots,x_m)\) be a differentiable function of \(m\) variables, where each of the \(x_i\) is a differentiable function of the variables \(t_1,t_2,\ldots,t_n\text{.}\) Then \(z\) is a function of the \(t_i\text{,}\) and
\begin{equation*} \frac{\partial z}{\partial t_i} = \frac{\partial f}{\partial x_1}\frac{\partial x_1}{\partial t_i} + \frac{\partial f}{\partial x_2}\frac{\partial x_2}{\partial t_i} + \cdots + \frac{\partial f}{\partial x_m}\frac{\partial x_m}{\partial t_i}\text{.} \end{equation*}
Example 14.2.10. Using the Multivariable Chain Rule, Part II.
Let \(z=x^2y+x\text{,}\) \(x=s^2+3t\) and \(y=2st\text{.}\) Find \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\text{,}\) and evaluate each when \(s=1\) and \(t=2\text{.}\)
Following TheoremÂ 14.2.9, we compute the following partial derivatives:
Thus
When \(s=1\) and \(t=2\text{,}\) \(x= 7\) and \(y= 0\text{,}\) so
Example 14.2.11. Using the Multivariable Chain Rule, Part II.
Let \(w = xy+z^2\text{,}\) where \(x= t^2e^s\text{,}\) \(y= t\cos(s)\text{,}\) and \(z=s\sin(t)\text{.}\) Find \(\frac{\partial w}{\partial t}\) when \(s=0\) and \(t=\pi\text{.}\)
Following TheoremÂ 14.2.9, we compute the following partial derivatives:
Thus
When \(s=0\) and \(t=\pi\text{,}\) we have \(x=\pi^2\text{,}\) \(y=\pi\) and \(z=0\text{.}\) Thus
Subsection 14.2.2 Implicit Differentiation
We studied finding \(\frac{dy}{dx}\) when \(y\) is given as an implicit function of \(x\) in detail in SectionÂ 2.6. We find here that the Multivariable Chain Rule gives a simpler method of finding \(\frac{dy}{dx}\text{.}\)
For instance, consider the implicit function \(x^2yxy^3=3\text{.}\) We learned to use the following steps to find \(\frac{dy}{dx}\text{:}\)
Instead of using this method, consider \(z=x^2yxy^3\text{.}\) The implicit function above describes the level curve \(z=3\text{.}\) Considering \(x\) and \(y\) as functions of \(x\text{,}\) the Multivariable Chain Rule states that
Since \(z\) is constant (in our example, \(z=3\)), \(\frac{dz}{dx} = 0\text{.}\) We also know \(\frac{dx}{dx} = 1\text{.}\) Equation (14.2.1) becomes
Note how our solution for \(\frac{dy}{dx}\) in Equation (14.2.2) is just the partial derivative of \(z\) with respect to \(x\text{,}\) divided by the partial derivative of \(z\) with respect to \(y\text{,}\) all multiplied by \((1)\text{.}\)
We state the above as a theorem.
Theorem 14.2.12. Implicit Differentiation.
Let \(f\) be a differentiable function of \(x\) and \(y\text{,}\) where \(f(x,y)=c\) defines \(y\) as an implicit function of \(x\text{,}\) for some constant \(c\text{.}\) Then
We practice using TheoremÂ 14.2.12 by applying it to a problem from SectionÂ 2.6.
Example 14.2.13. Implicit Differentiation.
Given the implicitly defined function \(\sin(x^2y^2)+y^3=x+y\text{,}\) find \(y'\text{.}\) Note: this is the same problem as given in ExampleÂ 2.6.8 of SectionÂ 2.6, where the solution took about a full page to find.
Let \(f(x,y) = \sin(x^2y^2)+y^3xy\text{;}\) the implicitly defined function above is equivalent to \(f(x,y)=0\text{.}\) We find \(\frac{dy}{dx}\) by applying TheoremÂ 14.2.12. We find
so
which matches our solution from ExampleÂ 2.6.8.
We can also do implicit differentiation for functions of three variables. In the same way that a level curve \(f(x,y)=c\) is used to implicitly define \(y\) as a function of \(x\text{,}\) a level surface \(f(x,y,z)=c\) can be viewed as implicitly defining \(z\) as a function of \(x\) and \(y\text{.}\)
Suppose the equation \(f(x,y,z)=c\text{,}\) where \(c\) is a constant, defines the function \(z=g(x,y)\text{.}\) Then we can use the chain rule to compute the derivatives of \(f(x,y,z)\) with respect to \(x\) and \(y\text{,}\) where we set \(x=x\text{,}\) \(y=y\text{,}\) and \(z=g(x,y)\text{.}\) Since \(f(x,y,z)\) is constant, we have
Solving for \(\plz{z}{x}\) gives us
and similarly,
In SubsectionÂ 13.3.2 we saw that we can use partial derivatives to determine the equation of the tangent plane to a graph \(z=f(x,y)\text{.}\) Using implicit differentiation, we can do the same for a level surface \(f(x,y,z)=c\text{.}\)
Example 14.2.15. Implicit Differentiation with three variables.
Given that the equation
defines \(z\) implicitly as a function of \(x\) and \(y\text{,}\) compute \(\plz{z}{x}\) and \(\plz{z}{y}\) using implicit differentiation. Then, determine the equation of the tangent plane to the surface at the point \((3,0,1)\text{.}\)
There are two ways to proceed. One is to use implicit differentiation as before, but using partial derivatives. Whenever we differentiate a function of \(z\text{,}\) we multiply by the appropriate partial derivative of \(z\text{.}\) The other option is to use the formula derived above. We will use the first method for the \(x\) derivative, and the second for \(y\text{.}\)
We first take the partial derivative of both sides of (14.2.3) with respect to \(x\text{:}\)
Note that we treated \(y\) as a constant, since the derivative is with respect to \(x\text{.}\) Next, we collect terms:
Lastly, we solve for \(\plz{z}{x}\text{:}\)
For the \(y\) derivative, we will use the result given above. Setting \(f(x,y,z) = x^2yz^3\sin(x3z)+4xy^23yz\text{,}\) we have \(\plz{z}{y} = \frac{f_y(x,y,z)}{f_z(x,y,z)}\text{.}\) Therefore,
The second method certainly seems simpler! The reader is invited to try each part with the other method, and compare answers.
Finally, we consider the problem of the tangent plane. First, we check that the point \((3,0,1)\) is indeed on the surface: \(f(3,0,1)=0\text{,}\) as required. Next we note that \(z=1\) is given to us from this point. So if \(f(x,y,z)=c\) implicitly defines the graph \(z=g(x,y)\text{,}\) then we must have \(g(3,0)=1\text{.}\) Next, we have
The equation of the tangent plane is therefore
In SectionÂ 13.3 we learned how partial derivatives give certain instantaneous rate of change information about a function \(f(x,y)\text{.}\) In that section, we measured the rate of change of \(f\) by holding one variable constant and letting the other vary (such as, holding \(y\) constant and letting \(x\) vary gives \(f_x\)). We can visualize this change by considering the surface defined by \(f\) at a point and moving parallel to the \(x\)axis.
What if we want to move in a direction that is not parallel to a coordinate axis? Can we still measure instantaneous rates of change? Yes; we find out how in SectionÂ 14.3. In doing so, we'll see how the Multivariable Chain Rule informs our understanding of these directional derivatives.
Exercises 14.2.3 Exercises
Terms and Concepts
1.
Let a level curve of \(z=f(x,y)\) be described by \(x=g(t)\text{,}\) \(y = h(t)\text{.}\) Explain why \(\frac{dz}{dt}=0\text{.}\)
2.
Fill in the blank: The single variable Chain Rule states \(\ds\frac{d}{dx}\Big(f\big(g(x)\big)\Big) = \fp\big(g(x)\big)\cdot\).
3.
Fill in the blank: The Multivariable Chain Rule states
\(\ds\frac{df}{dt}=\frac{\partial f}{\partial x}\cdot\) \(+\) \(\cdot\frac{dy}{dt}\text{.}\)
4.
If \(z=f(x,y)\text{,}\) where \(x=g(t)\) and \(y=h(t)\text{,}\) we can substitute and write \(z\) as an explicit function of \(t\text{.}\)
T/F: Using the Multivariable Chain Rule to find \(\frac{dz}{dt}\) is sometimes easier than first substituting and then taking the derivative.
5.
T/F: The Multivariable Chain Rule is only useful when all the related functions are known explicitly.
6.
The Multivariable Chain Rule allows us to compute implicit derivatives easily by just computing two derivatives.
Problems
Exercise Group.
Given the functions \(z=f(x,y)\text{,}\) \(x=g(t)\) and \(y=h(t)\text{:}\)
Use the Multivariable Chain Rule to compute \(\lz{z}{t}\text{.}\)
Evaluate \(\lz{z}{t}\) at the indicated \(t\)value.
7.
\(z=3x+4y\text{,}\) \(x=t^2\text{,}\) \(y=2t\text{;}\) \(t=1\)
8.
\(z=x^2y^2\text{,}\) \(x=t\text{,}\) and \(y=t^21\text{;}\) \(t=1\)
9.
\(\ds z=5x+2y\text{,}\) \(x=2\cos(t) +1\text{,}\) \(y=\sin(t) 3\text{;}\) \(t=\pi/4\)
10.
\(z=\frac{x}{y^2+1}\text{,}\) \(x=\cos(t)\text{,}\) and \(y=\sin(t)\text{;}\) \(t=\pi/2\)
11.
\(\ds z=x^2+2y^2\text{,}\) \(x=\sin(t)\text{,}\) \(y=3\sin(t)\text{;}\) \(t=\pi/4\)
12.
\(z=\cos(x) \sin(y)\text{,}\) \(x=\pi t\text{,}\) and \(y=2\pi t+\pi/2\text{;}\) \(t=3\)
Exercise Group.
In the following exercises, functions \(z=f(x,y)\text{,}\) \(x=g(t)\) and \(y=h(t)\) are given. Find the values of \(t\) where \(\frac{dz}{dt}=0\text{.}\) Note: these are the same surfaces/curves as found in ExercisesÂ 14.2.3.7â€“14.2.3.12.
13.
\(\ds z=3x+4y\text{,}\) \(x=t^2\text{,}\) \(y=2t\)
14.
Given \(z=x^2y^2\text{,}\) \(x=t\text{,}\) and \(y=t^21\text{,}\) at what values of \(t\) does \(\lz{z}{t}=0\text{?}\)
15.
\(\ds z=5x+2y\text{,}\) \(x=2\cos(t) +1\text{,}\) \(y=\sin(t) 3\)
16.
Given \(z=\frac{x}{y^2+1}\text{,}\) \(x=\cos(t)\text{,}\) and \(y=\sin(t)\text{,}\) at what values of \(t\) in \([0,2\pi)\) does \(\lz{z}{t}=0\text{?}\)
17.
\(\ds z=x^2+2y^2\text{,}\) \(x=\sin(t)\text{,}\) \(y=3\sin(t)\)
18.
Given \(z=\cos(x) \sin(y)\text{,}\) \(x=\pi t\text{,}\) and \(y=2\pi t+\pi/2\text{,}\) at what values of \(t\) in \([0,2)\) does \(\lz{z}{t}=0\text{?}\)
Exercise Group.
Given the functions \(z=f(x,y)\text{,}\) \(x=g(s,t)\) and \(y=h(s,t)\text{:}\)
Use the Multivariable Chain Rule to compute \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\text{.}\)
Evaluate \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\) at the indicated \(s\) and \(t\) values.
19.
\(\ds z=x^2y\text{,}\) \(x=st\text{,}\) \(y=2s+4t\text{;}\) \(s=1\text{,}\) \(t=0\)
20.
\(z=\cos\mathopen{}\left(\pi x+\frac{\pi}2y\right)\mathclose{}\text{,}\) \(x=st^2\text{,}\) and \(y=s^2t\text{;}\) \(s=1\text{,}\) \(t=0\)
21.
\(z=x^2+y^2\text{,}\) \(x=s\cos(t)\text{,}\) and \(y=s\sin(t)\text{;}\) \(s=2\text{,}\) \(t=\pi/4\)
22.
\(z=e^{(x^2+y^2)}\text{,}\) \(x=t\text{,}\) and \(y=st^2\text{,}\) \(s=1\text{,}\) \(t=1\)
Exercise Group.
The given equation defines \(y\) implicitly as a function of \(x\text{.}\) Find \(\lz{y}{x}\) using Implicit Differentiation and TheoremÂ 14.2.12.
23.
\(x^2\tan(y) = 50\)
24.
\(\left(3x^2+2y^3\right)^4=2\)
25.
\(\ds \frac{x^2+y}{x+y^2}=17\)
26.
\(\ln\mathopen{}\left(x^2+xy+y^2\right)\mathclose{}=1\)
Exercise Group.
Find \(\lz{z}{t}\text{,}\) or \(\plz{z}{s}\) and \(\plz{z}{t}\text{,}\) using the supplied information.
27.
\(\ds\frac{\partial z}{\partial x} = 2\text{,}\)\(\ds\frac{\partial z}{\partial y} = 1\text{,}\)\(\ds\frac{dx}{dt} = 4\text{,}\)\(\ds\frac{dy}{dt} = 5\)
28.
\(\plz{z}{x} = 1\text{,}\) \(\plz{z}{y} = 3\text{,}\) \(\lz{x}{t} = 6\text{,}\) and \(\lz{y}{t} = 2\text{.}\)
29.
\(\ds\frac{\partial z}{\partial x} = 4\text{,}\)\(\ds\frac{\partial z}{\partial y} = 9\text{,}\)
\(\ds\frac{\partial x}{\partial s} = 5\text{,}\)\(\ds\frac{\partial x}{\partial t} = 7\text{,}\)\(\ds \frac{\partial y}{\partial s} = 2\text{,}\)\(\ds \frac{\partial y}{\partial t} = 6\)
30.
\(\plz{z}{x} = 2\text{,}\) \(\plz{z}{y} = 1\text{,}\) \(\plz{x}{s} = 2\text{,}\) \(\plz{x}{t} = 3\text{,}\) \(\plz{y}{s} = 2\) and \(\plz{y}{t} = 1\)