Skip to Content
OpenStax Logo
Calculus Volume 3

4.5 The Chain Rule

Calculus Volume 34.5 The Chain Rule
Buy book
  1. Preface
  2. 1 Parametric Equations and Polar Coordinates
    1. Introduction
    2. 1.1 Parametric Equations
    3. 1.2 Calculus of Parametric Curves
    4. 1.3 Polar Coordinates
    5. 1.4 Area and Arc Length in Polar Coordinates
    6. 1.5 Conic Sections
    7. Key Terms
    8. Key Equations
    9. Key Concepts
    10. Chapter Review Exercises
  3. 2 Vectors in Space
    1. Introduction
    2. 2.1 Vectors in the Plane
    3. 2.2 Vectors in Three Dimensions
    4. 2.3 The Dot Product
    5. 2.4 The Cross Product
    6. 2.5 Equations of Lines and Planes in Space
    7. 2.6 Quadric Surfaces
    8. 2.7 Cylindrical and Spherical Coordinates
    9. Key Terms
    10. Key Equations
    11. Key Concepts
    12. Chapter Review Exercises
  4. 3 Vector-Valued Functions
    1. Introduction
    2. 3.1 Vector-Valued Functions and Space Curves
    3. 3.2 Calculus of Vector-Valued Functions
    4. 3.3 Arc Length and Curvature
    5. 3.4 Motion in Space
    6. Key Terms
    7. Key Equations
    8. Key Concepts
    9. Chapter Review Exercises
  5. 4 Differentiation of Functions of Several Variables
    1. Introduction
    2. 4.1 Functions of Several Variables
    3. 4.2 Limits and Continuity
    4. 4.3 Partial Derivatives
    5. 4.4 Tangent Planes and Linear Approximations
    6. 4.5 The Chain Rule
    7. 4.6 Directional Derivatives and the Gradient
    8. 4.7 Maxima/Minima Problems
    9. 4.8 Lagrange Multipliers
    10. Key Terms
    11. Key Equations
    12. Key Concepts
    13. Chapter Review Exercises
  6. 5 Multiple Integration
    1. Introduction
    2. 5.1 Double Integrals over Rectangular Regions
    3. 5.2 Double Integrals over General Regions
    4. 5.3 Double Integrals in Polar Coordinates
    5. 5.4 Triple Integrals
    6. 5.5 Triple Integrals in Cylindrical and Spherical Coordinates
    7. 5.6 Calculating Centers of Mass and Moments of Inertia
    8. 5.7 Change of Variables in Multiple Integrals
    9. Key Terms
    10. Key Equations
    11. Key Concepts
    12. Chapter Review Exercises
  7. 6 Vector Calculus
    1. Introduction
    2. 6.1 Vector Fields
    3. 6.2 Line Integrals
    4. 6.3 Conservative Vector Fields
    5. 6.4 Green’s Theorem
    6. 6.5 Divergence and Curl
    7. 6.6 Surface Integrals
    8. 6.7 Stokes’ Theorem
    9. 6.8 The Divergence Theorem
    10. Key Terms
    11. Key Equations
    12. Key Concepts
    13. Chapter Review Exercises
  8. 7 Second-Order Differential Equations
    1. Introduction
    2. 7.1 Second-Order Linear Equations
    3. 7.2 Nonhomogeneous Linear Equations
    4. 7.3 Applications
    5. 7.4 Series Solutions of Differential Equations
    6. Key Terms
    7. Key Equations
    8. Key Concepts
    9. Chapter Review Exercises
  9. A | Table of Integrals
  10. B | Table of Derivatives
  11. C | Review of Pre-Calculus
  12. Answer Key
    1. Chapter 1
    2. Chapter 2
    3. Chapter 3
    4. Chapter 4
    5. Chapter 5
    6. Chapter 6
    7. Chapter 7
  13. Index

Learning Objectives

  • 4.5.1. State the chain rules for one or two independent variables.
  • 4.5.2. Use tree diagrams as an aid to understanding the chain rule for several independent and intermediate variables.
  • 4.5.3. Perform implicit differentiation of a function of two or more variables.

In single-variable calculus, we found that one of the most useful differentiation rules is the chain rule, which allows us to find the derivative of the composition of two functions. The same thing is true for multivariable calculus, but this time we have to deal with more than one form of the chain rule. In this section, we study extensions of the chain rule and learn how to take derivatives of compositions of functions of more than one variable.

Chain Rules for One or Two Independent Variables

Recall that the chain rule for the derivative of a composite of two functions can be written in the form

ddx(f(g(x)))=f(g(x))g(x).ddx(f(g(x)))=f(g(x))g(x).

In this equation, both f(x)f(x) and g(x)g(x) are functions of one variable. Now suppose that ff is a function of two variables and gg is a function of one variable. Or perhaps they are both functions of two variables, or even more. How would we calculate the derivative in these cases? The following theorem gives us the answer for the case of one independent variable.

Theorem 4.8

Chain Rule for One Independent Variable

Suppose that x=g(t)x=g(t) and y=h(t)y=h(t) are differentiable functions of tt and z=f(x,y)z=f(x,y) is a differentiable function of xandy.xandy. Then z=f(x(t),y(t))z=f(x(t),y(t)) is a differentiable function of tt and

dzdt=zx·dxdt+zy·dydt,dzdt=zx·dxdt+zy·dydt,
4.29

where the ordinary derivatives are evaluated at tt and the partial derivatives are evaluated at (x,y).(x,y).

Proof

The proof of this theorem uses the definition of differentiability of a function of two variables. Suppose that f is differentiable at the point P(x0,y0),P(x0,y0), where x0=g(t0)x0=g(t0) and y0=h(t0)y0=h(t0) for a fixed value of t0.t0. We wish to prove that z=f(x(t),y(t))z=f(x(t),y(t)) is differentiable at t=t0t=t0 and that Equation 4.29 holds at that point as well.

Since ff is differentiable at P,P, we know that

z(t)=f(x,y)=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0)+E(x,y),z(t)=f(x,y)=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0)+E(x,y),
4.30

where lim(x,y)(x0,y0)E(x,y)(xx0)2+(yy0)2=0.lim(x,y)(x0,y0)E(x,y)(xx0)2+(yy0)2=0. We then subtract z0=f(x0,y0)z0=f(x0,y0) from both sides of this equation:

z(t)z(t0)=f(x(t),y(t))f(x(t0),y(t0))=fx(x0,y0)(x(t)x(t0))+fy(x0,y0)(y(t)y(t0))+E(x(t),y(t)).z(t)z(t0)=f(x(t),y(t))f(x(t0),y(t0))=fx(x0,y0)(x(t)x(t0))+fy(x0,y0)(y(t)y(t0))+E(x(t),y(t)).

Next, we divide both sides by tt0:tt0:

z(t)z(t0)tt0=fx(x0,y0)(x(t)x(t0)tt0)+fy(x0,y0)(y(t)y(t0)tt0)+E(x(t),y(t))tt0.z(t)z(t0)tt0=fx(x0,y0)(x(t)x(t0)tt0)+fy(x0,y0)(y(t)y(t0)tt0)+E(x(t),y(t))tt0.

Then we take the limit as tt approaches t0:t0:

limtt0z(t)z(t0)tt0=fx(x0,y0)limtt0(x(t)x(t0)tt0)+fy(x0,y0)limtt0(y(t)y(t0)tt0)+limtt0E(x(t),y(t))tt0.limtt0z(t)z(t0)tt0=fx(x0,y0)limtt0(x(t)x(t0)tt0)+fy(x0,y0)limtt0(y(t)y(t0)tt0)+limtt0E(x(t),y(t))tt0.

The left-hand side of this equation is equal to dz/dt,dz/dt, which leads to

dzdt=fx(x0,y0)dxdt+fy(x0,y0)dydt+limtt0E(x(t),y(t))tt0.dzdt=fx(x0,y0)dxdt+fy(x0,y0)dydt+limtt0E(x(t),y(t))tt0.

The last term can be rewritten as

limtt0E(x(t),y(t))tt0=limtt0(E(x,y)(xx0)2+(yy0)2(xx0)2+(yy0)2tt0)=limtt0(E(x,y)(xx0)2+(yy0)2)limtt0((xx0)2+(yy0)2tt0).limtt0E(x(t),y(t))tt0=limtt0(E(x,y)(xx0)2+(yy0)2(xx0)2+(yy0)2tt0)=limtt0(E(x,y)(xx0)2+(yy0)2)limtt0((xx0)2+(yy0)2tt0).

As tt approaches t0,t0, (x(t),y(t))(x(t),y(t)) approaches (x(t0),y(t0)),(x(t0),y(t0)), so we can rewrite the last product as

lim(x,y)(x0,y0)(E(x,y)(xx0)2+(yy0)2)lim(x,y)(x0,y0)((xx0)2+(yy0)2tt0).lim(x,y)(x0,y0)(E(x,y)(xx0)2+(yy0)2)lim(x,y)(x0,y0)((xx0)2+(yy0)2tt0).

Since the first limit is equal to zero, we need only show that the second limit is finite:

lim(x,y)(x0,y0)((xx0)2+(yy0)2tt0)=lim(x,y)(x0,y0)((xx0)2+(yy0)2(tt0)2)=lim(x,y)(x0,y0)((xx0tt0)2+(yy0tt0)2)=(lim(x,y)(x0,y0)(xx0tt0))2+(lim(x,y)(x0,y0)(yy0tt0))2.lim(x,y)(x0,y0)((xx0)2+(yy0)2tt0)=lim(x,y)(x0,y0)((xx0)2+(yy0)2(tt0)2)=lim(x,y)(x0,y0)((xx0tt0)2+(yy0tt0)2)=(lim(x,y)(x0,y0)(xx0tt0))2+(lim(x,y)(x0,y0)(yy0tt0))2.

Since x(t)x(t) and y(t)y(t) are both differentiable functions of t,t, both limits inside the last radical exist. Therefore, this value is finite. This proves the chain rule at t=t0;t=t0; the rest of the theorem follows from the assumption that all functions are differentiable over their entire domains.

Closer examination of Equation 4.29 reveals an interesting pattern. The first term in the equation is fx·dxdtfx·dxdt and the second term is fy·dydt.fy·dydt. Recall that when multiplying fractions, cancelation can be used. If we treat these derivatives as fractions, then each product “simplifies” to something resembling f/dt.f/dt. The variables xandyxandy that disappear in this simplification are often called intermediate variables: they are independent variables for the function f,f, but are dependent variables for the variable t.t. Two terms appear on the right-hand side of the formula, and ff is a function of two variables. This pattern works with functions of more than two variables as well, as we see later in this section.

Example 4.26

Using the Chain Rule

Calculate dz/dtdz/dt for each of the following functions:

  1. z=f(x,y)=4x2+3y2,x=x(t)=sint,y=y(t)=costz=f(x,y)=4x2+3y2,x=x(t)=sint,y=y(t)=cost
  2. z=f(x,y)=x2y2,x=x(t)=e2t,y=y(t)=etz=f(x,y)=x2y2,x=x(t)=e2t,y=y(t)=et

Solution

  1. To use the chain rule, we need four quantities—z/x,z/y,dx/dt,z/x,z/y,dx/dt, and dy/dt:dy/dt:
    zx=8xzy=6ydxdt=costdydt=sintzx=8xzy=6ydxdt=costdydt=sint

    Now, we substitute each of these into Equation 4.29:
    dzdt=zx·dxdt+zy·dydt=(8x)(cost)+(6y)(sint)=8xcost6ysint.dzdt=zx·dxdt+zy·dydt=(8x)(cost)+(6y)(sint)=8xcost6ysint.

    This answer has three variables in it. To reduce it to one variable, use the fact that x(t)=sintandy(t)=cost.x(t)=sintandy(t)=cost. We obtain
    dzdt=8xcost6ysint=8(sint)cost6(cost)sint=2sintcost.dzdt=8xcost6ysint=8(sint)cost6(cost)sint=2sintcost.

    This derivative can also be calculated by first substituting x(t)x(t) and y(t)y(t) into f(x,y),f(x,y), then differentiating with respect to t:t:
    z=f(x,y)=f(x(t),y(t))=4(x(t))2+3(y(t))2=4sin2t+3cos2t.z=f(x,y)=f(x(t),y(t))=4(x(t))2+3(y(t))2=4sin2t+3cos2t.

    Then
    dzdt=2(4sint)(cost)+2(3cost)(sint)=8sintcost6sintcost=2sintcost,dzdt=2(4sint)(cost)+2(3cost)(sint)=8sintcost6sintcost=2sintcost,

    which is the same solution. However, it may not always be this easy to differentiate in this form.
  2. To use the chain rule, we again need four quantities—z/x,z/dy,dx/dt,z/x,z/dy,dx/dt, and dy/dt:dy/dt:
    zx=xx2y2zy=yx2y2dxdt=2e2tdxdt=et.zx=xx2y2zy=yx2y2dxdt=2e2tdxdt=et.

    We substitute each of these into Equation 4.29:
    dzdt=zx·dxdt+zy·dydt=(xx2y2)(2e2t)+(yx2y2)(et)=2xe2tyetx2y2.dzdt=zx·dxdt+zy·dydt=(xx2y2)(2e2t)+(yx2y2)(et)=2xe2tyetx2y2.

    To reduce this to one variable, we use the fact that x(t)=e2tx(t)=e2t and y(t)=et.y(t)=et. Therefore,
    dzdt=2xe2t+yetx2y2=2(e2t)e2t+(et)ete4te−2t=2e4t+e−2te4te−2t.dzdt=2xe2t+yetx2y2=2(e2t)e2t+(et)ete4te−2t=2e4t+e−2te4te−2t.

    To eliminate negative exponents, we multiply the top by e2te2t and the bottom by e4t:e4t:
    dzdt=2e4t+e−2te4te−2t·e2te4t=2e6t+1e8te2t=2e6t+1e2t(e6t1)=2e6t+1ete6t1.dzdt=2e4t+e−2te4te−2t·e2te4t=2e6t+1e8te2t=2e6t+1e2t(e6t1)=2e6t+1ete6t1.

    Again, this derivative can also be calculated by first substituting x(t)x(t) and y(t)y(t) into f(x,y),f(x,y), then differentiating with respect to t:t:
    z=f(x,y)=f(x(t),y(t))=(x(t))2(y(t))2=e4te−2t=(e4te−2t)1/2.z=f(x,y)=f(x(t),y(t))=(x(t))2(y(t))2=e4te−2t=(e4te−2t)1/2.

    Then
    dzdt=12(e4te−2t)1/2(4e4t+2e−2t)=2e4t+e−2te4te−2t.dzdt=12(e4te−2t)1/2(4e4t+2e−2t)=2e4t+e−2te4te−2t.

    This is the same solution.

Checkpoint 4.23

Calculate dz/dtdz/dt given the following functions. Express the final answer in terms of t.t.

z=f(x,y)=x23xy+2y2,x=x(t)=3sin2t,y=y(t)=4cos2tz=f(x,y)=x23xy+2y2,x=x(t)=3sin2t,y=y(t)=4cos2t

It is often useful to create a visual representation of Equation 4.29 for the chain rule. This is called a tree diagram for the chain rule for functions of one variable and it provides a way to remember the formula (Figure 4.34). This diagram can be expanded for functions of more than one variable, as we shall see very shortly.

A diagram that starts with z = f(x, y). Along the first branch, it is written ∂z/∂x, then x = x(t), then dx/dt, then t, and finally it says ∂z/∂x dx/dt. Along the other branch, it is written ∂z/∂y, then y = y(t), then dy/dt, then t, and finally it says ∂z/∂y dy/dt.
Figure 4.34 Tree diagram for the case dzdt=zx·dxdt+zy·dydt.dzdt=zx·dxdt+zy·dydt.

In this diagram, the leftmost corner corresponds to z=f(x,y).z=f(x,y). Since ff has two independent variables, there are two lines coming from this corner. The upper branch corresponds to the variable xx and the lower branch corresponds to the variable y.y. Since each of these variables is then dependent on one variable t,t, one branch then comes from xx and one branch comes from y.y. Last, each of the branches on the far right has a label that represents the path traveled to reach that branch. The top branch is reached by following the xx branch, then the tt branch; therefore, it is labeled (z/x)×(dx/dt).(z/x)×(dx/dt). The bottom branch is similar: first the yy branch, then the tt branch. This branch is labeled (z/y)×(dy/dt).(z/y)×(dy/dt). To get the formula for dz/dt,dz/dt, add all the terms that appear on the rightmost side of the diagram. This gives us Equation 4.29.

In Chain Rule for Two Independent Variables, z=f(x,y)z=f(x,y) is a function of xandy,xandy, and both x=g(u,v)x=g(u,v) and y=h(u,v)y=h(u,v) are functions of the independent variables uandv.uandv.

Theorem 4.9

Chain Rule for Two Independent Variables

Suppose x=g(u,v)x=g(u,v) and y=h(u,v)y=h(u,v) are differentiable functions of uu and v,v, and z=f(x,y)z=f(x,y) is a differentiable function of xandy.xandy. Then, z=f(g(u,v),h(u,v))z=f(g(u,v),h(u,v)) is a differentiable function of uandv,uandv, and

zu=zxxu+zyxuzu=zxxu+zyxu
4.31

and

zv=zxxv+zyyv.zv=zxxv+zyyv.
4.32

We can draw a tree diagram for each of these formulas as well as follows.

A diagram that starts with z = f(x, y). Along the first branch, it is written ∂z/∂x, then x = g(u, v), at which point it breaks into another two branches: the first subbranch says ∂x/∂u, then u, and finally it says ∂z/∂x ∂x/∂u; the second subbranch says ∂x/∂v, then v, and finally it says ∂z/∂x ∂x/∂v. Along the other branch, it is written ∂z/∂y, then y = h(u, v), at which point it breaks into another two branches: the first subbranch says ∂y/∂u, then u, and finally it says ∂z/∂y ∂y/∂u; the second subbranch says ∂y/∂v, then v, and finally it says ∂z/∂y ∂y/∂v.
Figure 4.35 Tree diagram for zu=zx·xu+zy·yuzu=zx·xu+zy·yu and zv=zx·xv+zy·yv.zv=zx·xv+zy·yv.

To derive the formula for z/u,z/u, start from the left side of the diagram, then follow only the branches that end with uu and add the terms that appear at the end of those branches. For the formula for z/v,z/v, follow only the branches that end with vv and add the terms that appear at the end of those branches.

There is an important difference between these two chain rule theorems. In Chain Rule for One Independent Variable, the left-hand side of the formula for the derivative is not a partial derivative, but in Chain Rule for Two Independent Variables it is. The reason is that, in Chain Rule for One Independent Variable, zz is ultimately a function of tt alone, whereas in Chain Rule for Two Independent Variables, zz is a function of both uandv.uandv.

Example 4.27

Using the Chain Rule for Two Variables

Calculate z/uz/u and z/vz/v using the following functions:

z=f(x,y)=3x22xy+y2,x=x(u,v)=3u+2v,y=y(u,v)=4uv.z=f(x,y)=3x22xy+y2,x=x(u,v)=3u+2v,y=y(u,v)=4uv.

Solution

To implement the chain rule for two variables, we need six partial derivatives—z/x,z/y,x/u,x/v,y/u,z/x,z/y,x/u,x/v,y/u, and y/v:y/v:

zx=6x2yzy=−2x+2yxu=3xv=2yu=4yv=−1.zx=6x2yzy=−2x+2yxu=3xv=2yu=4yv=−1.

To find z/u,z/u, we use Equation 4.31:

zu=zx·xu+zy·yu=3(6x2y)+4(−2x+2y)=10x+2y.zu=zx·xu+zy·yu=3(6x2y)+4(−2x+2y)=10x+2y.

Next, we substitute x(u,v)=3u+2vx(u,v)=3u+2v and y(u,v)=4uv:y(u,v)=4uv:

zu=10x+2y=10(3u+2v)+2(4uv)=38u+18v.zu=10x+2y=10(3u+2v)+2(4uv)=38u+18v.

To find z/v,z/v, we use Equation 4.32:

zv=zxxv+zyyv=2(6x2y)+(−1)(−2x+2y)=14x6y.zv=zxxv+zyyv=2(6x2y)+(−1)(−2x+2y)=14x6y.

Then we substitute x(u,v)=3u+2vx(u,v)=3u+2v and y(u,v)=4uv:y(u,v)=4uv:

zv=14x6y=14(3u+2v)6(4uv)=18u+34v.zv=14x6y=14(3u+2v)6(4uv)=18u+34v.

Checkpoint 4.24

Calculate z/uz/u and z/vz/v given the following functions:

z=f(x,y)=2xyx+3y,x(u,v)=e2ucos3v,y(u,v)=e2usin3v.z=f(x,y)=2xyx+3y,x(u,v)=e2ucos3v,y(u,v)=e2usin3v.

The Generalized Chain Rule

Now that we’ve see how to extend the original chain rule to functions of two variables, it is natural to ask: Can we extend the rule to more than two variables? The answer is yes, as the generalized chain rule states.

Theorem 4.10

Generalized Chain Rule

Let w=f(x1,x2,…,xm)w=f(x1,x2,…,xm) be a differentiable function of mm independent variables, and for each i{1,…,m},i{1,…,m}, let xi=xi(t1,t2,…,tn)xi=xi(t1,t2,…,tn) be a differentiable function of nn independent variables. Then

wtj=wx1x1tj+wx2x2tj++wxmxmtjwtj=wx1x1tj+wx2x2tj++wxmxmtj
4.33

for any j{1,2,…,n}.j{1,2,…,n}.

In the next example we calculate the derivative of a function of three independent variables in which each of the three variables is dependent on two other variables.

Example 4.28

Using the Generalized Chain Rule

Calculate w/uw/u and w/vw/v using the following functions:

w=f(x,y,z)=3x22xy+4z2x=x(u,v)=eusinvy=y(u,v)=eucosvz=z(u,v)=eu.w=f(x,y,z)=3x22xy+4z2x=x(u,v)=eusinvy=y(u,v)=eucosvz=z(u,v)=eu.

Solution

The formulas for w/uw/u and w/vw/v are

wu=wx·xu+wy·yu+wz·zuwv=wx·xv+wy·yv+wz·zv.wu=wx·xu+wy·yu+wz·zuwv=wx·xv+wy·yv+wz·zv.

Therefore, there are nine different partial derivatives that need to be calculated and substituted. We need to calculate each of them:

wx=6x2ywy=−2xwz=8zxu=eusinvyu=eucosvzu=euxv=eucosvyv=eusinvzv=0.wx=6x2ywy=−2xwz=8zxu=eusinvyu=eucosvzu=euxv=eucosvyv=eusinvzv=0.

Now, we substitute each of them into the first formula to calculate w/u:w/u:

wu=wx·xu+wy·yu+wz·zu=(6x2y)eusinv2xeucosv+8zeu,wu=wx·xu+wy·yu+wz·zu=(6x2y)eusinv2xeucosv+8zeu,

then substitute x(u,v)=eusinv,y(u,v)=eucosv,x(u,v)=eusinv,y(u,v)=eucosv, and z(u,v)=euz(u,v)=eu into this equation:

wu=(6x2y)eusinv2xeucosv+8zeu=(6eusinv2eucosv)eusinv2(eusinv)eucosv+8e2u=6e2usin2v4e2usinvcosv+8e2u=2e2u(3sin2v2sinvcosv+4).wu=(6x2y)eusinv2xeucosv+8zeu=(6eusinv2eucosv)eusinv2(eusinv)eucosv+8e2u=6e2usin2v4e2usinvcosv+8e2u=2e2u(3sin2v2sinvcosv+4).

Next, we calculate w/v:w/v:

wv=wx·xv+wy·yv+wz·zv=(6x2y)eucosv2x(eusinv)+8z(0),wv=wx·xv+wy·yv+wz·zv=(6x2y)eucosv2x(eusinv)+8z(0),

then we substitute x(u,v)=eusinv,y(u,v)=eucosv,x(u,v)=eusinv,y(u,v)=eucosv, and z(u,v)=euz(u,v)=eu into this equation:

wv=(6x2y)eucosv2x(eusinv)=(6eusinv2eucosv)eucosv+2(eusinv)(eusinv)=2e2usin2v+6e2usinvcosv2e2ucos2v=2e2u(sin2v+sinvcosvcos2v).wv=(6x2y)eucosv2x(eusinv)=(6eusinv2eucosv)eucosv+2(eusinv)(eusinv)=2e2usin2v+6e2usinvcosv2e2ucos2v=2e2u(sin2v+sinvcosvcos2v).
Checkpoint 4.25

Calculate w/uw/u and w/vw/v given the following functions:

w=f(x,y,z)=x+2y4z2xy+3zx=x(u,v)=e2ucos3vy=y(u,v)=e2usin3vz=z(u,v)=e2u.w=f(x,y,z)=x+2y4z2xy+3zx=x(u,v)=e2ucos3vy=y(u,v)=e2usin3vz=z(u,v)=e2u.

Example 4.29

Drawing a Tree Diagram

Create a tree diagram for the case when

w=f(x,y,z),x=x(t,u,v),y=y(t,u,v),z=z(t,u,v)w=f(x,y,z),x=x(t,u,v),y=y(t,u,v),z=z(t,u,v)

and write out the formulas for the three partial derivatives of w.w.

Solution

Starting from the left, the function ff has three independent variables: x,y,andz.x,y,andz. Therefore, three branches must be emanating from the first node. Each of these three branches also has three branches, for each of the variables t,u,andv.t,u,andv.

A diagram that starts with w = f(x, y, z). Along the first branch, it is written ∂w/∂x, then x = x(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then ∂w/∂x ∂x/∂t; the second subbranch says u and then ∂w/∂x ∂x/∂u; and the third subbranch says v and then ∂w/∂x ∂x/∂v. Along the second branch, it is written ∂w/∂y, then y = y(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then ∂w/∂y ∂y/∂t; the second subbranch says u and then ∂w/∂y ∂y/∂u; and the third subbranch says v and then ∂w/∂y ∂y/∂v. Along the third branch, it is written ∂w/∂z, then z = z(t, u, v), at which point it breaks into another three subbranches: the first subbranch says t and then ∂w/∂z ∂z/∂t; the second subbranch says u and then ∂w/∂z ∂z/∂u; and the third subbranch says v and then ∂w/∂z ∂z/∂v.
Figure 4.36 Tree diagram for a function of three variables, each of which is a function of three independent variables.

The three formulas are

wt=wxxt+wyyt+wzztwu=wxxu+wyyu+wzzuwv=wxxv+wyyv+wzzv.wt=wxxt+wyyt+wzztwu=wxxu+wyyu+wzzuwv=wxxv+wyyv+wzzv.
Checkpoint 4.26

Create a tree diagram for the case when

w=f(x,y),x=x(t,u,v),y=y(t,u,v)w=f(x,y),x=x(t,u,v),y=y(t,u,v)

and write out the formulas for the three partial derivatives of w.w.

Implicit Differentiation

Recall from Implicit Differentiation that implicit differentiation provides a method for finding dy/dxdy/dx when yy is defined implicitly as a function of x.x. The method involves differentiating both sides of the equation defining the function with respect to x,x, then solving for dy/dx.dy/dx. Partial derivatives provide an alternative to this method.

Consider the ellipse defined by the equation x2+3y2+4y4=0x2+3y2+4y4=0 as follows.

An ellipse with center near (0, –0.7), major axis horizontal and of length roughly 4.5, and minor axis of length roughly 3.
Figure 4.37 Graph of the ellipse defined by x2+3y2+4y4=0.x2+3y2+4y4=0.

This equation implicitly defines yy as a function of x.x. As such, we can find the derivative dy/dxdy/dx using the method of implicit differentiation:

ddx(x2+3y2+4y4)=ddx(0)2x+6ydydx+4dydx=0(6y+4)dydx=−2xdydx=x3y+2.ddx(x2+3y2+4y4)=ddx(0)2x+6ydydx+4dydx=0(6y+4)dydx=−2xdydx=x3y+2.

We can also define a function z=f(x,y)z=f(x,y) by using the left-hand side of the equation defining the ellipse. Then f(x,y)=x2+3y2+4y4.f(x,y)=x2+3y2+4y4. The ellipse x2+3y2+4y4=0x2+3y2+4y4=0 can then be described by the equation f(x,y)=0.f(x,y)=0. Using this function and the following theorem gives us an alternative approach to calculating dy/dx.dy/dx.

Theorem 4.11

Implicit Differentiation of a Function of Two or More Variables

Suppose the function z=f(x,y)z=f(x,y) defines yy implicitly as a function y=g(x)y=g(x) of xx via the equation f(x,y)=0.f(x,y)=0. Then

dydx=f/xf/ydydx=f/xf/y
4.34

provided fy(x,y)0.fy(x,y)0.

If the equation f(x,y,z)=0f(x,y,z)=0 defines zz implicitly as a differentiable function of xandy,xandy, then

zx=f/xf/zandzy=f/yf/zzx=f/xf/zandzy=f/yf/z
4.35

as long as fz(x,y,z)0.fz(x,y,z)0.

Equation 4.34 is a direct consequence of Equation 4.31. In particular, if we assume that yy is defined implicitly as a function of xx via the equation f(x,y)=0,f(x,y)=0, we can apply the chain rule to find dy/dx:dy/dx:

ddxf(x,y)=ddx(0)fx·dxdx+fy·dydx=0fx+fy·dydx=0.ddxf(x,y)=ddx(0)fx·dxdx+fy·dydx=0fx+fy·dydx=0.

Solving this equation for dy/dxdy/dx gives Equation 4.34. Equation 4.35 can be derived in a similar fashion.

Let’s now return to the problem that we started before the previous theorem. Using Implicit Differentiation of a Function of Two or More Variables and the function f(x,y)=x2+3y2+4y4,f(x,y)=x2+3y2+4y4, we obtain

fx=2xfy=6y+4.fx=2xfy=6y+4.

Then Equation 4.34 gives

dydx=f/xf/y=2x6y+4=x3y+2,dydx=f/xf/y=2x6y+4=x3y+2,

which is the same result obtained by the earlier use of implicit differentiation.

Example 4.30

Implicit Differentiation by Partial Derivatives

  1. Calculate dy/dxdy/dx if yy is defined implicitly as a function of xx via the equation 3x22xy+y2+4x6y11=0.3x22xy+y2+4x6y11=0. What is the equation of the tangent line to the graph of this curve at point (2,1)?(2,1)?
  2. Calculate z/xz/x and z/y,z/y, given x2eyyzex=0.x2eyyzex=0.

Solution

  1. Set f(x,y)=3x22xy+y2+4x6y11=0,f(x,y)=3x22xy+y2+4x6y11=0, then calculate fxfx and fy:fy: fx=6x2y+4fy=−2x+2y6.fx=6x2y+4fy=−2x+2y6.
    The derivative is given by
    dydx=f/xf/y=6x2y+4−2x+2y6=3xy+2xy+3.dydx=f/xf/y=6x2y+4−2x+2y6=3xy+2xy+3.

    The slope of the tangent line at point (2,1)(2,1) is given by
    dydx|(x,y)=(2,1)=3(2)1+221+3=74.dydx|(x,y)=(2,1)=3(2)1+221+3=74.

    To find the equation of the tangent line, we use the point-slope form (Figure 4.38):
    yy0=m(xx0)y1=74(x2)y=74x72+1y=74x52.yy0=m(xx0)y1=74(x2)y=74x72+1y=74x52.

    A rotated ellipse with equation 3x2 – 2xy + y2 + 4x – 6y – 11 = 0 and with tangent at (2, 1). The equation for the tangent is given by y = 7/4 x – 5/2. The ellipse’s major axis is parallel to the tangent line.
    Figure 4.38 Graph of the rotated ellipse defined by 3x22xy+y2+4x6y11=0.3x22xy+y2+4x6y11=0.
  2. We have f(x,y,z)=x2eyyzex.f(x,y,z)=x2eyyzex. Therefore,
    fx=2xeyyzexfy=x2eyzexfz=yex.fx=2xeyyzexfy=x2eyzexfz=yex.

    Using Equation 4.35,
    zx=f/xf/y=2xeyyzexyex=2xeyyzexyexandzy=f/yf/z=x2eyzexyex=x2eyzexyex.zx=f/xf/y=2xeyyzexyex=2xeyyzexyexandzy=f/yf/z=x2eyzexyex=x2eyzexyex.
Checkpoint 4.27

Find dy/dxdy/dx if yy is defined implicitly as a function of xx by the equation x2+xyy2+7x3y26=0.x2+xyy2+7x3y26=0. What is the equation of the tangent line to the graph of this curve at point (3,−2)?(3,−2)?

Section 4.5 Exercises

For the following exercises, use the information provided to solve the problem.

215.

Let w(x,y,z)=xycosz,w(x,y,z)=xycosz, where x=t,y=t2,x=t,y=t2, and z=arcsint.z=arcsint. Find dwdt.dwdt.

216.

Let w(t,v)=etvw(t,v)=etv where t=r+st=r+s and v=rs.v=rs. Find wrwr and ws.ws.

217.

If w=5x2+2y2,x=−3s+t,w=5x2+2y2,x=−3s+t, and y=s4t,y=s4t, find wsws and wt.wt.

218.

If w=xy2,x=5cos(2t),w=xy2,x=5cos(2t), and y=5sin(2t),y=5sin(2t), find dwdt.dwdt.

219.

If f(x,y)=xy,x=rcosθ,f(x,y)=xy,x=rcosθ, and y=rsinθ,y=rsinθ, find frfr and express the answer in terms of rr and θ.θ.

220.

Suppose f(x,y)=x+y,u=exsiny,x=t2,f(x,y)=x+y,u=exsiny,x=t2, and y=πt,y=πt, where x=rcosθx=rcosθ and y=rsinθ.y=rsinθ. Find fθ.fθ.

For the following exercises, find dfdtdfdt using the chain rule and direct substitution.

221.

f(x,y)=x2+y2,f(x,y)=x2+y2, x=t,y=t2x=t,y=t2

222.

f(x,y)=x2+y2,y=t2,x=tf(x,y)=x2+y2,y=t2,x=t

223.

f(x,y)=xy,x=1t,y=1+tf(x,y)=xy,x=1t,y=1+t

224.

f(x,y)=xy,x=et,y=2etf(x,y)=xy,x=et,y=2et

225.

f(x,y)=ln(x+y),f(x,y)=ln(x+y), x=et,y=etx=et,y=et

226.

f(x,y)=x4,f(x,y)=x4, x=t,y=tx=t,y=t

227.

Let w(x,y,z)=x2+y2+z2,w(x,y,z)=x2+y2+z2, x=cost,y=sint,x=cost,y=sint, and z=et.z=et. Express ww as a function of tt and find dwdtdwdt directly. Then, find dwdtdwdt using the chain rule.

228.

Let z=x2y,z=x2y, where x=t2x=t2 and y=t3.y=t3. Find dzdt.dzdt.

229.

Let u=exsiny,u=exsiny, where x=t2x=t2 and y=πt.y=πt. Find dudtdudt when x=ln2x=ln2 and y=π4.y=π4.

For the following exercises, find dydxdydx using partial derivatives.

230.

sin(6x)+tan(8y)+5=0sin(6x)+tan(8y)+5=0

231.

x3+y2x3=0x3+y2x3=0

232.

sin(x+y)+cos(xy)=4sin(x+y)+cos(xy)=4

233.

x22xy+y4=4x22xy+y4=4

234.

xey+yex2x2y=0xey+yex2x2y=0

235.

x2/3+y2/3=a2/3x2/3+y2/3=a2/3

236.

xcos(xy)+ycosx=2xcos(xy)+ycosx=2

237.

exy+yey=1exy+yey=1

238.

x2y3+cosy=0x2y3+cosy=0

239.

Find dzdtdzdt using the chain rule where z=3x2y3,x=t4,z=3x2y3,x=t4, and y=t2.y=t2.

240.

Let z=3cosxsin(xy),x=1t,z=3cosxsin(xy),x=1t, and y=3t.y=3t. Find dzdt.dzdt.

241.

Let z=e1xy,x=t1/3,z=e1xy,x=t1/3, and y=t3.y=t3. Find dzdt.dzdt.

242.

Find dzdtdzdt by the chain rule where z=cosh2(xy),x=12t,z=cosh2(xy),x=12t, and y=et.y=et.

243.

Let z=xy,x=2cosu,z=xy,x=2cosu, and y=3sinv.y=3sinv. Find zuzu and zv.zv.

244.

Let z=ex2y,z=ex2y, where x=uvx=uv and y=1v.y=1v. Find zuzu and zv.zv.

245.

If z=xyex/y,z=xyex/y, x=rcosθ,x=rcosθ, and y=rsinθ,y=rsinθ, find zrzr and zθzθ when r=2r=2 and θ=π6.θ=π6.

246.

Find wsws if w=4x+y2+z3,x=ers2,y=ln(r+st),w=4x+y2+z3,x=ers2,y=ln(r+st), and z=rst2.z=rst2.

247.

If w=sin(xyz),x=13t,y=e1t,w=sin(xyz),x=13t,y=e1t, and z=4t,z=4t, find wt.wt.

For the following exercises, use this information: A function f(x,y)f(x,y) is said to be homogeneous of degree nn if f(tx,ty)=tnf(x,y).f(tx,ty)=tnf(x,y). For all homogeneous functions of degree n,n, the following equation is true: xfx+yfy=nf(x,y).xfx+yfy=nf(x,y). Show that the given function is homogeneous and verify that xfx+yfy=nf(x,y).xfx+yfy=nf(x,y).

248.

f(x,y)=3x2+y2f(x,y)=3x2+y2

249.

f(x,y)=x2+y2f(x,y)=x2+y2

250.

f(x,y)=x2y2y3f(x,y)=x2y2y3

251.

The volume of a right circular cylinder is given by V(x,y)=πx2y,V(x,y)=πx2y, where xx is the radius of the cylinder and y is the cylinder height. Suppose xx and yy are functions of tt given by x=12tx=12t and y=13ty=13t so that xandyxandy are both increasing with time. How fast is the volume increasing when x=2x=2 and y=5?y=5?

252.

The pressure PP of a gas is related to the volume and temperature by the formula PV=kT,PV=kT, where temperature is expressed in kelvins. Express the pressure of the gas as a function of both VV and T.T. Find dPdtdPdt when k=1,k=1, dVdt=2dVdt=2 cm3/min, dTdt=12dTdt=12 K/min, V=20V=20 cm3, and T=20°F.T=20°F.

253.

The radius of a right circular cone is increasing at 33 cm/min whereas the height of the cone is decreasing at 22 cm/min. Find the rate of change of the volume of the cone when the radius is 1313 cm and the height is 1818 cm.

254.

The volume of a frustum of a cone is given by the formula V=13πz(x2+y2+xy),V=13πz(x2+y2+xy), where xx is the radius of the smaller circle, yy is the radius of the larger circle, and zz is the height of the frustum (see figure). Find the rate of change of the volume of this frustum when x=10in.,y=12in.,andz=18in.x=10in.,y=12in.,andz=18in.

A conical frustum (that is, a cone with the pointy end cut off) with height x, larger radius y, and smaller radius x.
255.

A closed box is in the shape of a rectangular solid with dimensions x,y,andz.x,y,andz. (Dimensions are in inches.) Suppose each dimension is changing at the rate of 0.50.5 in./min. Find the rate of change of the total surface area of the box when x=2in.,y=3in.,andz=1in.x=2in.,y=3in.,andz=1in.

256.

The total resistance in a circuit that has three individual resistances represented by x,y,x,y, and zz is given by the formula R(x,y,z)=xyzyz+xz+xy.R(x,y,z)=xyzyz+xz+xy. Suppose at a given time the xx resistance is 100Ω,100Ω, the y resistance is 200Ω,200Ω, and the zz resistance is 300Ω.300Ω. Also, suppose the xx resistance is changing at a rate of 2Ω/min,2Ω/min, the yy resistance is changing at the rate of 1Ω/min,1Ω/min, and the zz resistance has no change. Find the rate of change of the total resistance in this circuit at this time.

257.

The temperature TT at a point (x,y)(x,y) is T(x,y)T(x,y) and is measured using the Celsius scale. A fly crawls so that its position after tt seconds is given by x=1+tx=1+t and y=2+13t,y=2+13t, where xandyxandy are measured in centimeters. The temperature function satisfies Tx(2,3)=4Tx(2,3)=4 and Ty(2,3)=3.Ty(2,3)=3. How fast is the temperature increasing on the fly’s path after 33 sec?

258.

The xandyxandy components of a fluid moving in two dimensions are given by the following functions: u(x,y)=2yu(x,y)=2y and v(x,y)=−2x;v(x,y)=−2x; x0;y0.x0;y0. The speed of the fluid at the point (x,y)(x,y) is s(x,y)=u(x,y)2+v(x,y)2.s(x,y)=u(x,y)2+v(x,y)2. Find sxsx and sysy using the chain rule.

259.

Let u=u(x,y,z),u=u(x,y,z), where x=x(w,t),y=y(w,t),z=z(w,t),w=w(r,s),andt=t(r,s).x=x(w,t),y=y(w,t),z=z(w,t),w=w(r,s),andt=t(r,s). Use a tree diagram and the chain rule to find an expression for ur.ur.

Citation/Attribution

Want to cite, share, or modify this book? This book is Creative Commons Attribution-NonCommercial-ShareAlike License 4.0 and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction
Citation information

© Mar 30, 2016 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License 4.0 license. The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.