Paul's Online Math Notes
Calculus I (Notes) / Derivatives / Chain Rule   [Notes] [Practice Problems] [Assignment Problems]

Calculus I - Notes
Limits Previous Chapter   Next Chapter Applications of Derivatives
Derivatives of Hyperbolic Trig Functions Previous Section   Next Section Implicit Differentiation

 Chain Rule

We’ve taken a lot of derivatives over the course of the last few sections.  However, if you look back they have all been functions similar to the following kinds of functions.

 

 

 

These are all fairly simple functions in that wherever the variable appears it is by itself.  What about functions like the following,

 

 

 

None of our rules will work on these functions and yet some of these functions are closer to the derivatives that we’re liable to run into than the functions in the first set. 

 

Let’s take the first one for example.  Back in the section on the definition of the derivative we actually used the definition to compute this derivative.  In that section we found that,

 

 

 

 

If we were to just use the power rule on this we would get,

 

 

which is not the derivative that we computed using the definition.  It is close, but it’s not the same.  So, the power rule alone simply won’t work to get the derivative here.

 

Let’s keep looking at this function and note that if we define,

 

 

then we can write the function as a composition.

 

 

and it turns out that it’s actually fairly simple to differentiate a function composition using the Chain Rule.  There are two forms of the chain rule.  Here they are.

 

Chain Rule

Suppose that we have two functions f(x) and g(x) and they are both differentiable.

  1. If we define  then the derivative of F(x) is,

                                                     

  1. If we have  and  then the derivative of y is,

                                                               

 

Each of these forms have their uses, however we will work mostly with the first form in this class.  To see the proof of the Chain Rule see the Proof of Various Derivative Formulas section of the Extras chapter.

 

Now, let’s go back and use the Chain Rule on the function that we used when we opened this section.

 

Example 1  Use the Chain Rule to differentiate .

 

Solution

We’ve already identified the two functions that we needed for the composition, but let’s write them back down anyway and take their derivatives.

                                            

 

So, using the chain rule we get,

                                                     

 

And this is what we got using the definition of the derivative.

 

In general we don’t really do all the composition stuff in using the Chain Rule.  That can get a little complicated and in fact obscures the fact that there is a quick and easy way of remembering the chain rule that doesn’t require us to think in terms of function composition. 

 

Let’s take the function from the previous example and rewrite it slightly.

 

 

 

This function has an “inside function” and an “outside function”.  The outside function is the square root or the exponent of  depending on how you want to think of it and the inside function is the stuff that we’re taking the square root of or raising to the , again depending on how you want to look at it.

 

The derivative is then,

 

 

 

In general this is how we think of the chain rule.  We identify the “inside function” and the “outside function”.  We then differentiate the outside function leaving the inside function alone and multiply all of this by the derivative of the inside function.  In its general form this is,

 

 

 

We can always identify the “outside function” in the examples below by asking ourselves how we would evaluate the function.  For instance in the R(z) case if we were to ask ourselves what R(2) is we would first evaluate the stuff under the radical and then finally take the square root of this result.  The square root is the last operation that we perform in the evaluation and this is also the outside function.  The outside function will always be the last operation you would perform if you were going to evaluate the function.

 

Let’s take a look at some examples of the Chain Rule.

 

Example 2  Differentiate each of the following.

(a)    [Solution]

(b)    [Solution]

(c)    [Solution]

(d)    [Solution]

(e)    [Solution]

(f)    [Solution]

Solution

(a)  

It looks like the outside function is the sine and the inside function is 3x2+x.  The derivative is then.

                                        

 

Or with a little rewriting,

                                                  

[Return to Problems]

 

(b)  

In this case the outside function is the exponent of 50 and the inside function is all the stuff on the inside of the parenthesis.  The derivative is then.

                                          

[Return to Problems]

 

(c)  

Identifying the outside function in the previous two was fairly simple since it really was the “outside” function in some sense.  In this case we need to be a little careful.  Recall that the outside function is the last operation that we would perform in an evaluation.  In this case if we were to evaluate this function the last operation would be the exponential.  Therefore the outside function is the exponential function and the inside function is its exponent.

 

Here’s the derivative.

                                                   

 

Remember, we leave the inside function alone when we differentiate the outside function.  So, the derivative of the exponential function (with the inside left alone) is just the original function.

[Return to Problems]

 

(d)  

Here the outside function is the natural logarithm and the inside function is stuff on the inside of the logarithm.

                                      

 

Again remember to leave the inside function along when differentiating the outside function.  So, upon differentiating the logarithm we end up not with 1/x but instead with 1/(inside function).

[Return to Problems]

 

(e)  

In this case the outside function is the secant and the inside is the .

                                                

 

In this case the derivative of the outside function is .  However, since we leave the inside function alone we don’t get x’s in both.  Instead we get  in both.

[Return to Problems]

 

(f)  

There are two points to this problem.  First, there are two terms and each will require a different application of the chain rule.  That will often be the case so don’t expect just a single chain rule when doing these problems.  Second, we need to be very careful in choosing the outside and inside function for each term.

 

Recall that the first term can actually be written as,

                                                          

 

So, in the first term the outside function is the exponent of 4 and the inside function is the cosine.  In the second term it’s exactly the opposite.  In the second term the outside function is the cosine and the inside function is .  Here’s the derivative for this function.

                                        

[Return to Problems]

 

There are a couple of general formulas that we can get for some special cases of the chain rule.  Let’s take a quick look at those.

 

Example 3  Differentiate each of the following.

(a)  

(b)  

(c)  

 

Solution

(a) The outside function is the exponent and the inside is g(x).

                                                     

 

(b) The outside function is the exponential function and the inside is g(x).

                                                           

 

(c) The outside function is the logarithm and the inside is g(x).

                                                   

 

The formulas in this example are really just special cases of the Chain Rule but may be useful to remember in order to quickly do some of these derivatives.

 

Now, let’s also not forget the other rules that we’ve got for doing derivatives.  For the most part we’ll not be explicitly identifying the inside and outside functions for the remainder of the problems in this section.  We will be assuming that you can see our choices based on the previous examples and the work that we have shown.

 

Example 4  Differentiate each of the following.

(a)    [Solution]

(b)    [Solution]

 

Solution

(a)   

This requires the product rule and each derivative in the product rule will require a chain rule application as well.

                      

 

In this part be careful with the inverse tangent.  We know that,

 

 

When doing the chain rule with this we remember that we’ve got to leave the inside function alone.  That means that where we have the  in the derivative of  we will need to have .

[Return to Problems]

 

(b)  

In this case we will be using the chain rule in concert with the quotient rule.

                         

 

These tend to be a little messy.  Notice that when we go to simplify that we’ll be able to a fair amount of factoring in the numerator and this will often greatly simplify the derivative.

                         

 

After factoring we were able to cancel some of the terms in the numerator against the denominator.  So even though the initial chain rule was fairly messy the final answer is significantly simpler because of the factoring.

[Return to Problems]

 

The point of this last example is to not forget the other derivative rules that we’ve got.  Most of the examples in this section won’t involve the product rule or the quotient rule to make the problems a little shorter.  However, in practice they will often be in the same problem.

 

Now, let’s take a look at some more complicated examples.

 

Example 5  Differentiate each of the following.

(a)    [Solution]

(b)    [Solution]

(c)    [Solution]

(d)    [Solution]

Solution

We’re going to be a little more careful in these problems than we were in the previous ones.  The reason will be quickly apparent.

 

(a)  

In this case let’s first rewrite the function in a form that will be a little easier to deal with.

                                                        

Now, let’s start the derivative.

                                          

 

Notice that we didn’t actually do the derivative of the inside function yet.  This is to allow us to notice that when we do differentiate the second term we will require the chain rule again.  Notice as well that we will only need the chain rule on the exponential and not the first term.  In many functions we will be using the chain rule more than once so don’t get excited about this when it happens. 

 

Let’s go ahead and finish this example out.

                                             

 

Be careful with the second application of the chain rule.  Only the exponential gets multiplied by the “-9” since that’s the derivative of the inside function for that term only.  One of the more common mistakes in these kinds of problems is to multiply the whole thing by the “-9” and not just the second term.

[Return to Problems]

 

(b)  

We’ll not put as many words into this example, but we’re still going to be careful with this derivative so make sure you can follow each of the steps here.

                           

 

As with the first example the second term of the inside function required the chain rule to differentiate it.  Also note that again we need to be careful when multiplying by the derivative of the inside function when doing the chain rule on the second term.

[Return to Problems]

 

(c)  

Let’s jump right into this one.

                                 

 

In this example both of the terms in the inside function required a separate application of the chain rule.

[Return to Problems]

 

(d)  

We’ll need to be a little careful with this one.

              

 

This problem required a total of 4 chain rules to complete.

[Return to Problems]

 

Sometimes these can get quite unpleasant and require many applications of the chain rule.  Initially, in these cases it’s usually best to be careful as we did in this previous set of examples and write out a couple of extra steps rather than trying to do it all in one step in your head.  Once you get better at the chain rule you’ll find that you can do these fairly quickly in your head.

 

Finally, before we move onto the next section there is one more issue that we need to address.  In the Derivatives of Exponential and Logarithm Functions section we claimed that,

 

 

 

 but at the time we didn’t have the knowledge to  do this.  We now do.  What we needed was the Chain Rule.

 

First, notice that using a property of logarithms we can write a as,

 

 

 

This may seem kind of silly, but it is needed to compute the derivative.  Now, using this we can write the function as,

 

 

 

Okay, now that we’ve gotten that taken care of all we need to remember is that a is a constant and so  is also a constant.  Now, differentiating the final version of this function is a (hopefully) fairly simple Chain Rule problem.

 

 

 

Now, all we need to do is rewrite the first term back as  to get,

 

 

 

So, not too bad if you can see the trick to rewrite a and with the Chain Rule.

Derivatives of Hyperbolic Trig Functions Previous Section   Next Section Implicit Differentiation
Limits Previous Chapter   Next Chapter Applications of Derivatives

Calculus I (Notes) / Derivatives / Chain Rule    [Notes] [Practice Problems] [Assignment Problems]

© 2003 - 2016 Paul Dawkins