Section 7.4 The Chain Rule
¶Consider the surface \(z=x^2y+xy^2\text{,}\) and suppose that \(x=2+t^4\) and \(y=1-t^3\text{.}\) We can think of the latter two equations as describing how \(x\) and \(y\) change relative to, say, time. Then
tells us explicitly how the \(z\) coordinate of the corresponding point on the surface depends on \(t\text{.}\) If we want to know \(dz/dt\) we can compute it more or less directly, but it's actually a bit simpler to use Product and Chain Rules:
If we look carefully at the middle step, \(dz/dt=(2xy+y^2)x'+(x^2+2xy)y'\text{,}\) we notice that \(2xy+y^2\) is \(\partial z/\partial x\text{,}\) and \(x^2+2xy\) is \(\partial z/\partial y\text{.}\) This turns out to be true in general, and gives us a new Chain Rule:
Theorem 7.35. Multivariate Chain Rule.
Suppose that \(z=f(x,y)\text{,}\) \(f\) is differentiable, \(x=g(t)\text{,}\) and \(y=h(t)\text{.}\) Assuming that the relevant derivatives exist,
Proof.
If \(f\) is differentiable, then
where \(\epsilon_1\) and \(\epsilon_2\) approach 0 as \((x,y)\) approaches \((x_0,y_0)\text{.}\) Then
As \(\Delta t\) approaches 0, \((x,y)\) approaches \((x_0,y_0)\) and so
and so taking the limit of (7.4.1) as \(\Delta t\) goes to 0 gives
as desired.
We can write the Chain Rule in a way that is somewhat closer to the single variable Chain Rule:
or (roughly) the derivatives of the outside function “times” the derivatives of the inside functions. Not surprisingly, essentially the same Chain Rule works for functions of more than two variables, for example, given a function of three variables \(f(x,y,z)\text{,}\) where each of \(x\text{,}\) \(y\) and \(z\) is a function of \(t\text{,}\)
We can even extend the idea further. Suppose that \(f(x,y)\) is a function and \(x=g(s,t)\) and \(y=h(s,t)\) are functions of two variables \(s\) and \(t\text{.}\) Then \(f\) is “really” a function of \(s\) and \(t\) as well, and
The natural extension of this to \(f(x,y,z)\) works as well.
Recall that we used the ordinary Chain Rule to do implicit differentiation. We can do the same with the new Chain Rule.
Example 7.36. Equation of a Sphere.
Find the partial derivative of \(x^2+y^2+z^2 = 4\text{.}\)
The equation \(x^2+y^2+z^2 = 4\) defines a sphere, which is not a function of \(x\) and \(y\text{,}\) though it can be thought of as two functions, the top and bottom hemispheres. We can think of \(z\) as one of these two functions, so really \(z=z(x,y)\text{,}\) and we can think of \(x\) and \(y\) as particularly simple functions of \(x\) and \(y\text{,}\) and let \(f(x,y,z)=x^2+y^2+z^2\text{.}\) Since \(f(x,y,z)=4\text{,}\) \(\partial f/\partial x=0\text{,}\) but using the Chain Rule:
noting that since \(y\) is temporarily held constant its derivative \({\partial y/\partial x}=0\text{.}\) Now we can solve for \(\partial z/\partial x\text{:}\)
In a similar manner we can compute \(\partial z/\partial y\text{.}\)
Exercises for Section 7.4.
Exercise 7.4.1.
Use the Chain Rule to compute the following.
-
\(dz/dt\) for \(z=\sin(x^2+y^2)\text{,}\) \(x=t^2+3\text{,}\) \(y=t^3\)
Answer\(4xt\cos(x^2+y^2)+6yt^2\cos(x^2+y^2)\) -
\(dz/dt\) for \(z=x^2y\text{,}\) \(x=\sin(t)\text{,}\) \(y=t^2+1\)
Answer\(2xy\cos t+2x^2t\) -
\(\partial z/\partial s\) and \(\partial z/\partial t\) for \(z=x^2y\text{,}\) \(x=\sin(st)\text{,}\) \(y=t^2+s^2\)
Answer\(2xyt\cos(st)+2x^2s\text{,}\) \(2xys\cos(st)+2x^2t\) -
\(\partial z/\partial s\) and \(\partial z/\partial t\) for \(z=x^2y^2\text{,}\) \(x=st\text{,}\) \(y=t^2-s^2\)
Answer\(2xy^2t-4yx^2s\text{,}\) \(2xy^2s+4yx^2t\) -
\(\partial z/\partial x\) and \(\partial z/\partial y\) for \(2x^2+3y^2-2z^2=9\)
Answer\(x/z\text{,}\) \(3y/(2z)\) -
\(\partial z/\partial x\) and \(\partial z/\partial y\) for \(2x^2+y^2+z^2=9\)
Answer\(-2x/z\text{,}\) \(-y/z\)
Exercise 7.4.2.
Chemistry students will recognize the ideal gas law, given by \(PV=nRT\) which relates the Pressure, Volume, and Temperature of \(n\) moles of gas. (R is the ideal gas constant). Thus, we can view pressure, volume, and temperature as variables, each one dependent on the other two.
-
If pressure of a gas is increasing at a rate of \(0.2 Pa/\hbox{min}\) and temperature is increasing at a rate of \(1 K/\hbox{min}\text{,}\) how fast is the volume changing?
Answer\(\ds V'=(nR-0.2V)/P\) -
If the volume of a gas is decreasing at a rate of \(0.3 L/\hbox{min}\) and temperature is increasing at a rate of \(.5 K/\hbox{min}\text{,}\) how fast is the pressure changing?
Answer\(\ds P'=(nR+0.6P)/2V\) -
If the pressure of a gas is decreasing at a rate of \(0.4 Pa/\hbox{min}\) and the volume is increasing at a rate of \(3 L/\hbox{min}\text{,}\) how fast is the temperature changing?
Answer\(\ds T' = (3P-0.4V)/(nR)\)
Exercise 7.4.3.
Verify the following identity in the case of the ideal gas law:
Exercise 7.4.4.
The previous exercise was a special case of the following fact, which you are to verify here: If \(F(x,y,z)\) is a function of 3 variables, and the relation \(F(x,y,z)=0\) defines each of the variables in terms of the other two, namely \(x=f(y,z)\text{,}\) \(y=g(x,z)\) and \(z=h(x,y)\text{,}\) then