# Section12.5The Multivariable Chain Rule¶ permalink

The Chain Rule, as learned in Section 2.5, states that $\ds \frac{d}{dx}\Big(f\big(g(x)\big)\Big) = \fp\big(g(x)\big)g'(x)\text{.}$ If $t=g(x)\text{,}$ we can express the Chain Rule as \begin{equation*} \frac{df}{dx} = \frac{df}{dt}\frac{dt}{dx}. \end{equation*}

In this section we extend the Chain Rule to functions of more than one variable.

It is good to understand what the situation of $z=f(x,y)\text{,}$ $x=g(t)$ and $y=h(t)$ describes. We know that $z=f(x,y)$ describes a surface; we also recognize that $x=g(t)$ and $y=h(t)$ are parametric equations for a curve in the $x$-$y$ plane. Combining these together, we are describing a curve that lies on the surface described by $f\text{.}$ The parametric equations for this curve are $x=g(t)\text{,}$ $y=h(t)$ and $z=f\big(g(t),h(t)\big)\text{.}$

Consider Figure 12.5.2 in which a surface is drawn, along with a dashed curve in the $x$-$y$ plane. Restricting $f$ to just the points on this circle gives the curve shown on the surface. 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}$ gives the rate at which the object rises/falls.

We now practice applying the Multivariable Chain Rule.

##### Example12.5.3Using the Multivariable Chain Rule

Let $z=x^2y+x\text{,}$ where $x=\sin(t)$ and $y=e^{5t}\text{.}$ Find $\ds \frac{dz}{dt}$ using the Chain Rule.

Solution

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) .$ Applying the Chain and Product Rules, we have \begin{equation*} \frac{dz}{dt} = 2\sin(t) \cos(t) \, e^{5t}+ 5\sin^2(t) \,e^{5t}+\cos(t) , \end{equation*} 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 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.

##### Example12.5.4Applying the Multivarible 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 : \begin{equation*} \frac{\partial z}{\partial x} = 5,\qquad \frac{\partial z}{\partial y}=-2,\qquad \frac{dx}{dt}=3\qquad \text{ and } \qquad \frac{dy}{dt}=7. \end{equation*}

Find $\frac{dz}{dt}$ at time $t_0\text{.}$

Solution

We next apply the Chain Rule to solve a max/min problem.

##### Example12.5.5Applying 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.

Solution

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{.}$

##### Example12.5.8Using the Multivarible 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
##### Example12.5.9Using the Multivarible 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

# Subsection12.5.1Implicit 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^2y-xy^3=3\text{.}$ We learned to use the following steps to find $\frac{dy}{dx}\text{:}$ \begin{align*} \frac{d}{dx}\Big(x^2y-xy^3\big) \amp = \frac{d}{dx}\Big(3\Big)\\ 2xy + x^2\frac{dy}{dx}-y^3-3xy^2\frac{dy}{dx} \amp = 0\\ \frac{dy}{dx} = -\frac{2xy-y^3}{x^2-3xy^2}. \end{align*}

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 $$\frac{dz}{dx} = \frac{\partial z}{\partial x}\frac{dx}{dx}+\frac{\partial z}{\partial y}\frac{dy}{dx}. \label{eq_mchain1}\tag{12.5.1}$$

Since $z$ is constant (in our example, $z=3$), $\frac{dz}{dx} = 0\text{.}$ We also know $\frac{dx}{dx} = 1\text{.}$ Equation (12.5.1) becomes \begin{align*} 0 \amp = \frac{\partial z}{\partial x}(1) + \frac{\partial z}{\partial y}\frac{dy}{dx} \Rightarrow\\ \frac{dy}{dx} \amp = -\frac{\partial z}{\partial x}\Big/\frac{\partial z}{\partial y}\\ \amp = -\frac{\,f_x\,}{f_y}. \end{align*}

Note how our solution for $\frac{dy}{dx}$ in Equation <<Unresolved xref, reference "eq_mchain2"; check spelling or use "provisional" attribute>> is just the partial derivative of $z$ with respect to $x\text{,}$ divided by the partial derivative of $z$ with respect to $y\text{.}$

We state the above as a theorem.

We practice using Theorem 12.5.10 by applying it to a problem from Section 2.6.

##### Example12.5.11Implicit 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.7 of Section 2.6, where the solution took about a full page to find.

Solution

# Subsection12.5.2Exercises

Terms and Concepts

In the following exercises, functions $z=f(x,y)\text{,}$ $x=g(t)$ and $y=h(t)$ are given.

1. Use the Multivariable Chain Rule to compute $\lz{z}{t}\text{.}$

2. Evaluate $\lz{z}{t}$ at the indicated $t$-value.

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 12.5.2.712.5.2.12.

In the following exercises, functions $z=f(x,y)\text{,}$ $x=g(s,t)$ and $y=h(s,t)$ are given.

1. Use the Multivariable Chain Rule to compute $\frac{\partial z}{\partial s}$ and $\frac{\partial z}{\partial t}\text{.}$

2. Evaluate $\frac{\partial z}{\partial s}$ and $\frac{\partial z}{\partial t}$ at the indicated $s$ and $t$ values.

In the following exercises, find $\lz{y}{x}$ using Implicit Differentiation and Theorem 12.5.10.

In the following exercises, find $\lz{z}{t}\text{,}$ or $\plz{z}{s}$ and $\plz{z}{t}\text{,}$ using the supplied information.