What is the multivariable chain rule?
And is it different than the chain rule we learned back in calculus 1?
Well, truth be told, there are several versions of the chain rule, but they are all extremely similar and super easy to use.
Chain Rule Of Differentiation
We learned that the chain rule allows us to differentiate a composite function in single variable calculus.
Recall, a composite function is a function that is inside another function. Similar to how the milk chocolate is encompassed, or inside, the candy-coating shell of an M&M.
So, if \(f\) and \(g\) are both differentiable functions and \(F\) is the composite function defined by \(\mathrm{F}=\mathrm{f}(\mathrm{g}(\mathrm{x}))\), then \(F\) is differentiable and \(\mathrm{F}^{\prime}\) is the product:
\begin{equation}
\frac{d y}{d x}=f^{\prime}(g(x)) \cdot g^{\prime}(x)
\end{equation}
But this formula, in its current form, only works for single variable functions.
Partial Derivative Chain Rule
Therefore, we will need something similar but a bit more robust for multivariable functions.
Thankfully, we can take our current formula and make a pivotal adjustment to our notation!
\begin{equation}
\frac{d y}{d x}=f^{\prime}(g(x)) \cdot g^{\prime}(x)=\frac{d f}{d g} \cdot \frac{d g}{d x}
\end{equation}
Why is this important?
Consider the following…
If \(z = f\left( {x,y} \right)\) is a differentiable function of \(x\) and \(y\), where \(x = g\left( t \right)\) and \(y = h\left( t \right)\) are both differentiable functions of \(t\). Then \(z\) is a differentiable function of \(t\) and
\begin{equation}
\frac{d z}{d t}=\frac{\partial f}{\partial x} \frac{d x}{d t}+\frac{\partial f}{\partial y} \frac{d y}{d t}
\end{equation}
Cool!
Example – Single Variable Calculus VS Multivariable Calculus
Let’s look at the implications of this new form as it applies to the following problem.
Suppose \(z = 3{x^2} – {y^2}\) where \(x = \sin t\) and \(y = \cos t\) . Find \(\frac{{dz}}{{dt}}\)?
Well, we can use two different methods. Both are equally great, but I hope to convince you that the second method will be the preferred choice, especially when more variables become involved.
Let’s take a look.
Method #1 – Single Variable
Apply the chain rule, as was done in single-variable calculus.
If \(z = 3{x^2} – {y^2}\), \(x=\sin t\), \(y = \cos t\) , then \(z = 3{\sin ^2}t – {\cos ^2}t\)
Thus…
\begin{equation}
\begin{aligned}
&z=3(\sin t)^{2}-(\cos t)^{2} \\
&\frac{d z}{d t}=6 \sin t \cos t-2 \cos t(-\sin t) \\
&\frac{d z}{d t}=6 \sin t \cos t+2 \sin t \cos t \\
&\frac{d z}{d t}=8 \sin t \cos t
\end{aligned}
\end{equation}
Method #2 – Multivariable
Apply the chain rule for multivariable where we take partial derivatives.
\begin{equation}
\frac{d z}{d t}=\frac{\partial f}{\partial x} \frac{d x}{d t}+\frac{\partial f}{\partial y} \frac{d y}{d t}
\end{equation}If \(z = 3{x^2} – {y^2}\) where \(x = \sin t\), \(y = \cos t\), then:
\begin{equation}
\frac{\partial f}{\partial x}=f_{x}=z_{x}=6 x, \quad \frac{\partial f}{\partial y}=f_{y}=z_{y}=-2 y, \quad \frac{d x}{d t}=\cos t, \text { and } \quad \frac{d y}{d t}=-\sin t
\end{equation}Next, we have to plug into the formula and simplify.
\begin{equation}
\begin{aligned}
&\frac{d z}{d t}=\frac{\partial f}{\partial x} \frac{d x}{d t}+\frac{\partial f}{\partial y} \frac{d y}{d t} \\
&\frac{d z}{d t}=(6 x)(\cos t)+(-2 y)(-\sin t) \\
&\frac{d z}{d t}=6 x \cos t+2 y \sin t, \text { where } x=\sin t, y=\cos t, \text { then } \\
&\frac{d z}{d t}=6(\sin t) \cos t+2(\cos t) \sin t \\
&\frac{d z}{d t}=8 \sin t \cos t
\end{aligned}
\end{equation}As you can see, both methods yield the same result and can be used to check the validity of our answer.
But if there are two ways to find the derivative of a composite function, why do we need the multivariable chain rule?
Great question!
But the answer lies in asking another question…
…what would we do if our function has three, four, or more variables?
Ahh, and this is where method #2 (shown above) really shines, and cements its necessity into our ever expanding mathematical loving hearts.
Multivariable Chain Rule
Now let us consider the situation when \(z = f\left( {x,y} \right)\) but this time, each \(x\) and \(y\) is a function of two variables \(s\) and \(t\) such that \(x = g\left( {s,t} \right)\) and \(y = h\left( {s,t} \right)\).
This means that \(z\) is a function of \(s\) and \(t\), which complicates matters when trying to compute the derivative using the single-variable method.
Ergo, we do the following to help make things easier.
If \(z = f\left( {x,y} \right)\) is a differentiable function of \(x\) and \(y\), where \(x = g\left( {s,t} \right)\) and \(y = h\left( {s,t} \right)\) are differentiable functions of \(s\) and \(t\). Then…
\begin{equation}
\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} \quad \text { and } \quad \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}
\end{equation}
Example – Chain Rule For Two Independent Variables
For instance, assume \(z = 3{x^2} – {y^2}\) where \(x = s{t^2}\) and \(y = 2{s^2}t\) . Let’s find\(\frac{{\partial z}}{{\partial s}}\) and\(\frac{{\partial z}}{{\partial t}}\).
First, we will find our partial derivatives.
\begin{equation}
\begin{array}{ll}
\frac{\partial f}{\partial x}=f_{x}=z_{x}=6 x & \frac{\partial f}{\partial y}=f_{y}=z_{y}=-2 y \\
\frac{\partial x}{\partial s}=t^{2} & \frac{\partial y}{\partial s}=4 s t \\
\frac{\partial x}{\partial t}=2 s t & \frac{\partial y}{\partial t}=2 s^{2}
\end{array}
\end{equation}Next, all we have to do is plug into the respective formulas and simplify.
\begin{equation}
\begin{aligned}
&\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} \\
&\frac{\partial z}{\partial s}=(6 x)\left(t^{2}\right)+(-2 y)(4 s t) \\
&\frac{\partial z}{\partial s}=6 x t^{2}-8 y s t, \text { where } x=s t^{2} \text { and } y=2 s^{2} t, \text { then } \\
&\frac{\partial z}{\partial s}=6\left(s t^{2}\right) t^{2}-8\left(2 s^{2} t\right) s t \\
&\frac{\partial z}{\partial s}=6 s t^{4}-16 s^{3} t^{2}
\end{aligned}
\end{equation}And
\begin{equation}
\begin{aligned}
&\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} \\
&\frac{\partial z}{\partial t}=(6 x)(2 s t)+(-2 y)\left(2 s^{2}\right) \\
&\frac{\partial z}{\partial t}=12 x s t-4 y s^{2}, \text { where } x=s t^{2} \text { and } y=2 s^{2} t, \text { then } \\
&\frac{\partial z}{\partial t}=12\left(s t^{2}\right) s t-4\left(2 s^{2} t\right) s^{2} \\
&\frac{\partial z}{\partial t}=12 s^{2} t^{3}-8 s^{4} t
\end{aligned}
\end{equation}And that’s it! Using partial derivatives helps to keep things neat and straightforward.
General Formula
Now, this brings us to a more general version of the chain rule so that we can handle functions of any number of variables.
Suppose that \(u\) is a differentiable function of \(n\) variables \({x_1},{x_2}, \ldots ,{x_n}\) and each \({x_j}\) is a differentiable function of \(m\) variables \({t_1},{t_2}, \ldots ,{t_m}\). Then for each \(i = 1,2, \ldots ,m\)
\begin{equation}
\frac{\partial u}{\partial t_{i}}=\frac{\partial u}{\partial x_{1}} \frac{\partial x_{1}}{\partial t_{i}}+\frac{\partial u}{\partial x_{2}} \frac{\partial x_{2}}{\partial t_{i}}+\cdots+\frac{\partial u}{\partial x_{n}} \frac{\partial x_{n}}{\partial t_{i}}
\end{equation}
Don’t worry.
This formula may seem strange, but it’s quite easy to use. We’ll look at several examples in the following video, and I’m confident that you’ll be wielding its power in no time!
Implicit Function Theorem
But we need to discuss one more version of the chain rule, and it involves implicit differentiation!
The Implicit Function Theorem allows us to calculate the derivative implicitly all while using partial derivatives. And the greatest part is that it’s super easy to use!
Implicit Function Theorem for a function\(F\left( {x,y} \right)\).
\begin{equation}
\frac{d y}{d x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial y}}=-\frac{F_{x}}{F_{y}}
\end{equation}
Implicit Function Theorem for a function\(F\left( {x,y,z} \right)\).
\begin{equation}
\frac{\partial z}{\partial x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial z}}=-\frac{F_{x}}{F_{z}} \quad \text { and } \quad \frac{\partial z}{\partial y}=-\frac{\frac{\partial F}{\partial y}}{\frac{\partial F}{\partial z}}=-\frac{F_{y}}{F_{z}}
\end{equation}
Example
Let’s look at an example to see how this works by finding \(y’\) of \({x^3}{y^3} – 2y = x\).
As before, let’s compare our two methods – single variable vs. multivariable.
First, we will implicitly take the derivative using our single variable calculus techniques.
But now, let’s find the derivative of this same function, using the Implicit Function Theorem.
\begin{equation}
\frac{d y}{d x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial y}}=-\frac{F_{x}}{F_{y}}
\end{equation}First, we will need to collect all terms on one side, so the function is set equal to zero.
\begin{equation}
\begin{aligned}
&x^{3} y^{3}-2 y=x \\
&x^{3} y^{3}-2 y-x=0 \\
&F(x, y)=x^{3} y^{3}-2 y-x=0
\end{aligned}
\end{equation}Now, we will find our partial derivatives.
\begin{equation}
F_{x}=3 x^{2} y^{3}-1 \quad \text { and } \quad F_{y}=3 x^{3} y^{2}-2
\end{equation}Lastly, we drop our partial derivatives into our formula and simplify to find our solution.
\begin{equation}
\begin{aligned}
&\frac{d y}{d x}=-\frac{F_{x}}{F_{y}} \\
&\frac{d y}{d x}=-\frac{\left(3 x^{2} y^{3}-1\right)}{\left(3 x^{3} y^{2}-2\right)} \\
&\frac{d y}{d x}=\frac{1-3 x^{2} y^{3}}{3 x^{3} y^{2}-2}
\end{aligned}
\end{equation}Now, wasn’t our new method of using the Implicit Function Theorem pretty awesome and easy?
Yep! I think so too.
Together we will learn how you can apply the multivariable chain rule to the function of two or more variables and evaluate at a point, and how we can take our knowledge of partial derivatives and apply it implicit differentiation.
It’s going to be great, so let’s get to it.
Video Tutorial w/ Full Lesson & Detailed Examples (Video)
Get access to all the courses and over 450 HD videos with your subscription
Monthly and Yearly Plans Available
Still wondering if CalcWorkshop is right for you?
Take a Tour and find out how a membership can take the struggle out of learning math.