Skip to main content
\(\require{cancel}\newcommand{\highlight}[1]{{\color{blue}{#1}}} \newcommand{\apex}{A\kern -1pt \lower -2pt\mbox{P}\kern -4pt \lower .7ex\mbox{E}\kern -1pt X} \newcommand{\colorlinecolor}{blue!95!black!30} \newcommand{\bwlinecolor}{black!30} \newcommand{\thelinecolor}{\colorlinecolor} \newcommand{\colornamesuffix}{} \newcommand{\linestyle}{[thick, \thelinecolor]} \newcommand{\bmx}[1]{\left[\hskip -3pt\begin{array}{#1} } \newcommand{\emx}{\end{array}\hskip -3pt\right]} \newcommand{\ds}{\displaystyle} \newcommand{\fp}{f'} \newcommand{\fpp}{f''} \newcommand{\lz}[2]{\frac{d#1}{d#2}} \newcommand{\lzn}[3]{\frac{d^{#1}#2}{d#3^{#1}}} \newcommand{\lzo}[1]{\frac{d}{d#1}} \newcommand{\lzoo}[2]{{\frac{d}{d#1}}{\left(#2\right)}} \newcommand{\lzon}[2]{\frac{d^{#1}}{d#2^{#1}}} \newcommand{\lzoa}[3]{\left.{\frac{d#1}{d#2}}\right|_{#3}} \newcommand{\plz}[2]{\frac{\partial#1}{\partial#2}} \newcommand{\plzoa}[3]{\left.{\frac{\partial#1}{\partial#2}}\right|_{#3}} \newcommand{\inflim}[1][n]{\lim\limits_{#1 \to \infty}} \newcommand{\infser}[1][1]{\sum_{n=#1}^\infty} \newcommand{\Fp}{F\primeskip'} \newcommand{\Fpp}{F\primeskip''} \newcommand{\yp}{y\primeskip'} \newcommand{\gp}{g\primeskip'} \newcommand{\dx}{\Delta x} \newcommand{\dy}{\Delta y} \newcommand{\ddz}{\Delta z} \newcommand{\thet}{\theta} \newcommand{\norm}[1]{\left\lVert#1\right\rVert} \newcommand{\vnorm}[1]{\left\lVert\vec #1\right\rVert} \newcommand{\snorm}[1]{\left|\left|\ #1\ \right|\right|} \newcommand{\la}{\left\langle} \newcommand{\ra}{\right\rangle} \newcommand{\dotp}[2]{\vec #1 \cdot \vec #2} \newcommand{\proj}[2]{\text{proj}_{\,\vec #2}{\,\vec #1}} \newcommand{\crossp}[2]{\vec #1 \times \vec #2} \newcommand{\veci}{\vec i} \newcommand{\vecj}{\vec j} \newcommand{\veck}{\vec k} \newcommand{\vecu}{\vec u} \newcommand{\vecv}{\vec v} \newcommand{\vecw}{\vec w} \newcommand{\vecx}{\vec x} \newcommand{\vecy}{\vec y} \newcommand{\vrp}{\vec r\, '} \newcommand{\vsp}{\vec s\, '} \newcommand{\vrt}{\vec r(t)} \newcommand{\vst}{\vec s(t)} \newcommand{\vvt}{\vec v(t)} \newcommand{\vat}{\vec a(t)} \newcommand{\px}{\partial x} \newcommand{\py}{\partial y} \newcommand{\pz}{\partial z} \newcommand{\pf}{\partial f} \newcommand{\mathN}{\mathbb{N}} \newcommand{\zerooverzero}{\ds \raisebox{8pt}{\text{``\ }}\frac{0}{0}\raisebox{8pt}{\textit{ ''}}} \newcommand{\deriv}[2]{\myds\frac{d}{dx}\left(#1\right)=#2} \newcommand{\myint}[2]{\myds\int #1\ dx= {\ds #2}} \DeclareMathOperator{\sech}{sech} \DeclareMathOperator{\csch}{csch} \newcommand{\primeskip}{\hskip.75pt} \newcommand{\plotlinecolor}{blue} \newcommand{\colorone}{blue} \newcommand{\colortwo}{red} \newcommand{\coloronefill}{blue!15!white} \newcommand{\colortwofill}{red!15!white} \newcommand{\abs}[1]{\left\lvert #1\right\rvert} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section12.5The Multivariable Chain Rule

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.

<<SVG image is unavailable, or your browser cannot render it>>

Figure12.5.2Understanding the application of the Multivariable Chain Rule.

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.


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{.}\)


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.


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{.}\)

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{.}\)


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 \begin{equation} \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} \end{equation}

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.



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

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.