13.5 The Multivariable Chain Rule

The Chain Rule, as learned in Section 2.5, states that

dd⁡x⁢(f⁢(g⁢(x)))=f′⁢(g⁢(x))⁢g′⁢(x).

If t=g⁢(x), we can express the Chain Rule as

d⁡fd⁡x=d⁡fd⁡t⁢d⁡td⁡x.

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

Theorem 13.5.1 Multivariable Chain Rule, Part I

Let z=f⁢(x,y), x=g⁢(t) and y=h⁢(t), where f, g and h are differentiable functions. Then z=f⁢(x,y)=f⁢(g⁢(t),h⁢(t)) is a function of t, and

d⁡zd⁡t=d⁡fd⁡t=fx⁢(x,y)⁢d⁡xd⁡t+fy⁢(x,y)⁢d⁡yd⁡t=∂f∂x⁢d⁡xd⁡t+∂f∂y⁢d⁡yd⁡t.
Proof.

By definition,

d⁡fd⁡t⁢(x,y)=limh→0f⁢(x⁢(t+h),y⁢(t+h))−f⁢(x,y)h.

Let

Δ⁢f =f⁢(x⁢(t+h),y⁢(t+h))−f⁢(x,y),
d⁡x =x⁢(t+h)−x⁢(t),and
d⁡y =y⁢(t+h)−y⁢(t).

Because f is differentiable, Definition 13.4.2 gives us functions E1 and E2 so that

E1⁢d⁡x+E2⁢d⁡y=Δ⁢f−fx⁢(x,y)⁢d⁡x−fy⁢(x,y)⁢d⁡y,
lim(d⁡x,d⁡y)→0E1=0,andlim(d⁡x,d⁡y)→0E2=0.

This means that

d⁡fd⁡t⁢(x,y) =limh→0fx⁢(x,y)⁢d⁡x+fy⁢(x,y)⁢d⁡y+E1⁢d⁡x+E2⁢d⁡yh
=fx⁢(x,y)⁢limh→0d⁡xh+fy⁢(x,y)⁢limh→0d⁡yh
+limh→0E1⁢limh→0d⁡xh+limh→0E2⁢limh→0d⁡yh
=fx⁢(x,y)⁢x′⁢(t)+fy⁢(x,y)⁢y′⁢(t)+0⁢x′⁢(t)+0⁢y′⁢(t).∎

It is good to understand what the situation of z=f⁢(x,y), 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. The parametric equations for this curve are x=g⁢(t), y=h⁢(t) and z=f⁢(g⁢(t),h⁢(t)).

††margin:
(fullscreen)
Figure 13.5.1: Understanding the application of the Multivariable Chain Rule.

Consider Figure 13.5.1 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 d⁡fd⁡t gives the instantaneous rate of change of f with respect to t. If we consider an object traveling along this path, d⁡fd⁡t gives the rate at which the object rises/falls.

We now practice applying the Multivariable Chain Rule.

Example 13.5.1 Using the Multivariable Chain Rule

Let z=x2⁢y+x, where x=sin⁡t and y=e5⁢t. Find d⁡zd⁡t using the Chain Rule.

SolutionFollowing Theorem 13.5.1, we find

fx⁢(x,y)=2⁢x⁢y+1,fy⁢(x,y)=x2,d⁡xd⁡t=cos⁡t,d⁡yd⁡t=5⁢e5⁢t.

Applying the theorem, we have

d⁡zd⁡t=(2⁢x⁢y+1)⁢cos⁡t+5⁢x2⁢e5⁢t.

This may look odd, as it seems that d⁡zd⁡t is a function of x, y and t. Since x and y are functions of t, d⁡zd⁡t is really just a function of t, and we can replace x with sin⁡t and y with e5⁢t:

d⁡zd⁡t=(2⁢x⁢y+1)⁢cos⁡t+5⁢x2⁢e5⁢t=(2⁢sin⁡(t)⁢e5⁢t+1)⁢cos⁡t+5⁢e5⁢t⁢sin2⁡t.

The previous example can make us wonder: if we substituted for x and y at the end to show that d⁡zd⁡t is really just a function of t, why not substitute before differentiating, showing clearly that z is a function of t?

That is, z=x2⁢y+x=(sin⁡t)2⁢e5⁢t+sin⁡t. Applying the Chain and Product Rules, we have

d⁡zd⁡t=2⁢sin⁡t⁢cos⁡t⁢e5⁢t+5⁢sin2⁡t⁢e5⁢t+cos⁡t,

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), x=g⁢(t) and y=h⁢(t), the Chain Rule is extremely powerful when we do not know what f, 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.

Example 13.5.2 Applying the Multivariable Chain Rule

An object travels along a path on a surface. The exact path and surface are not known, but at time t=t0 it is known that :

∂z∂x=5,∂z∂y=−2,d⁡xd⁡t=3andd⁡yd⁡t=7.

Find d⁡zd⁡t at time t0.

SolutionThe Multivariable Chain Rule states that

d⁡zd⁡t =∂z∂x⁢d⁡xd⁡t+∂z∂y⁢d⁡yd⁡t
=5⁢(3)+(−2)⁢(7)
=1.

By knowing certain rates-of-change information about the surface and about the path of the particle in the x-y plane, we can determine how quickly the object is rising/falling.

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

Example 13.5.3 Applying the Multivariable Chain Rule

Consider the surface z=x2+y2−x⁢y, a paraboloid, on which a particle moves with x and y coordinates given by x=cos⁡t and y=sin⁡t. Find d⁡zd⁡t when t=0, and find where the particle reaches its maximum/minimum z-values.

SolutionIt is straightforward to compute

fx⁢(x,y)=2⁢x−y,fy⁢(x,y)=2⁢y−x,d⁡xd⁡t=−sin⁡t,d⁡yd⁡t=cos⁡t.

Combining these according to the Chain Rule gives:

d⁡zd⁡t=−(2⁢x−y)⁢sin⁡t+(2⁢y−x)⁢cos⁡t.

When t=0, x=1 and y=0. Thus d⁡zd⁡t=−(2)⁢(0)+(−1)⁢(1)=−1. When t=0, the particle is moving down, as shown in Figure 13.5.2.

††margin:
(fullscreen)
Figure 13.5.2: Plotting the path of a particle on a surface in Example 13.5.3.

To find where z-value is maximized/minimized on the particle’s path, we set d⁡zd⁡t=0 and solve for t:

d⁡zd⁡t=0 =−(2⁢x−y)⁢sin⁡t+(2⁢y−x)⁢cos⁡t
0 =−(2⁢cos⁡t−sin⁡t)⁢sin⁡t+(2⁢sin⁡t−cos⁡t)⁢cos⁡t
0 =sin2⁡t−cos2⁡t
cos2⁡t =sin2⁡t
t =n⁢π4⁢(for odd n)

We can use the First Derivative Test to find that on [0,2⁢π], z has reaches its absolute minimum at t=π/4 and 5⁢π/4; it reaches its absolute maximum at t=3⁢π/4 and 7⁢π/4, as shown in Figure 13.5.2.

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), and x and y are functions of two variables, say s and t.

Theorem 13.5.2 Multivariable Chain Rule, Part II


1. Let z=f⁢(x,y), x=g⁢(s,t) and y=h⁢(s,t), where f, g and h are differentiable functions. Then z is a function of s and t, and • ∂z∂s=∂f∂x⁢∂x∂s+∂f∂y⁢∂y∂s ,    and • ∂z∂t=∂f∂x⁢∂x∂t+∂f∂y⁢∂y∂t. 2. Let z=f⁢(x1,x2,…,xm) be a differentiable function of m variables, where each of the xi is a differentiable function of the variables t1,t2,…,tn. Then z is a function of the ti, and ∂z∂ti=∂f∂x1⁢∂x1∂ti+∂f∂x2⁢∂x2∂ti+⋯+∂f∂xm⁢∂xm∂ti.

The proof of Part II follows quickly from Part I, because ∂∂ti means that we hold the other variables constant and we are back to the one variable case already proved. A helpful way to remember the derivatives is to examine the following chart
zx1x2⋯xmt1t2⋯tn
Each possible path from f to the variable ti contributes a term to the sum, and each line segment in a path contributes a factor to that term.

Example 13.5.4 Using the Multivariable Chain Rule, Part II

Let z=x2⁢y+x, x=s2+3⁢t and y=2⁢s−t. Find ∂z∂s and ∂z∂t, and evaluate each when s=1 and t=2.

SolutionFollowing Theorem 13.5.2, we compute the following partial derivatives:

∂f∂x=2⁢x⁢y+1∂f∂y=x2,
∂x∂s=2⁢s∂x∂t=3∂y∂s=2∂y∂t=−1.

Thus

∂z∂s=(2⁢x⁢y+1)⁢(2⁢s)+(x2)⁢(2)=4⁢x⁢y⁢s+2⁢s+2⁢x2,and
∂z∂t=(2⁢x⁢y+1)⁢(3)+(x2)⁢(−1)=6⁢x⁢y−x2+3.

When s=1 and t=2, x=7 and y=0, so

∂z∂s=100and∂z∂t=−46.
Example 13.5.5 Using the Multivariable Chain Rule, Part II

Let w=x⁢y+z2, where x=t2⁢es, y=t⁢cos⁡s, and z=s⁢sin⁡t. Find ∂w∂t when s=0 and t=π.

SolutionFollowing Theorem 13.5.2, we compute the following partial derivatives:

∂f∂x=y∂f∂y=x∂f∂z=2⁢z,
∂x∂t=2⁢t⁢es∂y∂t=cos⁡s∂z∂t=s⁢cos⁡t.

Thus

∂w∂t=y⁢(2⁢t⁢es)+x⁢(cos⁡s)+2⁢z⁢(s⁢cos⁡t).

When s=0 and t=π, we have x=π2, y=π and z=0. Thus

∂w∂t=π⁢(2⁢π)+π2=3⁢π2.

Implicit Differentiation

We studied finding d⁡yd⁡x 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 d⁡yd⁡x.

For instance, consider the implicit function x2⁢y−x⁢y3=3. We learned to use the following steps to find d⁡yd⁡x:

dd⁡x⁢(x2⁢y−x⁢y3) =dd⁡x⁢(3)
2⁢x⁢y+x2⁢d⁡yd⁡x−y3−3⁢x⁢y2⁢d⁡yd⁡x =0
d⁡yd⁡x=−2⁢x⁢y−y3x2−3⁢x⁢y2. (13.5.1)

Instead of using this method, consider z=x2⁢y−x⁢y3. The implicit function above describes the level curve z=3. Considering x and y as functions of x, the Multivariable Chain Rule states that

d⁡zd⁡x=∂z∂x⁢d⁡xd⁡x+∂z∂y⁢d⁡yd⁡x. (13.5.2)

Since z is constant (in our example, z=3), d⁡zd⁡x=0. We also know d⁡xd⁡x=1. Equation (13.5.2) becomes

0 =∂z∂x⁢(1)+∂z∂y⁢d⁡yd⁡x
d⁡yd⁡x =−∂z∂x/∂z∂y
=−fxfy.

Note how our solution for d⁡yd⁡x in Equation (13.5.1) is just the negative of the partial derivative of z with respect to x, divided by the partial derivative of z with respect to y.

We state the above as a theorem for two and three variables.

Theorem 13.5.3 Implicit Differentiation

If f is a differentiable function of x and y, where f⁢(x,y)=c defines y as an implicit function of x for some constant c, then

d⁡yd⁡x=−fx⁢(x,y)fy⁢(x,y).

If f is a differentiable function of x, y, and z, where f⁢(x,y,z)=c defines z as an implicit function of x and y for some constant c, then

∂z∂x=−fx⁢(x,y,z)fz⁢(x,y,z)and∂z∂y=−fy⁢(x,y,z)fz⁢(x,y,z).

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

Example 13.5.6 Implicit Differentiation

Given the implicitly defined function sin⁡(x2⁢y2)+y3=x+y, find y′. Note: this is the same problem as given in Example 2.6.4 of Section 2.6.

SolutionLet f⁢(x,y)=sin⁡(x2⁢y2)+y3−x−y; the implicitly defined function above is equivalent to f⁢(x,y)=0. We find d⁡yd⁡x by applying Theorem 13.5.3. We find

fx⁢(x,y)=2⁢x⁢y2⁢cos⁡(x2⁢y2)−1andfy⁢(x,y)=2⁢x2⁢y⁢cos⁡(x2⁢y2)+3⁢y2−1,

so

d⁡yd⁡x=−2⁢x⁢y2⁢cos⁡(x2⁢y2)−12⁢x2⁢y⁢cos⁡(x2⁢y2)+3⁢y2−1,

which matches our solution from Example 2.6.4.

Exercises

 

Terms and Concepts

  1. 1.

    Let a level curve of z=f⁢(x,y) be described by x=g⁢(t), y=h⁢(t). Explain why d⁡zd⁡t=0.

  2. 2.

    Fill in the blank: The single variable Chain Rule states dd⁡x(f(g(x)))=f′(g(x))⋅     .

  3. 3.

    Fill in the blank: The Multivariable Chain Rule states that if f is a function of x and y which are each a function of t, then

    d⁡fd⁡t=∂f∂x⋅ + ⋅d⁡yd⁡t.

  4. 4.

    If z=f⁢(x,y), where x=g⁢(t) and y=h⁢(t), we can substitute and write z as an explicit function of t.

    T/F: Using the Multivariable Chain Rule to find d⁡zd⁡t is sometimes easier than first substituting and then taking the derivative.

  5. 5.

    T/F: The Multivariable Chain Rule is only useful when all the related functions are known explicitly.

  6. 6.

    The Multivariable Chain Rule allows us to compute implicit derivatives easily by just computing two       derivatives.

Problems

In Exercises 7–12, functions z=f⁢(x,y), x=g⁢(t) and y=h⁢(t) are given.

  1. 1.

    Use the Multivariable Chain Rule to compute d⁡zd⁡t.

  2. 2.

    Evaluate d⁡zd⁡t at the indicated t-value.

  1. 7.

    z=3⁢x+4⁢y,   x=t2,   y=2⁢t;   t=1

  2. 8.

    z=x2−y2,   x=t,   y=t2−1;   t=1

  3. 9.

    z=5⁢x+2⁢y,   x=2⁢cos⁡t+1,   y=sin⁡t−3;   t=π/4

  4. 10.

    z=xy2+1,   x=cos⁡t,   y=sin⁡t;   t=π/2

  5. 11.

    z=x2+2⁢y2,   x=sin⁡t,   y=3⁢sin⁡t;   t=π/4

  6. 12.

    z=cos⁡x⁢sin⁡y,   x=π⁢t,   y=2⁢π⁢t+π/2;   t=3

In Exercises 13–18, functions z=f⁢(x,y), x=g⁢(t) and y=h⁢(t) are given. Find the values of t where d⁡zd⁡t=0. Note: these are the same surfaces/curves as found in Exercises 7–12.

  1. 13.

    z=3⁢x+4⁢y,   x=t2,   y=2⁢t

  2. 14.

    z=x2−y2,   x=t,   y=t2−1

  3. 15.

    z=5⁢x+2⁢y,   x=2⁢cos⁡t+1,   y=sin⁡t−3

  4. 16.

    z=xy2+1,   x=cos⁡t,   y=sin⁡t

  5. 17.

    z=x2+2⁢y2,   x=sin⁡t,   y=3⁢sin⁡t

  6. 18.

    z=cos⁡x⁢sin⁡y,   x=π⁢t,   y=2⁢π⁢t+π/2

In Exercises 19–22, functions z=f⁢(x,y), x=g⁢(s,t) and y=h⁢(s,t) are given.

  1. 1.

    Use the Multivariable Chain Rule to compute ∂z∂s and ∂z∂t.

  2. 2.

    Evaluate ∂z∂s and ∂z∂t at the indicated s and t values.

  1. 19.

    z=x2⁢y,   x=s−t,   y=2⁢s+4⁢t;   s=1, t=0

  2. 20.

    z=cos⁡(π⁢x+π2⁢y),   x=s⁢t2,   y=s2⁢t;   s=1, t=1

  3. 21.

    z=x2+y2,   x=s⁢cos⁡t,   y=s⁢sin⁡t;   s=2, t=π/4

  4. 22.

    z=e−(x2+y2),   x=t,   y=s⁢t2;   s=1, t=1

In Exercises 23–26, find d⁡yd⁡x using Implicit Differentiation and Theorem 13.5.3.

  1. 23.

    x2⁢tan⁡y=50

  2. 24.

    (3⁢x2+2⁢y3)4=2

  3. 25.

    x2+yx+y2=17

  4. 26.

    ln⁡(x2+x⁢y+y2)=1

In Exercises 27–30, find d⁡zd⁡t, or ∂z∂s and ∂z∂t, using the supplied information.

  1. 27.

    ∂z∂x=2,   ∂z∂y=1,   d⁡xd⁡t=4,   d⁡yd⁡t=−5

  2. 28.

    ∂z∂x=1,   ∂z∂y=−3,   d⁡xd⁡t=6,   d⁡yd⁡t=2

  3. 29.

    ∂z∂x=−4,   ∂z∂y=9,

    ∂x∂s=5,   ∂x∂t=7,   ∂y∂s=−2,   ∂y∂t=6

  4. 30.

    ∂z∂x=2,   ∂z∂y=1,

    ∂x∂s=−2,   ∂x∂t=3,   ∂y∂s=2,   ∂y∂t=−1

  1. 31.

    Suppose z=f⁢(x,y) is differentiable. Express (x,y) in polar coordinates as x=r⁢cos⁡θ, y=r⁢sin⁡θ. Calculate ∂z∂θ.

  2. 32.

    Suppose w=g⁢(x,y,z) is differentiable. Express (x,y,z) in spherical coordinates as x=ρ⁢sin⁡ϕ⁢cos⁡θ, y=ρ⁢sin⁡ϕ⁢sin⁡θ, z=ρ⁢cos⁡ϕ. Calculate ∂w∂ϕ.

  3. 33.

    Suppose the radius of a circular cylinder is increasing at the constant rate of 1/2 cm/sec while its height is decreasing at the rate of 1/3 cm/sec. How is the volume of the cylinder changing when the radius 4 cm and the height is 10 cm?

Modern Campus CMS