Articles

3.4: The Chain Rule - Mathematics


We have covered almost all of the derivative rules that deal with combinations of two (or more) functions. one function "inside'' another).

One example of a composition of functions is (f(x) = cos(x^2)). We currently do not know how to compute this derivative. If forced to guess, one would likely guess (f^prime(x) = -sin(2x)),where we recognize (-sin x) as the derivative of (cos x) and (2x) as the derivative of (x^2). However, this is not the case; (f^prime(x) eq -sin(2x)). In Example 62 we'll see the correct answer, which employs the new rule this section introduces, the Chain Rule.

Before we define this new rule, recall the notation for composition of functions. We write ((f circ g)(x)) or (f(g(x))),read as "(f) of (g) of (x),'' to denote composing (f) with (g). In shorthand, we simply write (f circ g) or (f(g)) and read it as "(f) of (g).'' Before giving the corresponding differentiation rule, we note that the rule extends to multiple compositions like (f(g(h(x)))) or (f(g(h(j(x))))),etc.

To motivate the rule, let's look at three derivatives we can already compute.

Example 59: Exploring similar derivatives

Find the derivatives of

  1. (F_1(x) = (1-x)^2),
  2. (F_2(x) = (1-x)^3,) and
  3. (F_3(x) = (1-x)^4.)

We'll see later why we are using subscripts for different functions and an uppercase (F).

Solution

In order to use the rules we already have, we must first expand each function as

  1. (F_1(x) = 1 - 2x + x^2),
  2. (F_2(x) = 1 - 3x + 3x^2 - x^3) and
  3. (F_3(x) = 1 - 4x + 6x^2 - 4x^3 + x^4).

It is not hard to see that:

[egin{align*} F_1^prime(x) &= -2 + 2x [4pt] F_2^prime(x) &= -3 + 6x - 3x^2 [4pt] F_3^prime (x) &= -4 + 12x - 12x^2 + 4x^3. end{align*}]

An interesting fact is that these can be rewritten as

[F_1^prime (x) = -2(1-x),quad F_2^prime(x) = -3(1-x)^2 ext{ and }F_3^prime (x) = -4(1-x)^3.]

A pattern might jump out at you. Recognize that each of these functions is a composition, letting (g(x) = 1-x):

[egin{eqnarray*}F_1(x) = f_1(g(x)),& ext{ where } f_1(x) = x^2, F_2(x) = f_2(g(x)),& ext{ where } f_2(x) = x^3, F_3(x) = f_3(g(x)),& ext{ where } f_3(x) = x^4. end{eqnarray*}]

We'll come back to this example after giving the formal statements of the Chain Rule; for now, we are just illustrating a pattern.

Theorem 18: The Chain Rule

Let (y = f(u)) be a differentiable function of (u) and let (u = g(x)) be a differentiable function of (x). Then (y=f(g(x))) is a differentiable function of (x),and [y^prime = f^prime(g(x))cdot g^prime(x).]

To help understand the Chain Rule, we return to Example 59.

Example 60: Using the Chain Rule

Use the Chain Rule to find the derivatives of the following functions, as given in Example 59.

Solution

Example 59 ended with the recognition that each of the given functions was actually a composition of functions. To avoid confusion, we ignore most of the subscripts here.

(F_1(x) = (1-x)^2):

We found that [y=(1-x)^2 = f(g(x)), ext{ where } f(x) = x^2 ext{ and } g(x) = 1-x.]

To find (y^prime), we apply the Chain Rule. We need (f^prime(x)=2x) and (g^prime(x)=-1.)

Part of the Chain Rule uses (f^prime(g(x))). This means substitute (g(x)) for (x) in the equation for (f^prime(x)). That is, (f^prime(x) = 2(1-x)). Finishing out the Chain Rule we have [y^prime = f^prime(g(x))cdot g^prime(x) = 2(1-x)cdot (-1) = -2(1-x)= 2x-2.]

(F_2(x) = (1-x)^3):

Let (y = (1-x)^3 = f(g(x))),where (f(x) = x^3) and (g(x) = (1-x)). We have (f^prime(x) = 3x^2),so (f^prime(g(x)) = 3(1-x)^2). The Chain Rule then states [y^prime = f^prime(g(x))cdot g^prime (x) = 3(1-x)^2cdot(-1) = -3(1-x)^2.]

(F_3(x) = (1-x)^4):

Finally, when (y = (1-x)^4),we have (f(x)= x^4) and (g(x) = (1-x)). Thus (f^prime(x) = 4x^3) and (f^prime(g(x)) = 4(1-x)^3). Thus [y^prime = f^prime(g(x))cdot g^prime(x) = 4(1-x)^3cdot (-1) = -4(1-x)^3.]

Example 60 demonstrated a particular pattern: when (f(x)=x^n),then (y^prime =ncdot (g(x))^{n-1}cdot g^prime (x)). This is called the Generalized Power Rule.

Theorem 19: Generalized Power Rule

Let (g(x)) be a differentiable function and let (n eq 0) be an integer. Then [dfrac{d}{dx}Big(g(x)^nBig) = ncdot ig(g(x)ig)^{n-1}cdot g^prime (x).]

This allows us to quickly find the derivative of functions like (y = (3x^2-5x+7+sin x)^{20}). While it may look intimidating, the Generalized Power Rule states that [y^prime = 20(3x^2-5x+7+sin x)^{19}cdot (6x-5+cos x).]

Treat the derivative--taking process step--by--step. In the example just given, first multiply by 20, then rewrite the inside of the parentheses, raising it all to the 19(^{ ext{th}}) power. Then think about the derivative of the expression inside the parentheses, and multiply by that.

We now consider more examples that employ the Chain Rule.

Example 61: Using the Chain Rule

Find the derivatives of the following functions:

  1. (y = sin{2x})
  2. (y= ln (4x^3-2x^2))
  3. (y = e^{-x^2})

Solution

  1. Consider (y = sin 2x). Recognize that this is a composition of functions, where (f(x) = sin x) and (g(x) = 2x). Thus [y^prime = f^prime(g(x))cdot g^prime(x) = cos (2x)cdot 2 = 2cos 2x.]
  2. Recognize that (y = ln (4x^3-2x^2)) is the composition of (f(x) = ln x) and (g(x) = 4x^3-2x^2). Also, recall that [dfrac{d}{dx}Big(ln xBig) = dfrac{1}{x}.]This leads us to:[y^prime = dfrac{1}{4x^3-2x^2} cdot (12x^2-4x) = dfrac{12x^2-4x}{4x^3-2x^2}= dfrac{4x(3x-1)}{2x(2x^2-x)} = dfrac{2(3x-1)}{2x^2-x}.]
  3. Recognize that (y = e^{-x^2}) is the composition of (f(x) = e^x) and (g(x) = -x^2). Remembering that (f^prime(x) = e^x),we have [y^prime = e^{-x^2}cdot (-2x) = (-2x)e^{-x^2}.]

Example 62: Using the Chain Rule to find a tangent line

Let (f(x) = cos x^2). Find the equation of the line tangent to the graph of (f) at (x=1).

Solution

The tangent line goes through the point ((1,f(1)) approx (1,0.54)) with slope (f^prime(1)). To find (f^prime),we need the Chain Rule.

(f^prime(x) = -sin(x^2) cdot(2x) = -2xsin x^2). Evaluated at (x=1),we have (f^prime(1) = -2sin 1approx -1.68). Thus the equation of the tangent line is [y = -1.68(x-1)+0.54 .]

The tangent line is sketched along with (f) in Figure 2.17.

The Chain Rule is used often in taking derivatives. Because of this, one can become familiar with the basic process and learn patterns that facilitate finding derivatives quickly. For instance, [dfrac{d}{dx}Big(ln ( ext{anything})Big) = dfrac{1}{ ext{anything}}cdot ( ext{anything})^prime = dfrac{( ext{anything})^prime}{ ext{anything}}.]

A concrete example of this is [dfrac{d}{dx}Big(ln(3x^{15}-cos x+e^x)Big) = dfrac{45x^{14}+sin x+e^x}{3x^{15}-cos x+e^x}.] While the derivative may look intimidating at first, look for the pattern. The denominator is the same as what was inside the natural log function; the numerator is simply its derivative.

This pattern recognition process can be applied to lots of functions. In general, instead of writing "anything'', we use (u) as a generic function of (x). We then say [dfrac{d}{dx}Big(ln uBig) = dfrac{u^prime}{u}.]

The following is a short list of how the Chain Rule can be quickly applied to familiar functions.

Of course, the Chain Rule can be applied in conjunction with any of the other rules we have already learned. We practice this next.

Example 63: Using the Product, Quotient and Chain Rules

Find the derivatives of the following functions.

  1. (f(x) = x^5 sin{2x^3})
  2. (f(x) = dfrac{5x^3}{e^{-x^2}}).

Solution

  1. We must use the Product and Chain Rules. Do not think that you must be able to "see'' the whole answer immediately; rather, just proceed step--by--step.[f^prime(x) = x^5ig(6x^2cos 2x^3ig) + 5x^4ig(sin 2x^3ig)= 6x^7cos2x^3+5x^4sin 2x^3.]
  2. We must employ the Quotient Rule along with the Chain Rule. Again, proceed step--by--step.[egin{align*} f^prime(x) = dfrac{e^{-x^2}ig(15x^2ig) - 5x^3ig((-2x)e^{-x^2}ig)}{ig(e^{-x^2}ig)^2} &=dfrac{e^{-x^2}ig(10x^4+15x^2ig)}{e^{-2x^2}} &= e^{x^2}ig(10x^4+15x^2ig). end{align*}]

A key to correctly working these problems is to break the problem down into smaller, more manageable pieces. For instance, when using the Product and Chain Rules together, just consider the first part of the Product Rule at first: (f(x)g^prime(x)). Just rewrite (f(x)),then find (g^prime(x)). Then move on to the (f^prime(x)g(x)) part. Don't attempt to figure out both parts at once.

Likewise, using the Quotient Rule, approach the numerator in two steps and handle the denominator after completing that. Only simplify afterward.

We can also employ the Chain Rule itself several times, as shown in the next example.

Example 64: Using the Chain Rule multiple times

Find the derivative of (y = an^5(6x^3-7x)).

Solution

Recognize that we have the (g(x)= an(6x^3-7x)) function "inside'' the (f(x)=x^5) function; that is, we have (y = ig( an(6x^3-7x)ig)^5). We begin using the Generalized Power Rule; in this first step, we do not fully compute the derivative. Rather, we are approaching this step--by--step.

[y^prime = 5ig( an(6x^3-7x)ig)^4cdot g^prime(x).]

We now find (g^prime(x)). We again need the Chain Rule; [g^prime(x) = sec^2(6x^3-7x)cdot(18x^2-7).]Combine this with what we found above to give

[egin{align*} y^prime &= 5ig( an(6x^3-7x)ig)^4cdotsec^2(6x^3-7x)cdot(18x^2-7) &= (90x^2-35)sec^2(6x^3-7x) an^4(6x^3-7x). end{align*}]

This function is frankly a ridiculous function, possessing no real practical value. It is very difficult to graph, as the tangent function has many vertical asymptotes and (6x^3-7x) grows so very fast. The important thing to learn from this is that the derivative can be found. In fact, it is not "hard;'' one must take several simple steps and be careful to keep track of how to apply each of these steps.

It is a traditional mathematical exercise to find the derivatives of arbitrarily complicated functions just to demonstrate that it can be done. Just break everything down into smaller pieces.

Example 65: Using the Product, Quotient and Chain Rules

Find the derivative of ( f(x) = dfrac{xcos(x^{-2})-sin^2(e^{4x})}{ln(x^2+5x^4)}.)

Solution

This function likely has no practical use outside of demonstrating derivative skills. The answer is given below without simplification. It employs the Quotient Rule, the Product Rule, and the Chain Rule three times.

[f^prime(x) = dfrac{Big(ln(x^2+5x^4)Big)cdotBig[ig(xcdot(-sin(x^{-2}))cdot(-2x^{-3})+1cdot cos(x^{-2})ig)-2sin(e^{4x})cdotcos(e^{4x})cdot(4e^{4x})Big]-Big(xcos(x^{-2})-sin^2(e^{4x})Big)cdotdfrac{2x+20x^3}{x^2+5x^4}}{ig(ln(x^2+5x^4)ig)^2}.]

The reader is highly encouraged to look at each term and recognize why it is there. (I.e., the Quotient Rule is used; in the numerator, identify the "LOdHI'' term, etc.) This example demonstrates that derivatives can be computed systematically, no matter how arbitrarily complicated the function is.

The Chain Rule also has theoretic value. That is, it can be used to find the derivatives of functions that we have not yet learned as we do in the following example.

Example 66: The Chain Rule and exponential functions

Use the Chain Rule to find the derivative of (y= a^x) where (a>0),(a eq 1) is constant.

Solution

We only know how to find the derivative of one exponential function: (y = e^x); this problem is asking us to find the derivative of functions such as (y = 2^x).

This can be accomplished by rewriting (a^x) in terms of (e). Recalling that (e^x) and (ln x) are inverse functions, we can write

[a = e^{ln a} quad ext{and so } quad y = a^x = e^{ln (a^x)}. onumber]

By the exponent property of logarithms, we can "bring down'' the power to get

[y = a^x = e^{x (ln a)}. onumber]

The function is now the composition (y=f(g(x))),with (f(x) = e^x) and (g(x) = x(ln a)). Since (f^prime(x) = e^x) and (g^prime(x) = ln a), the Chain Rule gives

[y^prime = e^{x (ln a)} cdot ln a. onumber]

Recall that the (e^{x(ln a)}) term on the right hand side is just (a^x),our original function. Thus, the derivative contains the original function itself. We have

[y^prime = y cdot ln a = a^xcdot ln a. onumber]

The Chain Rule, coupled with the derivative rule of (e^x),allows us to find the derivatives of all exponential functions.

The previous example produced a result worthy of its own "box.''

Theorem 20: Derivatives of Exponential Functions

Let (f(x)=a^x),for (a>0, a eq 1). Then (f) is differentiable for all real numbers and

[f^prime(x) = ln acdot a^x. onumber]

Alternate Chain Rule Notation

It is instructive to understand what the Chain Rule "looks like'' using "(dfrac{dy}{dx})'' notation instead of (y^prime) notation. Suppose that (y=f(u)) is a function of (u),where (u=g(x)) is a function of (x),as stated in Theorem 18. Then, through the composition (f circ g),we can think of (y) as a function of (x),as (y=f(g(x))). Thus the derivative of (y) with respect to (x) makes sense; we can talk about (dfrac{dy}{dx}.) This leads to an interesting progression of notation:

[egin{align*}y^prime &= f^prime(g(x))cdot g^prime(x) dfrac{dy}{dx} &= y^prime(u) cdot u^prime(x)quad ext{(since (y=f(u)) and (u=g(x)))} dfrac{dy}{dx} &= dfrac{dy}{du} cdot dfrac{du}{dx}quad ext{(using "fractional'' notation for the derivative)}end{align*}]

Here the "fractional'' aspect of the derivative notation stands out. On the right hand side, it seems as though the "(du)'' terms cancel out, leaving [ dfrac{dy}{dx} = dfrac{dy}{dx}.]

It is important to realize that we are not canceling these terms; the derivative notation of (dfrac{dy}{dx}) is one symbol. It is equally important to realize that this notation was chosen precisely because of this behavior. It makes applying the Chain Rule easy with multiple variables. For instance,

[dfrac{dy}{dt} = dfrac{dy}{digcirc} cdot dfrac{digcirc}{d riangle} cdot dfrac{d riangle}{dt}.]

where (igcirc) and ( riangle) are any variables you'd like to use.

One of the most common ways of "visualizing" the Chain Rule is to consider a set of gears, as shown in Figure 2.18. The gears have 36, 18, and 6 teeth, respectively. That means for every revolution of the (x) gear, the (u) gear revolves twice. That is, the rate at which the (u) gear makes a revolution is twice as fast as the rate at which the (x) gear makes a revolution. Using the terminology of calculus, the rate of (u)-change, with respect to (x),is (dfrac{du}{dx} = 2).

Likewise, every revolution of (u) causes 3 revolutions of (y): (dfrac{dy}{du} = 3). How does (y) change with respect to (x)? For each revolution of (x),(y) revolves 6 times; that is, [dfrac{dy}{dx} = dfrac{dy}{du}cdot dfrac{du}{dx} = 2cdot 3 = 6.]

We can then extend the Chain Rule with more variables by adding more gears to the picture.

It is difficult to overstate the importance of the Chain Rule. So often the functions that we deal with are compositions of two or more functions, requiring us to use this rule to compute derivatives. It is often used in practice when actual functions are unknown. Rather, through measurement, we can calculate (dfrac{dy}{du}) and (dfrac{du}{dx}). With our knowledge of the Chain Rule, finding (dfrac{dy}{dx}) is straightforward.

In the next section, we use the Chain Rule to justify another differentiation technique. There are many curves that we can draw in the plane that fail the "vertical line test.'' For instance, consider (x^2+y^2=1),which describes the unit circle. We may still be interested in finding slopes of tangent lines to the circle at various points. The next section shows how we can find (dfrac{dy}{dx}) without first "solving for (y).'' While we can in this instance, in many other instances solving for (y) is impossible. In these situations, implicit differentiation is indispensable.


The Chain Rule

Suppose we want to find the derivative of y=(x 2 +3x+1) 2 . We could hopefully multiply it out and then take the derivative with little difficulty. But, what if, instead, it was y=(x 2 +3x+1) 50 ? Would you want to apply the same method to this problem? Certainly not. Instead we need a method for dealing with composite functions, functions which are one function applied to another. For example, if we let u=f(x)=(x 2 +3x+1) and g(u)=u 2 then y=(x 2 +3x+1) 2 = g(f(x)) . This is sometimes written as

. This is read " g composite f ."

Our goal is to find the derivative

based on our knowledge of the functions f and g. Now, we know that

Leibniz's differential notation suggests that perhaps derivatives can be treated as fractions, leading to the speculation that

This leads to the (possible) chain rule:

Let's apply this to our example and see if it works. First, we'll multiply the product out and then take the derivative. Then we'll apply the chain rule and see if the results match:

So, our rule checks out, at least for this example. It turns out that this rule holds for all composite functions, and is invaluable for taking derivatives.

This rule is called the chain rule because we use it to take derivatives of composties of functions by chaining together their derivatives. The chain rule can be though of as taking the derivative of the outer function (applied to the inner function) and multiplying it times the derivative of the inner function.

The discussion given here is not by any means a proof and should not satisfy any reader. A proof of the chain rule can be found here. Please look at it.

Failure to apply the chain rule is probably the most common mistake in differential calculus. Remember that the chain rule applies to all composite functions.


MATH 131: Applied Calculus I

Applied Calculus for Loyola University Chicago Custom (packaged with WileyPlus) by Deborah Hughes-Hallett, et al.

Chapter 1: Foundations For Calculus: Functions and Limits
1.1 Functions and Change
1.2 Exponential Functions
1.3 New Functions from Old
1.4 Logarithmic Functions
1.5 Trigonometric Functions
1.6 Powers, Polynomials, and Rational Functions
1.7 Introduction to Continuity
1.8 Limits
Chapter 2: Key Concept: The Derivative
2.1 How Do We Measure Speed?
2.2 The Derivative at a Point
2.3 The Derivative Function
2.4 Interpretations of the Derivative
2.5 The Second Derivative
Chapter 3: Short-Cuts to Differentiation
3.1 Powers and Polynomials
3.2 The Exponential Function
3.3 The Product and Quotient Rules
3.4 The Chain Rule
3.5 The Trigonometric Functions
3.6 The Chain Rule and Inverse Functions
Chapter 4: Using the Derivative
4.1 Using First and Second Derivatives
4.2 Optimization
4.3 Optimization and Modeling
4.4 Families of Functions and Modeling
4.5 Applications to Marginality
4.7 L’Hopital’s Rule, Growth, and Dominance
Chapter 5: Key Concept: The Definite Integral
5.1 How Do We Measure Distance Traveled?
5.2 The Definite Integral
5.3 The Fundamental Theorem and Interpretations
5.4 Theorems about Definite Integrals
Chapter 6: Constructing Antiderivatives
6.1 Antiderivatives Graphically and Numerically
6.2 Constructing Antiderivatives Analytically
6.3 [Optional] Differential Equations and Motion

Chapter 1: Foundation For Calculus: Functions and Limits

1. Functions and Change: 1, 8, 13, 16, 23, 27, 31, 33, 53, 55, 70(No WP*)

2. Exponential Functions: 2, 5, 6, 8, 10, 16, 17, 31, 38, 39

3. New Functions From Old: 9, 13, 14, 28, 32, 43, 45, 50, 51, 52, 56, 61, 68, 19, 71

4. Logarithmic Functions: 2, 4, 6, 7, 12, 16, 19, 24, 26, 30, 36, 45, 47, 48

5. Trigonometric Functions: 6, 10, 12, 18, 20, 30, 31, 33, 62, 63, 68

6. Powers, Polynomials and Rational Functions: 3, 6, 8, 9 , 12, 15, 17, 19, 47 (No WP), 50, 52, 54

7. Introduction to Limits and Continuity: 2, 3, 12 (No WP), 14 (No WP), 24( No WP), 26(No WP), 28 (No WP), 31 (No WP), 39 (No WP), 43 (No WP), 49 (No WP)

8. Extending the Idea of a Limit: 4, 6, 31, 33, 38, 45, 52 (No WP)

Chapter 2: Key Concept: The Derivative

2.1 How Do We Measure Speed?: 1, 3, 5, 7, 10, 15, 16, 17, 21, 22, 29, 31, 33

2.2 The Derivative at a Point:1, 3, 4, 8, 10, 19, 22, 23(No WP), 32, 37, 47, 56, 60, 63

2.3 The Derivative Function: 1, 2, 5, 13, 20, 22, 33, 49, 50, 52

2.4 Interpretations of the Derivative: 2, 3, 9, 12(No WP), 17, 19, 24 (No WP), 27, 33, 38, 51, 54 (No WP)

2.5 The Second Derivative: 2, 3, 8, 9, 12, 14, 15, 25, 37, 38, 41

Chapter 3: Short-Cuts to Differentiation

3.1 Powers and Polynomials: 6, 10, 11, 14, 18, 23, 25, 28, 30, 32, 35, 38, 48, 58, 70, 75, 99

3.2 The Exponential Function: 2, 4, 6, 8, 10, 12, 13, 17, 24, 42, 44, 46, 49, 58

3.3 The Product and Quotient Rules: 4, 6, 7, 10, 12, 16, 19, 20, 24, 28, 31, 43, 47, 52, 90

3.4 The Chain Rule: 2, 4, 7, 11, 17, 18, 28, 33, 43, 45, 48, 58, 60, 61, 67, 70, 73, 77, 86

3.5 The Trigonometric Functions: 4, 8, 10, 12, 16, 19, 22, 24, 26, 30, 36, 38, 45, 61

3.6 The Chain Rule and Inverse Functions: 1, 9, 12, 13, 17, 22, 25, 26, 28, 30, 32, 35, 38, 39, 41, 50

Chapter 4: Using the Derivative

4.1 Using First and Second Derivatives: 1, 5, 18, 25, 32, 34, 35, 36, 37, 40, 52, 53, 59

4.2 Optimization: 4, 6, 7, 8, 10, 13, 18, 19, 30, 37, 39, 40, 43

4.3 Optimization and Modeling: 5, 6, 7, 9, 11, 14, 18, 22, 25, 27, 38, 39, 45

4.4 Families of Functions and Modeling: 3, 4, 16, 25, 26, 47, 49, 50, 51, 57, 63

4.5 Applications to Marginality: 1, 4, 7, 12, 13, 15, 16, 18

4.7 L’Hopital’s Rule, Growth, and Dominance: 6, 11, 35, 41, 42, 48, 53, 58, 59, 65, 67, 76, 87

Chapter 5: Key Concept: The Definite Integral

5.1How We Measure Distance Traveled?: 1, 2, 4, 8, 14 ,15, 23, 25, 28

5.2The Definite Integral:4, 8, 12, 24, 29, 30, 32, 36

5.3The Fundamental Theorem and Interpretations: 1, 2, 3, 4, 5, 7, 9, 10, 12, 14, 16, 18, 22, 30

5.4Theorems About Definite Integrals: 1, 2, 3, 4, 6, 7, 8, 11, 14, 16, 19, 25, 26, 28, 30, 33

Chapter 6: Constructing Antiderivatives

6.1Antiderivatives Graphically and Numerically: 3, 6, 13, 15, 20, 25, 33

6.2Constructing the Antiderivative Analytically: 7, 9, 10, 11, 12, 15, 18, 20, 21, 26, 28, 30, 31, 35, 41, 44, 50, 55, 56, 57, 58, 60, 65

* No WP means the problem is not in WileyPlus and should be completed from the textbook.


How to Use the Chain Rule for Derivatives

Suppose $displaystyle h(x) = sin(x^2)$. Find $h'(x)$ .

Answer

Example 2

Suppose $displaystyle f(x) = sqrt$. Find $f'(x)$ .

Write the square-root in exponent form.

Use the power rule and the chain rule.

Step 3

(Optional) Write the derivative in radical form.

$ egin f'(x) & = frac 3 2 x^2 (x^3 + 2)^<-1/2>[6pt] & = frac 3 2 x^2 cdot frac 1 >[6pt] & = frac 3 2 x^2 cdot frac 1 >[6pt] & = frac<3x^2><2sqrt> end $

Example 3

Use the chain rule to find $displaystyle frac d left(sec x ight)$ .

Rewrite the function in terms of the cosine.

$ sec x = frac 1 = ig(cos xig)^ <-1>$

Differentiate using the chain rule.

$ egin frac d left(sec x ight) & = frac d left[(cos x)^<-1> ight][6pt] & = -1(cos x)^<-2>cdot (-sin x)[6pt] & = -frac 1 cdot (-sin x)[6pt] & = frac end $

Simplify by separating into two fractions and using trigonometric identities.

$ egin frac d left(sec x ight) & = frac[6pt] & = frac 1 cdot frac[6pt] & = sec x an x end $

$displaystyle frac d left(sec x ight) = sec x an x$

Example 4

Notice that this function will require both the product rule and the chain rule.

Identify the factors in the function.

Differentiate using the product rule.

Step 3

(Optional) Factor the derivative.

$ egin f'(x) & = -2xlue>sin(x^3) + lue>,3x^2cos(x^3)[6pt] & = lue>left(-2 ed xsin(x^3) + 3 edcos(x^3) ight)[6pt] & = ed xe^<-x^2>left(-2sin(x^3) + 3xcos(x^3) ight)[6pt] & = xe^<-x^2>left(3xcos(x^3)-2sin(x^3) ight) end $

$displaystyle f'(x) = xe^<-x^2>left(3xcos(x^3)-2sin(x^3) ight)$.

Example 5

Notice that $f$ is a composition of three functions. This means we will need to use the chain rule twice.

Write the square-root as an exponent.

Use the power rule and the chain rule for the square-root.

Find the derivative of the cosine.

$ f'(x) = frac 1 2[cos(5x + 1)]^<-1/2>cdot left(-sin( ed<5x+1)> ight)cdot frac d ( ed<5x+1>) $

Find the derivative of the linear function.

$ f'(x) = frac 1 2[cos(5x + 1)]^<-1/2>cdot left(-sin(5x+1) ight)cdot 5 $

$ egin% f'(x) & = frac 1 2[cos(5x + 1)]^<-1/2>cdot left(-sin(5x+1) ight)cdot 5[6pt] & = -frac 5 2[cos(5x + 1)]^<-1/2>cdot left(sin(5x+1) ight)[6pt] & = -frac 5 2cdot frac 1 <[cos(5x + 1)]^<1/2>>cdot left(sin(5x+1) ight)[6pt] &= -frac<5sin(5x+1)><2sqrt> end $


Calculus I: Activities

An additional property of derivatives is the which addresses composition of functions. In addition to being useful for calculating derivatives it enables a variety of applications.

Subsection 2.4.1 Illustrating the Chain Rule

Checkpoint 2.4.1 . Illustration of Chain Rule.

Suppose for every shovel full of coal a steam engine produces 1000 psi, and for every 2000 psi the train travels one mile.

  1. What is the rate of psi to coal?
  2. What is the rate of miles to psi?
  3. What is the rate of coal to miles?
  4. Write a function that outputs psi given number of shovels of coal.
  5. Calculate the derivative of this function.
  6. Write a function that outputs miles given psi.
  7. Calculate the derivative of this function.
  8. Write a function that outputs miles given number of shovels of coal using the previous two functions.
  9. Calculate the derivative of this function.
  1. What is the rate of psi to coal? (1000 ext< psi>/1 ext < shovel>)
  2. What is the rate of miles to psi? (1 ext< mile>/2000 ext < psi>)
  3. What is the rate of coal to miles? (frac<1000 ext< psi>><1 ext< shovel>> cdot frac<1 ext< mile>><2000 ext< psi>> = frac<1 ext< mile>><2 ext< shovels>>. )
  4. Write a function that outputs psi given number of shovels of coal. (Psi(c ext< shovels>) = frac<1000 ext< psi>><1 ext< shovel>> c ext< shovels>. )
  5. Calculate the derivative of this function. (frac= frac<1000 ext< psi>>< ext>. )
  6. Write a function that outputs miles given psi. (s(p ext< psi>) = frac<1 ext< mile>><2000 ext< psi>> p ext< psi>. )
  7. Calculate the derivative of this function. (frac= frac<1 ext< mile>><2000 ext< psi>>. )
  8. Write a function that outputs miles given number of shovels of coal using the previous two functions. (s(Psi(c ext< shovels>))=frac<1 ext< mile>><2000 ext< psi>> left( frac<1000 ext< psi>><1 ext< shovel>> c ext < shovels> ight))
  9. Calculate the derivative of this function. (frac=frac<1><2000>cdot frac<1000><1>.)

Subsection 2.4.2 Property and Example

Theorem 2.4.2 . Chain Rule.

If (g) is differentiable at (x) and (f) is differentiable at (g(x)) then (h=f circ g) is differentiable at (x) and

Example 2.4.3 . Understanding chain rule execution.

Calculate the derivative of (h(x)=sqrt.)

Example 2.4.4 . Using the chain rule.

Calculate the derivative of (h(x)=sqrt.)

Subsection 2.4.3 Implicit Differentiation

Sometimes we know an equation involving a function before we know what the function is. We can still calculate the derivative of this unknown function.

Example 2.4.5 . Using Implicit Differentiation.

Calculate (f'(x)) given (f(x)^2+x^2 = 2x+3.)

Checkpoint 2.4.6 .

Note in Example 2.4.5 we can calculate the function from the first step. Do this then calculate the derivative. Compare this to the result above.

Example 2.4.7 . Using Implicit Differentiation.

Calculate (y') given (y) is a function of (x) and (y^2-5y+6=x.)

Subsection 2.4.4 Related Rates

Implicit differentiation is needed in some applications. The expression will make sense after considering examples.

Example 2.4.8 . Related Rate: Volume and Radius.

Air is being pumped into a spherical balloon so that its volume increases at a rate of 100 ( ext^3/ ext.) How fast is the radius of the balloon increasing when the diameter is 50cm?

First, we need to look up a formula for the volume of a sphere. It is (V=frac<4><3>pi r^3.) Next note that we are told the change in volume is 100. Change in volume means we know the derivative of (V) with respect to time. We also note that time is not an explicit variable (i.e., there is no variable (t)). Thus to use this formula we need to differentiate the it.

Note we need the (r') at the end because the radius is also a function of time thus we use implicit differentiation. Finally we can plug in the values we were given. Note (r=25) cm because the diameter is 50 cm.

Notice that in Example 2.4.8 the rate of change of the radius is related to the rate of change of the volume. This is the origin of the name .


The Chain Rule

One of the most handy tools when computing derivatives is the chain rule, but it can be easy to get lost in the process of applying the rule. Let see if we can make the chain rule a bit easier and look at a bunch of examples.

Given differentiable functions and the derivative of the composition is given by

Lets rewrite this by calling (for “outside”) and (for “inside”), so the chain rule is:

Steps to using the chain rule:

  1. Identify the outside function and the inside function.
  2. Find the derivatives of the outside function and the inside function.
  3. Use the above formula to get the derivative we want.
  1. The chain rule is used when there is a function inside of another function.
  2. The chain rule says that the derivative works its way from the outside in.
  3. The chain rule says to take the derivative of the outermost function leaving the inside alone. Then multiply by the derivative of the inside.
  4. Sometimes we must use the chain rule along with other rules like the product or quotient rules.

Example 1. Differentiate

Example 2. Differentiate

Example 3. Which of the functions below do you think need the chain rule.

  1. Chain rule!
  2. Chain rule!
  3. You don’t need the chain rule here. You can either use the product rule, or distribute and then use the power rule.
  4. You could distribute and then use the power rule, but that would take forever. Instead use the chain rule.
  5. Chain rule!
  6. Chain rule!
  7. You don’t need the chain rule here. Use the product rule.
  8. Chain rule!

Find the derivatives of the following function using the steps above.

The Chain Rule: Part 2

The chain rule can be used in addition to other rule. It will help you to remember the following phrase for using the chain rule:

Take the derivative of the outside function, leaving the inside alone, then multiply by the derivative of the inside.


Exercise 3

Calculate the derivative of   h ( x ) = cos ⁡ ( 2 x + 1 ) sin ⁡ ( x 2 + 3 x ) . +3x).>

Using the Product Rule, we have

For the two remaining derivatives, we need to use the Chain Rule.

So, using the Chain Rule, we have

h ′ ( x ) = cos ⁡ ( 2 x + 1 ) cos ⁡ ( x 2 + 3 x ) ⋅ ( x 2 + 3 x ) ′ − sin ⁡ ( 2 x + 1 ) ⋅ ( 2 x + 1 ) ′ sin ⁡ ( x 2 + 3 x ) = cos ⁡ ( 2 x + 1 ) cos ⁡ ( x 2 + 3 x ) ( 2 x + 3 ) − sin ⁡ ( 2 x + 1 ) ( 2 ) sin ⁡ ( x 2 + 3 x ) . displaystyle &=&displaystyle +3x)cdot (x^<2>+3x)'-sin(2x+1)cdot (2x+1)'sin(x^<2>+3x)>&&&=&displaystyle +3x)(2x+3)-sin(2x+1)(2)sin(x^<2>+3x).>end>>


Recommended Pages

Privacy Overview

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.


Symbolab Blog

In the previous posts we covered the basic derivative rules, trigonometric functions, logarithms and exponents (click here). But we are still missing the most important rule dealing with compound functions, the chain rule.

Why is it so important? Because most of the functions you will have to derive, and later integrate, are most likely compound. For example sin(2x) is the composition of f(x)=sin(x) and g(x)=2x or √(x²-3x) is the composition of f(x)=√x and g(x)= x²-3x

The chain rule formula is as follows: (f(g(x)))’=f’(g(x)) *g’(x)
That is, the derivative of the composition of two functions equals the derivative of the outer function times the derivative of the inner function


Let’s start with an example to see how it works (click here):

Here’s a more complex example involving multiple applications of the chain rule (click here):

With the chain rule we put it all together you should be able to derive almost any function. There are some advanced topics to cover including inverse trig functions, implicit differentiation, higher order derivatives, and partial derivatives, but that’s for later.


Problems

Basic

Questions involving the chain rule will appear on homework, at least one Term Test and on the Final Exam. Such questions may also involve additional material that we have not yet studied, such as higher-order derivatives. You will also see chain rule in MAT 244 (Ordinary Differential Equations) and APM 346 (Partial Differential Equations). If the questions here do not give you enough practice, you can easily make up additional questions of a similar character. You can also find questions of this sort in any book on multivariable calculus.

Suppose that (f:R^3 o R) is of class (C^1) , and consider the function (phi:R^2 o R) defined by [ phi(x,y) = f(x^2-y, xy, xcos y) ] Express (partial_xphi) and (partial_y phi) in terms of (x,y) and partial derivatives of (f) .

Suppose that (f:R^2 o R) is of class (C^1) , and consider the function (phi:R^3 o R) defined by [ phi(x,y,z) = f(x^2-yz, xy+cos z) ] Express partial derivatives of (phi) with respect to (x,y,z) in terms of (x,y,z) and partial derivatives of (f) .

Suppose that (f:R^2 o R) is of class (C^1) . Let (S = <(r,s)in R^2 : s e 0>) , and for ((r,s)in S) , define (phi(r,s) = f(rs, r/s)) . Find formulas for (partial_rphi) and (partial_sphi) in terms of (r,s) and derivatives of (f) .

Suppose that (f:R^2 o R) is of class (C^1) . Let (S = <(x,y,z)in R^3 : z e 0>) , and for ((x,y,z)in S) , define (phi(x,y,z) = f(xy, y/z)) . Find formulas for partial derivatives of (phi) in terms of (x,y,z) and partial derivatives of (f) .

  1. Use the chain rule to find relations between different partial derivatives of a function. For example:

Suppose that (f:R o R) is of class (C^1) , and that (u = f(x^2+y^2+z^2)) . Prove that [ xpartial_y u - y partial_x u = 0 ] Suppose that (f:R^2 o R) is of class (C^1) , and that (u = f(x^2+y^2+z^2, y+ z)) . Prove that [ (y-z)partial_x u - x partial_y u + x partial_z u = 0. ]

Find the tangent plane to the set (ldots) at the point (mathbf a = ldots) . For example:

Advanced

  1. Let (q:R^n o R) be the (quadratic) function defined by (q(mathbf x) = |mathbf x|^2) . Determine ( abla q) (either by differentiating, or by remembering material from one of the tutorials.)
  2. Suppose that (mathbf x:R o R^3) is a function that describes the trajectory of a particle. Thus (mathbf x(t)) is the particle’s position at time (t) .
  • If (mathbf x) is differentiable, then we will write (<f v>(t) = mathbf x'(t)) , and we say that (<f v>(t)) is the velocity vector at time (t) .
  • Simlarly, if (f v) is differentiable, then we will write (<f a >(t)= <f v>'(t)) , and we say that (<f a>(t)) is the acceleration vector at time (t) .
  • We also say that (|<f v>(t)|) is the speed at time (t) .

Prove that the speed is constant if and only if $ a(t) v(t) = 0$ for all (t) .

For the next three exercises, let (M^) denote the space of (n imes n) matrices, We write a typical element of (M^) as a matrix (X) with entries: [ X = left( egin x_ <11>& cdots & x_<1n> vdots & ddots & vdots x_ & cdots & x_ end ight) ] Define the function (det:M^ o R) by saying that (det(X)) is the determinant of the matrix. We can view this as a function of the variables (x_<11>,ldots, x_) .

Now consider (n imes n) matrices for an arbitrary positive integer (n) . Let (I) denote the (n imes n) identity matrix. Thus, in terms of the variables ((x_)) , (I) corresponds to [ x_=egin1& ext< if >i=j 0& ext< if >i e j end ] For every (i) and (j) , compute [ frac> det(I), ] This means: the derivative of the determinant function, evaluated at the identity matrix.

Hint There are two cases: (i=j) and (i e j) .

  1. Now suppose that (X(t)) is a “differentiable curve in the space of matrices”, in other words, that [ X(t) = left( eginx_<11>(t) & cdots & x_<1n>(t) vdots & ddots & vdots x_(t) & cdots & x_(t) end ight) ] where (x_(t)) is a differentiable function of (tin R) , for all (i,j) . Also suppose that (X(0) = I) .

Use the chain rule and the above exercise to find a formula for (left. frac d

det(X(t)) ight|_) in terms of (x_'(0)) , for (i,j=1,ldots, n) .

  1. Here we sketch a proof of the Chain Rule that may be a little simpler than the proof presented above. To simplify the set-up, let’s assume that (mathbf g:R o R^n) and (f:R^n o R) are both functions of class (C^1) . Define (phi = fcirc mathbf g) . Thus (phi) is a function (R o R) . Your goal is to compute its derivative at a point (tin R) . To simplify still further, let’s assume that (n=2) . Let’s write (mathbf g(t) = (x(t), y(t))) . Then [egin phi(t+h)-phi(t) &= f(mathbf g(t+h)) - f(mathbf g(t)) &= f( x(t+h), y(t+h)) - f(x(t),y(t)) &= [f( x(t+h), y(t+h)) - f(x(t+h),y(t))] &qquad qquadqquad+ [f(x(t+h),y(t)) -f(x(t),y(t))] . end] Starting from the above, mimic the proof of Theorem 3 in Section 2.1 to show that [ phi'(t) = lim_frac 1 h(phi(t+h)-phi(t) ) ext < exists and equals >fracfrac+ fracfrac, ] where the partial derivatives of (f) on the right-hand side are evaluated at ((x(t),y(t)) = mathbf g(t)) .

/>
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Canada License.


Watch the video: Chain Rule - Shortcuts u0026 Tricks for Placement Tests, Job Interviews u0026 Exams (December 2021).