Using the notation from the section on local linearity, if x = x(t) and y = y(t), then we have that x t and y. t. And if z = f(x, y), then z x y

The Chain Rule So far we have considered partial derivative and directional derivatives. The goal of this section is to address the following question...
Author: Carmel Williams
2 downloads 0 Views 82KB Size
The Chain Rule So far we have considered partial derivative and directional derivatives. The goal of this section is to address the following question: What is the derivative of a function f(x, y) where both x and y are functions of other variables? We begin with the simple case where x and y are both functions of just a single variable, t. That is, x = g(t) and y = h(t). This means that z = f(x, y) = f(g(t), h(t)). Thus, at the end of the day, z is actually just a function of t. It might help to see a tangible example. Suppose z = f(x, y) = x2 + xy3, x = g(t) = t + 1 and y = h(t) = t2. If we substitute in for x and y, then we have that z = f(x, y) = f(g(t), h(t)) = (t + 1)2 + (t + 1)(t2)3 = (t + 1)(t6 + t + 1). We can take the derivative of this function with respect to t just like we did when we first learned about derivatives, since this is now just a function of only one-variable, t. Thus, we see how we can take the derivative. However, this approach does seem a bit cumbersome. Let us try to develop a more concise way to express dz/dt in terms of derivatives of x’s and y’s.

Using the notation from the section on local linearity, if x = x(t) and y = y(t), then we dx dy z z have that x  t and y  t . And if z = f(x, y), then z  x  y . dt dt x y Substituting in Dx and Dy, we have z 

Dividing both sides by Dt, we have

 z dx z dy  z dx z dy t  t     t . x dt y dt  x dt y dt 

z z dx z dy   . But as t ö 0, we have that t x dt y dt

dz z dx z dy   . We record this as the following: dt x dt y dt

The Chain Rule for z = f(x, y), x = g(t), y = h(t) If z = f(x, y), x = g(t), and y = h(t) are differentiable functions, then

dz z dx z dy   dt x dt y dt

1

Example 1: Suppose f(x, y) = excos(y) and x = t3 and y = 3t – 1. Compute dz/dt. Solution:

dx dy z z  3t 2 , and  3 . Putting this all  e x cos( y ) ,  e x sin( y ) , dt dt x y together (remembering to substitute in for x and y with functions of t), we have that 3 3 3 dz  et cos(3t  1)  3t 2  et sin(3t  1)  3  3et  t 2 cos(3t  1)  sin(3t  1)  . dt Notice that

The following figure provides a simple way of remembering the chain rule listed above. Notice that z depends on both x and y. And x and y both depend on t. Each line in the figure represents a derivative.

z ∑z

∑z

∑x

∑y

x

y

dx dt

dy dt

t Figure 1: Diagram for z = f(x, y), x = g(t) and y = h(t)

Notice that there are two paths from z down to t; one path passes through x and the other passes through y. We multiply each of the derivatives along the chain and add up the contributions at the end.

Example 2:

Suppose z = xln(y), x = 4t, y = t2 – 1. Compute z( 2) . Solution:

Notice that

z z x dx dy  ln( y ) ,  ,  4 , and  2t . x y y dt dt

2

Putting this all together (remembering to substitute in for x and y with functions of t), dz 4t 8t 2  ln(t 2  1)  4  2  2t  4 ln(t 2  1)  2 . Finally, plugging in t = 2, we have that dt t 1 t 1 8( 2) 2 8 2 2 we see that z ( 2)  4 ln(( 2)  1)   40   16 . 2 2 1 ( 2)  1

In general, we can use the following strategy to keep track of dependencies and compute (partial) derivatives using the chain rule.

Strategy for Using the Chain Rule In General

To find the rate of change of one variable with respect to another in a chain of composed differentiable functions: 1. Draw a diagram expressing the relationship between the variables 2. Labeling each link in the diagram with the appropriate derivative 3. For each path between the two variables, multiply the derivatives together. 4. Add the contributions from each path together

Following this strategy, we can consider a more complicated chain situation. Suppose that z = f(x, y) (as before), but now x = g(u, v) and y = h(u, v). If we substitute in for x and y, we have that z is a function of u and v. There are two paths between z and u, one passing through x and another passing through y, just as was the case above. But there are also two paths between z and v. Again, one passes through x and the other passes through y. The corresponding diagram appears below.

z ∑z

∑z

∑x

∑y

x

∑x ∑v

∑x

y

∑y ∑u

∑y

∑u

∑v

u

v

Figure 2: Diagram for z = f(x, y), x = g(u, v) and y = h(u, v)

3

Following the above rules, we have the following formulas for the partial derivatives of z with respect to u and v:

The Chain Rule for z = f(x, y), x = g(u, v), y = h(u, v)

If z = f(x, y), x = g(u, v), and y = h(u, v) are differentiable functions, then z z x z y   u x u y u and

z z x z y   v x v y v

Example 3:

Suppose that w = exy, x = 2u and y = u2 – 3v. Compute ∑w/∑u and ∑w/∑v. Solution:

w x x y y w  ye xy ,  xe xy ,  2, 0,  2u , and  3 . Putting x u v u y v this all together (remembering to substitute in for x and y with functions of u and v), we 2 2 2 w  (u 2  3v)e 2u ( u 3v )  2  (2u )e 2u (u 3v )  2u  6e2u (u 3v )  u 2  v  and have that u 2 2 2 w  (u 2  3v)e 2u ( u 3v )  0  (2u )e 2u ( u 3v )  (3)  6ue 2u ( u 3v ) . v Notice that

Example 4:

Suppose z = ln(x + y), x  u  v , y = ev + u. Compute ∑z/∑u and ∑z/∑v. Solution:

1 1 x 1 x y y z z  ev . So, we  ,  ,  , 1,  1 , and v x x  y y x  y u 2 u v u z 1 1 1 1   1     1    1 have that   v v v u u ve u 2 u u ve u   u  v  e  u  2 u Notice that

and

z 1 1 1    1   ev   1  ev  .   v v v v u ve u u ve u  u ve u 

4

To evaluate the derivative a particular point when the chain rule is being used, we have to be a little careful. Suppose that z = f(x, y) and x = g(u, v) and y = h(u, v) and we are asked to take the derivative at a particular point (u0, v0). We can take the partial derivatives with respect to u and v first and then plug in the desired point. We did something very similar to this in Example 2. Alternatively, we can plug the point (u0, v0) into both x and y and get the z z while corresponding point for x’s and y’s. Then we can plug that point into and y x x x y y plugging the original (u0, v0) into , , , and . This second approach has the u v u v advantage that we do not need to know the function explicitly; rather, we only need to the value of the partial derivatives at a particular point, as the next example illustrates.

Example 5:

Suppose f(x, y) is a differentiable function where x = rcosq and y = rsinq. Use the formulas for x and y, and the table of values below to calculate ∑f/∑r and ∑f/∑q when r = 2 and q = p/2. ( x, y ) (0, 2) (2, 0)

f ( x, y ) 5 3

f x ( x, y ) 1 1

f y ( x, y ) 4 2

2

2

4



(2, ) 2

Solution:

Notice that when r = 2 and q = p/2, we have that x = 0 and y = 2. Thus, we have that f f f f   f y (0, 2)  4 .   f x (0, 2)  1 . Similarly, y r  2, y x 0, x r  2, x x 0,   /2

Also,

y2

x  cos  r  2,  cos   / 2 r r  2,   / 2

Similarly,

  /2

   0 and x

y  sin  r  2,  sin   / 2 r r  2,   /2

y 2



2

   1 and y

r  2,

  /2



2

5

  r sin 

r  2,

  /2

 r cos 

r  2,   /2

r  2,   /2

 2sin

 2 cos

   2 . 

2

   0. 

2

Thus, we have that

f f x f y    1 0  4 1  4 and r x r y r

f f x f y    1 (2)  4  0  2 .  x  y 

6

Suggest Documents