Section.7 The Chain Rule Composition of Functions There is another way of combining two functions to obtain a new function. For example, suppose that y = fu) = u and u = gx) = x 2 +. Since y is a function of u and u is, in turn, a function of x, it follows that y is ultimately a function of x. We compute this by substitution: y = fu) = fgx)) = fx 2 +) = x 2 + The procedure is called composition because the new function is composed of the two given functions f and g. EXAMPLE: If fx) = x 2 + and gx) = x 3, then fx 2 +) a) ffx)) = or fx)) 2 + = x2 +) 2 + = x 2 ) 2 +2 x 2 + 2 + = x 4 +2x 2 +2 fx 3) b) fgx)) = or gx)) 2 + = x 3)2 + = x 2 2 x 3+3 2 + = x 2 6x+0 gx 2 +) c) gfx)) = or fx) 3 = x2 +) 3 = x 2 2 gx 3) d) ggx)) = or = x 3) 3 = x 6 gx) 3 e) fg2)) = 2 3) 2 + = ) 2 + = + = 2, gf2)) = 2 2 2 = 4 2 = 2 EXAMPLE: If fx) = x and gx) = 2 x, then a) fgx)) = f 2 x) = 2 x = 4 2 x b) gfx)) = g x) = 2 x c) ffx)) = f x) = x = 4 x d) ggx)) = g 2 x) = 2 2 x EXAMPLE: If fx) = x and gx) =, then ffx)) = x fgx)) = gfx)) = ggx)) =
EXAMPLE: a) Express the function hx) = x 3 +x 2 5) 4 as the composite of two functions. Solution: One way to do this is to let fx) = x 3 +x 2 5 and gx) = x 4 ; then g[fx)] = g[x 3 +x 2 5] = x 3 +x 2 5) 4 = hx). b) Express the function hx) = 4x 2 +5 as the composite of two functions in two different ways. Solution: One way is to let fx) = 4x 2 +5 and gx) = x, so that g[fx)] = g[4x 2 +5] = 4x 2 +5 = hx) Another way is to let kx) = 4x 2 and tx) = x+5; then PROBLEM: Let fx) = +x) 2. Find f x). t[kx)] = t[4x 2 ] = 4x 2 +5 = hx) The Chain Rule Solution : To find the derivative of this function, we do algebra first and then apply calculus rules: f x) = [+x) 2 ] = +2x+x 2 ) = +2x) +x 2 ) = 0+2 +2x = 2+2x Solution 2?): One can try to use the power rule immediately: f x) = [+x) 2 ] = 2+x) 2 = 2+x) Note that in both cases we got the same result. However, the goal of this Section is to show that despite the fact that Solution 2 gives the right answer, it is not completely correct. To explain what me mean by that, let us consider the following example: PROBLEM: Let fx) = x) 2. Find f x). Solution : We have f x) = [ x) 2 ] = 2x+x 2 ) = 2x) +x 2 ) 8 6 y = 0 2 +2x = 2+2x 4 2 Solution 2???): If we apply the power rule immediately, we get -2-0 0 2 x 3 4 f x) = [ x) 2 ]? = 2 x) 2 = 2 x) -2 Note that we got two different answers. One can easily see that the second answer is incorrect. In fact, if f x) = 2 x), then f 2) = 2 2) = 2 ) = 2. This means that the slope of the tangent line to the curve fx) = x) 2 at x = 2 is negative. But this is not the case! CONCLUSION: We can t always apply the rule x n ) = nx n to cases when we have u instead of x, where u is an algebraic expression different from x. 2
THE CHAIN RULE: If f and g are both differentiable and F = f g is the composite function defined by Fx) = fgx)), then F is differentiable and F is given by the product F x) = f gx)) g x) In Leibniz notation, if y = fu) and u = gx) are both differentiable functions, then EXAMPLE: If Fx) = x) 2, then or dy dx = dy du dudx F x) = [ x) 2 ] = [F = fgx)) where fx) = x 2,gx) = x] = 2 x) x) = 2 x) ) = 2 x) d x) 2 ) dx = [y = u 2,u = x] = du2 ) d x) du dx = 2u ) = 2 x) ) = 2 x) EXAMPLES:. [3x 2 5x+) 50 ] = 503x 2 5x+) 50 3x 2 5x+) = 503x 2 5x+) 49 6x 5) 2. [ 3 4x 2 ] = 3 4x2 ) /3 4x 2 ) = 3 4x2 ) 2/3 8x) = 8 3 x 4x2 ) 2/3 3. [5x+7+2x) 0 ] = 5x +7[+2x) 0 ] = 5 +7 0+2x) 0 +2x) = 5+70+2x) 9 2 = 5+40+2x) 9 4. [xx 2 x+) 23 ] = 5. [ ] = x 3 +2x 3 3
4. [xx 2 x+) 23 ] = x x 2 x+) 23 +x[x 2 x+) 23 ] = x 2 x+) 23 +x 23x 2 x+) 23 x 2 x+) = x 2 x+) 23 +23xx 2 x+) 22 x 2 ) x) +) ) = x 2 x+) 23 +23xx 2 x+) 22 2x +0) 5. = x 2 x+) 23 +23xx 2 x+) 22 2x ) [ ] = [x 3 +2x 3) ] = )x 3 +2x 3) x 3 +2x 3) x 3 +2x 3 = x 3 +2x 3) 2 x 3 ) +2x) 3) ) = x 3 +2x 3) 2 x 3 ) +2x) 3) ) = x 3 +2x 3) 2 3x 2 +2 0) = x 3 +2x 3) 2 3x 2 +2) COMMON MISTAKES. [ x) 3 ] = 3 x) 2 WRONG!!! Solution: By the Chain Rule we have: [ x) 3 ] = 3 x) 3 x) = 3 x) 2 ) x) ) = 3 x) 2 0 ) = 3 x) 2 ) = 3 x) 2 2. [x+x 5 ) 4 ] = 4+5x 4 ) 3 WRONG!!! Solution: By the Chain Rule we have [x+x 5 ) 4 ] = 4x+x 5 ) 4 x+x 5 ) = 4x+x 5 ) 3 x) +x 5 ) ) = 4x+x 5 ) 3 +5x 4 ) 4
Applications EXAMPLE: During a week-long promotion, the profit generated by an online sporting goods retailer from the sale of n official basketballs is given by Pn) = 45n2 3n+0 Sales are approximately constant at a rate of 25 basketballs per day, therefore dn dt = 25 How fast is profit changing 4 days after the start of the promotion? Solution: We want to find dp, the rate of change of profit with respect to time. By the chain dt rule, dp dt = dp dn dn dt First find dp dn as follows: dp dn = 45n2 ) 3n+0) 45n 2 )3n+0) 3n+0) 2 = 45n2 ) 3n+0) 45n 2 )3n) +0) ) 3n+0) 2 = 452n)3n+0) 45n2 )3+0) 3n+0) 2 = 90n)3n+0) 45n2 )3) 3n+0) 2 = 270n2 +900n 35n 2 3n+0) 2 = 35n2 +900n 3n+0) 2 With sales at 25 basketballs per day, 4 days after the start of the promotion, So after 4 days, We are given that dn dt n = 4 days)25 basketballs/day) = 00 basketballs dp dn = 3500)2 +90000) 300)+0) 2 4.9844 = 25, so we have dp dt = dp dn dn dt 4.9844)25) 374.6 After 4 days, profit from basketballs is increasing at a rate of $374.6 per day. 5
EXAMPLE: A generous aunt deposits $20,000 in an account to be used by her newly born niece to attend college. The account earns interest at the rate of r percent per year, compounded monthly. At the end of 8 years, the balance in the account is given by A = 20,000 + r ) 26 Find the rate of change of A with respect to r if r =.5, 2.5, or 3. Solution: First find /dr, using the generalized power rule: dr = 20, 000 + r ) ) 26 = 20,000 + r ) ) 26 If r =.5, we obtain = 20, 00026) + r = 20, 00026) + r ) 26 + r ) 25 ) + ) r ) ) = 20, 00026) + r ) ) 25 ) ) + r = 20, 00026) + r ) 25 ) + ) r) = 20, 00026) + r ) 25 0+ ) ) = 20, 00026) + r = 3600 + r ) 25 dr = 3600 +.5 ) 25 = 4709.9 or $4709.9 per percentage point. If r = 2.5, we obtain dr = 3600 + 2.5 ) 25 = 563.55 or $563.55 per percentage point. If r = 3, we obtain dr = 3600 + 3 ) 25 = 658.07 ) 25 or $658.07 per percentage point. This means that when the interest rate is 3%, an increase of % in the interest rate will produce an increase in the balance of approximately $658.07. 6
The chain rule can be used to develop the formula for the marginal-revenue product, an economic concept that approximates the change in revenue when a manufacturer hires an additional employee. Start with R = px, where R is total revenue from the daily production of x units and p is the price per unit. The demand function is p = fx), as before. Also, x can be considered a function of the number of employees, n. Since R = px, and x and therefore, p depends on n, R can also be considered a function of n. To find an expression for /dn, use the product rule for derivatives on the function R = px to get dn dx dp = p +x dn dn By the chain rule, dp dn = dp dx dx dn Substituting for dp/dn in equation ) yields dx dp = p dn dn +x dx dx ) = p+x dp ) dx dn dx dn The expression for /dn gives the marginal-revenue product. EXAMPLE: Find the marginal-revenue product /dn in dollars per employee) when n = 20 if the demand function is p = 600/ x and x = 5n. Solution: As shown previously, Find dp/dx and dx/dn. From we have the derivative Also, from x = 5n, we have Then, by substitution, dn = = dn = p+x dp ) dx dx dn p = 600 x = 600x /2 dp dx = 600x /2 ) = 600x /2 ) = 600 /2)x /2 = 300x 3/2 p+x dp dx [ 600 x 300x /2 ]5 = If n = 20, then x = 5 20 = 00, and dx dn = 5n) = 5n) = 5) = 5 ) [ ] [ dx 600 600 dn = +x 300x 3/2 ) 5 = 300x ]5 3/2+ x x [ 600 300 [ [ ] 600 300 300 ]5 = ]5 = 5 = 500 x x x x x dn = 500 = 500 00 0 = 50 This means that hiring an additional employee when production is at a level of 00 items will produce an increase in revenue of $50. 7 )