Consider driving an off-road 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 off-road vehicle, as seen from above, with a vector-valued 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 13.5.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 off-road 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{.}\)
Subsection13.5.1Multivariable Chain Rule, Part I
Theorem13.5.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
recall that the derivative notation is deliberately chosen to reflect their fraction-like properties. A similar effect is seen in Theorem 13.5.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 13.5.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 off-road 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.
Example13.5.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.
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
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 rate-of-change 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.
Example13.5.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 :
By knowing certain rates-of-change 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.
Example13.5.7.Applying the Multivariable Chain Rule.
Consider the surface \(z=x^2+y^2-xy\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.
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 13.5.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 13.5.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{.}\)
Theorem13.5.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
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
Example13.5.10.Using the Multivariable Chain Rule, Part II.
Let \(z=x^2y+x\text{,}\)\(x=s^2+3t\) and \(y=2s-t\text{.}\) Find \(\frac{\partial z}{\partial s}\) and \(\frac{\partial z}{\partial t}\text{,}\) and evaluate each when \(s=1\) and \(t=2\text{.}\)
Solution.
Following Theorem 13.5.9, we compute the following partial derivatives:
Example13.5.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{.}\)
Solution.
Following Theorem 13.5.9, we compute the following partial derivatives:
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^2y-xy^3=3\text{.}\) We learned to use the following steps to find \(\frac{dy}{dx}\text{:}\)
Instead of using this method, consider \(z=x^2y-xy^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
Note how our solution for \(\frac{dy}{dx}\) in Equation (13.5.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.
Theorem13.5.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
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.
Solution.
Let \(f(x,y) = \sin(x^2y^2)+y^3-x-y\text{;}\) the implicitly defined function above is equivalent to \(f(x,y)=0\text{.}\) We find \(\frac{dy}{dx}\) by applying Theorem 13.5.12. We find
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
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{.}\)
Example13.5.15.Implicit Differentiation with three variables.
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{.}\)
Solution.
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 Equation (13.5.3) with respect to \(x\text{:}\)
For the \(y\) derivative, we will use the result given above. Setting \(f(x,y,z) = x^2yz^3-\sin(x-3z)+4xy^2-3yz\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
\begin{equation*}
z = g(3,0)+g_x(3,0)(x-3)+g_y(3,0)(y-0) = 1+\frac13(x-3)-2y\text{.}
\end{equation*}
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 13.6. In doing so, we’ll see how the Multivariable Chain Rule informs our understanding of these directional derivatives.
Exercises13.5.3Exercises
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
\(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 7–12.
13.
\(\ds z=3x+4y\text{,}\)\(x=t^2\text{,}\)\(y=2t\)
14.
Given \(z=x^2-y^2\text{,}\)\(x=t\text{,}\) and \(y=t^2-1\text{,}\) at what values of \(t\) does \(\lz{z}{t}=0\text{?}\)
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{?}\)
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.