Section 8.2 Multivariable Chain Rules
Begin by considering the case where \(z=z(x,y)\) and \(x=x(t)\text{,}\) \(y=y(t)\text{.}\) In this case we can think of \(z\) as defining a real valued function \(z=z(t)\text{.}\)
Example 8.2.1.
If \(z=x^2+2xy+3y^2\) and \(x=t+1\text{,}\) \(y=t-1\) then find \(z'(t)\) by substituting the expressions for \(x\) and \(y\) into \(z\) and then differentiating.
Answer.\(\dfrac{dz}{dt} = 12t-4\)
Solution.
On substituting \(x\) and \(y\) into \(z\)
\begin{alignat*}{1}
z(t) \amp = (t+1)^2 + 2(t+1)(t-1)+3(t-1)^2\\
\quad \amp = 6t^2-4t+2
\end{alignat*}
Thus
\begin{equation*}
\dfrac{dz}{dt} = 12t-4.
\end{equation*}
Now for a function \(f\) of two variables the linear approximation (or ''small change'') formula says:
\begin{equation*}
\Delta f \approx \dfrac{\partial f}{\partial x}\Delta x + \dfrac{\partial f}{\partial y}\Delta y.
\end{equation*}
Thus
\begin{equation*}
\dfrac{\Delta f}{\Delta t} \approx \dfrac{\partial f}{\partial x}\frac{\Delta x}{\Delta t} + \dfrac{\partial f}{\partial y}\frac{\Delta y}{\Delta t}.
\end{equation*}
This formula becomes more accurate as \(\Delta t \to 0\) and from the limit we obtain the following chain rule.
Theorem 8.2.2. Chain Rule 1.
If \(z=z(x,y)\) and \(x=x(t)\text{,}\) \(y=y(t)\) are differentiable functions then
\begin{equation*}
\dfrac{dz}{dt} = \dfrac{\partial z}{\partial x}\cdot \dfrac{dx}{dt} + \dfrac{\partial z}{\partial y}\cdot \dfrac{dy}{dt}.
\end{equation*}
Example 8.2.3.
If \(z=x^2+2xy+3y^2\) and \(x=t+1\text{,}\) \(y=t-1\) then find \(z'(t)\) by using the chain rule.
Answer.\(\dfrac{dz}{dt} = 12t-4\)
Solution.
Here
\begin{equation*}
\dfrac{\partial z}{\partial x} = 2x + 2y, \ \dfrac{\partial z}{\partial y} = 2x + 6y, \ \dfrac{dx}{dt} = 1 = \dfrac{dy}{dt}.
\end{equation*}
So, via the chain rule
\begin{alignat*}{1}
\dfrac{dz}{dt} \amp = (2x+2y)\times 1 + (2x+6y)\times 1\\
\quad \amp = 4x+8y\\
\quad \amp = 4(t+1)+8(t-1)\\
\quad \amp = 12t-4.
\end{alignat*}
Example 8.2.4.
Use the chain rule to find \(z'(t)\) when \(z(x,y) = \sqrt{x^2+y^2}\) and \(x(t) = e^{2t}, \ y(t)=e^{-2t}\text{.}\)
Answer.\(\dfrac{dz}{dt} = \dfrac{2(e^{6t} - e^{-2t})}{\sqrt{e^{8t}+1}}\)
Solution.
Here
\begin{equation*}
\dfrac{\partial z}{\partial x} = \dfrac{x}{\sqrt{x^2+y^2}}, \ \dfrac{\partial z}{\partial y} = \dfrac{y}{\sqrt{x^2+y^2}}, \ \dfrac{dx}{dt} = 2e^{2t}, \ \dfrac{dy}{dt} = -2e^{-2t}.
\end{equation*}
So, via the chain rule
\begin{alignat*}{1}
\dfrac{dz}{dt} \amp = \dfrac{x}{\sqrt{x^2+y^2}}\times 2e^{2t} + \dfrac{y}{\sqrt{x^2+y^2}}\times (-2e^{-2t})\\
\quad \amp = \dfrac{e^{2t}2e^{2t}}{\sqrt{e^{4t} + e^{-4t}}} -\dfrac{e^{-2t}2e^{-2t}}{\sqrt{e^{4t} + e^{-4t}}}\\
\quad \amp = \dfrac{2(e^{6t} - e^{-2t})}{\sqrt{e^{8t}+1}}.
\end{alignat*}
Example 8.2.5.
The radius of a right circular cone is increasing at a rate of \(1.8\) cm/s while its height is decreasing at a rate of \(2.5\) cm/s. At what rate is the volume of the cone changing when the radius is \(120\) cm and the height is \(140\) cm?
Answer.\(\dfrac{dV}{dt} = 8160\pi \ (\text{cm}^3\text{/s})\)
Solution.
The volume \(V\) of right circular cone of radius \(r\) and height \(h\) is
\begin{equation*}
V(r,h) = \dfrac{1}{3}\pi r^2h.
\end{equation*}
Since both radius and the height are functions of time \(t\text{,}\) i.e. \(r=r(t)\) and \(h=h(t)\text{,}\) we can think of the volume as a function of time as well, i.e. \(V=V(t)\text{,}\) and the problem is asking us to find \(\dfrac{dV}{dt}\) when \(r=120\) and \(h=140\text{.}\) Now, by the chain rule:
\begin{equation*}
\dfrac{dV}{dt} = \dfrac{\partial V}{\partial r}\cdot \dfrac{dr}{dt} + \dfrac{\partial V}{\partial h}\cdot \dfrac{dh}{dt}.
\end{equation*}
Here
\begin{equation*}
\dfrac{\partial V}{\partial r} = \dfrac{2}{3}\pi rh \text{ and } \dfrac{\partial V}{\partial h} =\dfrac{1}{3}\pi r^2
\end{equation*}
and we are given that \(\dfrac{dr}{dt} = 1.8\) and \(\dfrac{dh}{dt} = -2.5\text{.}\) (Note that \(\dfrac{dh}{dt}\) is negative because the height is decreasing.) Thus, at \(r=120\) and \(h=140\)
\begin{alignat*}{1}
\dfrac{dV}{dt} \amp = \dfrac{2\pi}{3} \times 120 \times 140 \times 1.8 - \dfrac{\pi}{3}\times 120^2 \times 2.5\\
\amp = 8160\pi \ (\text{cm}^3\text{/s})
\end{alignat*}
Consider the case now where \(z=z(u)\) and \(u=u(x,y)\text{.}\) In this case we can think of \(z\) as defining a function of two variables \(z=z(x,y)\) and hence has partial derivatives with respect to these variables. The relevant chain rules for this case are:
Theorem 8.2.6. Chain Rule 2.
If \(z=z(u)\) and \(u=u(x,y)\) are differentiable functions then
\begin{equation*}
\dfrac{\partial z}{\partial x} = \dfrac{dz}{du}\cdot\dfrac{\partial u}{\partial x} \quad \text{and} \quad \dfrac{\partial z}{\partial y} = \dfrac{dz}{du}\cdot\dfrac{\partial u}{\partial y}.
\end{equation*}
Example 8.2.7.
A spherical balloon holds a fixed amount of gas but its volume is dependent on the pressure \(P\) and temperature \(T\) of the gas according to
\begin{equation*}
V=k\dfrac{T}{P}, \quad k \ \text{ a constant}.
\end{equation*}
Determine expressions for the rate of change of the radius \(r\) of the balloon with respect to the pressure and temperature of the gas.
Answer.
\(\dfrac{\partial r}{\partial P} = -\dfrac{1}{3}Ck^{\frac{1}{3}}T^{\frac{1}{3}}P^{-\frac{4}{3}}\)
\(\dfrac{\partial r}{\partial T} = \dfrac{1}{3}Ck^{\frac{1}{3}}T^{-\frac{2}{3}}P^{-\frac{1}{3}}\)
Solution.
The volume \(V\) of a sphere of radius \(r\) is
\begin{equation*}
V = \dfrac{4}{3}\pi r^3.
\end{equation*}
Thus we can think of the radius of the balloon as a function of its volume, i.e.
\begin{equation*}
r(V) = CV^{\frac{1}{3}} \text{ where } C=\left(\dfrac{3}{4\pi}\right)^{\frac{1}{3}}
\end{equation*}
where the volume is, in turn, a function of the pressure and temperature of the gas, i.e.
\begin{equation*}
V(P,T) = kP^{-1}T.
\end{equation*}
Using Chain Rule 2:
\begin{alignat*}{1}
\dfrac{\partial r}{\partial P} \amp = \dfrac{dr}{dV}\dfrac{\partial V}{\partial P}\\
\amp = \left(\dfrac{1}{3}CV^{-\frac{2}{3}}\right)(-kTP^{-2})\\
\amp = -\dfrac{1}{3}Ck^{\frac{1}{3}}T^{\frac{1}{3}}P^{-\frac{4}{3}}.
\end{alignat*}
Similarly
\begin{alignat*}{1}
\dfrac{\partial r}{\partial T} \amp = \dfrac{dr}{dV}\dfrac{\partial V}{\partial T}\\
\amp = \left(\dfrac{1}{3}CV^{-\frac{2}{3}}\right)(kP^{-1})\\
\amp = \dfrac{1}{3}Ck^{\frac{1}{3}}T^{-\frac{2}{3}}P^{-\frac{1}{3}}.
\end{alignat*}
Example 8.2.8.
Use the appropriate chain rules to calculate \(\dfrac{\partial z}{\partial x}\) and \(\dfrac{\partial z}{\partial y}\) when
\begin{equation*}
z = \dfrac{u}{u+1} \text{ and } u = 3x^5-5xy^2.
\end{equation*}
Answer.
\(\dfrac{\partial z}{\partial x} = \dfrac{15x^4-5y^2}{(3x^5-5xy^2+1)^2}\)
\(\dfrac{\partial z}{\partial y} = \dfrac{-10xy}{(3x^5-5xy^2+1)^2}\)
Solution.
Using Chain Rule 2:
\begin{equation*}
\dfrac{\partial z}{\partial x} = \dfrac{dz}{du}\dfrac{\partial u}{\partial x} \text{ and } \dfrac{\partial z}{\partial y} = \dfrac{dz}{du}\dfrac{\partial u}{\partial y}.
\end{equation*}
Now, (via the quotient rule)
\begin{equation*}
\dfrac{dz}{du} = \dfrac{(u+1)(1) - u(1)}{(u+1)^2} = \dfrac{1}{(u+1)^2}
\end{equation*}
and
\begin{equation*}
\dfrac{\partial u}{\partial x} = 15x^4-5y^2 \text{ and } \dfrac{\partial u}{\partial y} = -10xy.
\end{equation*}
Thus
\begin{equation*}
\dfrac{\partial z}{\partial x} = \dfrac{15x^4-5y^2}{(3x^5-5xy^2+1)^2} \text{ and } \dfrac{\partial z}{\partial y} = \dfrac{-10xy}{(3x^5-5xy^2+1)^2}.
\end{equation*}
Next consider the case where \(z=z(x,y)\) and \(x=x(s,t)\text{,}\) \(y=y(s,t)\text{.}\) In this case we can think of \(z\) as defining a function of two variables \(z=z(s,t)\text{.}\) The relevant chain rules for this case are:
Theorem 8.2.9. Chain Rule 3.
If \(z=z(x,y)\) and \(x=x(s,t)\text{,}\) \(y=y(s,t)\) are differentiable functions then
\begin{equation*}
\dfrac{\partial z}{\partial s} = \dfrac{\partial z}{\partial x} \cdot \dfrac{\partial x}{\partial s} + \dfrac{\partial z}{\partial y} \cdot \dfrac{\partial y}{\partial s}
\end{equation*}
\begin{equation*}
\dfrac{\partial z}{\partial t} = \dfrac{\partial z}{\partial x} \cdot \dfrac{\partial x}{\partial t} + \dfrac{\partial z}{\partial y} \cdot \dfrac{\partial y}{\partial t}
\end{equation*}
Example 8.2.10.
Use the appropriate chain rules to find \(\dfrac{\partial z}{\partial s}\) and \(\dfrac{\partial z}{\partial t}\) when
\begin{equation*}
z = \dfrac{x}{y} \text{ and } x = se^t, \quad y = 1+se^{-t}.
\end{equation*}
Answer.
\(\dfrac{\partial z}{\partial s} = \dfrac{e^t}{(1+se^{-t})^2}\)
\(\dfrac{\partial z}{\partial t} = \dfrac{se^t+2s^2}{(1+se^{-t})^2}\)
Solution.
Here
\begin{equation*}
\dfrac{\partial z}{\partial x} = \dfrac{1}{y}, \quad \dfrac{\partial z}{\partial y} = -\dfrac{x}{y^2}
\end{equation*}
and
\begin{equation*}
\dfrac{\partial x}{\partial s} = e^t, \quad \dfrac{\partial x}{\partial t} = se^t, \quad \dfrac{\partial y}{\partial s}=e^{-t}, \quad \dfrac{\partial y}{\partial t}=-se^{-t}.
\end{equation*}
Thus, by Chain Rule 3
\begin{alignat*}{1}
\dfrac{\partial z}{\partial s} \amp = \dfrac{\partial z}{\partial x} \cdot \dfrac{\partial x}{\partial s} + \dfrac{\partial z}{\partial y} \cdot \dfrac{\partial y}{\partial s}\\
\amp = \left(\dfrac{1}{1+se^{-t}}\right)(e^t) + \left(\dfrac{-se^t}{(1+se^{-t})^2}\right)(e^{-t})\\
\amp = \dfrac{e^t}{(1+se^{-t})^2}
\end{alignat*}
and
\begin{alignat*}{1}
\dfrac{\partial z}{\partial t} \amp = \dfrac{\partial z}{\partial x} \cdot \dfrac{\partial x}{\partial t} + \dfrac{\partial z}{\partial y} \cdot \dfrac{\partial y}{\partial t}\\
\amp = \left(\dfrac{1}{1+se^{-t}}\right)(se^t) + \left(\dfrac{-se^t}{(1+se^{-t})^2}\right)(-se^{-t})\\
\amp = \dfrac{se^t + 2s^2}{(1+se^{-t})^2}
\end{alignat*}
The chain rules given above are just special cases of the general chain rule.
Theorem 8.2.11. The General Chain Rule.
If \(z=z(x_1,x_2,\ldots,x_n)\) is a differentiable function of \(n\) variables \(x_1,x_2,\ldots,x_n\) and each \(x_i = x_i(t_1,t_2,\ldots,t_m)\) is a differentiable function of the \(m\) variables \(t_1,t_2,\ldots,t_m\) then
\begin{equation*}
\dfrac{\partial z}{\partial t_i} = \dfrac{\partial z}{\partial x_1} \cdot \dfrac{\partial x_1}{\partial t_i} + \dfrac{\partial z}{\partial x_2} \cdot \dfrac{\partial x_2}{\partial t_i} + \cdots + \dfrac{\partial z}{\partial x_n} \cdot \dfrac{\partial x_n}{\partial t_i}
\end{equation*}
for each \(i = 1,2,\ldots, m.\)
Example 8.2.12.
Find \(\dfrac{\partial w}{\partial u}\) if \(w(x,y,z) = 2x^2+5y^2+z^3\) and
\begin{equation*}
x(r,s,t,u) = r+s+t+u, \quad y(r,s,t,u)=r^2,\quad z(r,s,t,u) = \sqrt{r-s+t-u}
\end{equation*}
Answer.\(\dfrac{\partial w}{\partial u} = 4(r+s+t+u) - \dfrac{3\sqrt{r-s+t-u}}{2}\)
Solution.
By the general Chain Rule
\begin{alignat*}{1}
\dfrac{\partial w}{\partial u} \amp = \dfrac{\partial w}{\partial x}\dfrac{\partial x}{\partial u} + \dfrac{\partial w}{\partial y}\dfrac{\partial y}{\partial u} + \dfrac{\partial w}{\partial z}\dfrac{\partial z}{\partial u}\\
\amp = (4x)(1) + (10y)(0) + (3z^2)\left(\dfrac{1}{2}(r-s+t-u)^{-\frac{1}{2}}(-1)\right)\\
\amp = 4(r+s+t+u) - \dfrac{3\sqrt{r-s+t-u}}{2}
\end{alignat*}
Exercises Example Tasks
1.
Use the appropriate chain rules to find \(\dfrac{\partial z}{\partial x}\) and \(\dfrac{\partial z}{\partial y}\) when
\begin{equation*}
z(u,v)=u^2v+e^v \quad \text{and} \quad u(x,y) = \ln(y-x), \quad v(x,y) = x+xy.
\end{equation*}
2.
Two straight roads intersect at right angles. Car A is moving on one road approaches the intersection at \(25\) km/h while Car B moving on the other road approaches the intersection at \(30\) km/h. At what rate is the distance between the cars changing when A is \(0.3\) km from the intersection and B is \(0.4\) km from the intersection?3.
Show that any function of the form
\begin{equation*}
z = f(x+at) + g(x-at)
\end{equation*}
is a solution of the wave equation
\begin{equation*}
\dfrac{\partial^2 z}{\partial t^2} = a^2\dfrac{\partial^2 z}{\partial x^2}.
\end{equation*}
4.
If \(z=z(x,y)\) and \(x=x(\theta)\) and \(y=y(\theta)\) find an appropriate chain rule for \(\dfrac{d^2z}{d\theta^2}\text{.}\)
Using the result of part (a) find \(\dfrac{d^2z}{d\theta^2}\) when \(z(x,y)=x^2+2y\) and \(x(\theta) = 5\cos(\theta)\) and \(y(\theta) = 5\sin(\theta)\text{.}\)