We have seen the techniques for differentiating basic functions (, etc.) as well as sums, differences, products, quotients, and constant multiples of these functions. However, these techniques do not allow us to differentiate compositions of functions, such as or . In this section, we study the rule for finding the derivative of the composition of two or more functions.

# Deriving the Chain Rule

When we have a function that is a composition of two or more functions, we could use all of the techniques we have already learned to differentiate it. However, using all of those techniques to break down a function into simpler parts that we are able to differentiate can get cumbersome. Instead, we use the **chain rule**, which states that the derivative of a composite function is the derivative of the outer function evaluated at the inner function times the derivative of the inner function.

To put this rule into context, let’s take a look at an example: . We can think of the derivative of this function with respect to as the rate of change of relative to the change in . Consequently, we want to know how changes as changes. We can think of this event as a chain reaction: As changes, changes, which leads to a change in . This chain reaction gives us hints as to what is involved in computing the derivative of . First of all, a change in forcing a change in suggests that somehow the derivative of is involved. In addition, the change in forcing a change in suggests that the derivative of with respect to , where , is also part of the final derivative.

We can take a more formal look at the derivative of by setting up the limit that would give us the derivative at a specific value in the domain of ..

This expression does not seem particularly helpful; however, we can modify it by multiplying and dividing by the expression to obtain.

From the definition of the derivative, we can see that the second factor is the derivative of at . That is,.

However, it might be a little more challenging to recognize that the first term is also a derivative. We can see this by letting and observing that as :

Thus, .

In other words, if , then . Thus, if we think of as the composition where and , then the derivative of is the product of the derivative of and the derivative of the function evaluated at the function . At this point, we anticipate that for , it is quite likely that . As we determined above, this is the case for .

Now that we have derived a special case of the chain rule, we state the general case and then apply it in a general form to other composite functions. An informal proof is provided at the end of the section.

### Rule: The Chain Rule

Let and be functions. For all in the domain of for which is differentiable at and is differentiable at , the derivative of the composite function

is given by.

Alternatively, if is a function of , and is a function of , then.

### Problem-Solving Strategy: Applying the Chain Rule

- To differentiate , begin by identifying and .
- Find and evaluate it at to obtain .
- Find .
- Write .

*Note*: When applying the chain rule to the composition of two or more functions, keep in mind that we work our way from the outside function in. It is also useful to remember that the derivative of the composition of two functions can be thought of as having two parts; the derivative of the composition of three functions has three parts; and so on. Also, remember that we never evaluate a derivative at a derivative.

# The Chain and Power Rules Combined

We can now apply the chain rule to composite functions, but note that we often need to use it with other rules. For example, to find derivatives of functions of the form , we need to use the chain rule combined with the power rule. To do so, we can think of as where . Then . Thus, . This leads us to the derivative of a power function using the chain rule,

### Rule: Power Rule for Composition of Functions

For all values of for which the derivative is defined, if.

Then.

### Using the Chain and Power Rules

Find the derivative of .

#### Solution

First, rewrite .

Applying the power rule with , we have.

Rewriting back to the original form gives us.

Find the derivative of .

#### Solution

### Using the Chain and Power Rules with a Trigonometric Function

Find the derivative of .

#### Solution

First recall that , so we can rewrite as .

Applying the power rule with , we obtain.

### Finding the Equation of a Tangent Line

Find the equation of a line tangent to the graph of at .

#### Solution

Because we are finding an equation of a line, we need a point. The -coordinate of the point is 2. To find the -coordinate, substitute 2 into . Since , the point is .

For the slope, we need . To find , first we rewrite and apply the power rule to obtain.

By substituting, we have . Therefore, the line has equation . Rewriting, the equation of the line is .

Find the equation of the line tangent to the graph of at .

#### Solution

#### Hint

Use the preceding example as a guide.

# Combining the Chain Rule with Other Rules

Now that we can combine the chain rule and the power rule, we examine how to combine the chain rule with the other rules we have learned. In particular, we can use it with the formulas for the derivatives of trigonometric functions or with the product rule.

### Using the Chain Rule on a General Cosine Function

Find the derivative of .

#### Solution

Think of as where . Since we have . Then we do the following calculation.

Thus, the derivative of is given by .

In the following example we apply the rule that we have just derived.

### Using the Chain Rule on a Cosine Function

Find the derivative of .[reveal-answer q=”847788″]Show Solution[/reveal-answer]

[hidden-answer a=”847788″]Let . Then .

Using the result from the previous example,

### Using the Chain Rule on Another Trigonometric Function

Find the derivative of .

#### Solution

Apply the chain rule to to obtain.

In this problem, , so we have . Therefore, we obtain

Find the derivative of .[reveal-answer q=”232193″]Show Solution[/reveal-answer]

[hidden-answer a=”232193″]

#### Hint

Apply the chain rule to first and then use .

At this point we provide a list of derivative formulas that may be obtained by applying the chain rule in conjunction with the formulas for derivatives of trigonometric functions. Their derivations are similar to those used in (Figure) and (Figure). For convenience, formulas are also given in Leibniz’s notation, which some students find easier to remember. (We discuss the chain rule using Leibniz’s notation at the end of this section.) It is not absolutely necessary to memorize these as separate formulas as they are all applications of the chain rule to previously learned formulas.

### Using the Chain Rule with Trigonometric Functions

For all values of for which the derivative is defined,

### Combining the Chain Rule with the Product Rule

Find the derivative of .

#### Solution

First apply the product rule, then apply the chain rule to each term of the product.

Find the derivative of .

#### Solution

#### Hint

Start out by applying the quotient rule. Remember to use the chain rule to differentiate the denominator.

# Composites of Three or More Functions

We can now combine the chain rule with other rules for differentiating functions, but when we are differentiating the composition of three or more functions, we need to apply the chain rule more than once. If we look at this situation in general terms, we can generate a formula, but we do not need to remember it, as we can simply apply the chain rule multiple times.

In general terms, first we let.

Then, applying the chain rule once we obtain.

Applying the chain rule again, we obtain.

### Rule: Chain Rule for a Composition of Three Functions

For all values of for which the function is differentiable, if,

then.

In other words, we are applying the chain rule twice.

Notice that the derivative of the composition of three functions has three parts. (Similarly, the derivative of the composition of four functions has four parts, and so on.) Also, *remember, we always work from the outside in, taking one derivative at a time.*

### Differentiating a Composite of Three Functions

Find the derivative of .

#### Solution

First, rewrite as.

Then apply the chain rule several times.

Find the derivative of .

#### Solution

#### Hint

Rewrite and use (Figure) as a guide.

### Using the Chain Rule in a Velocity Problem

A particle moves along a coordinate axis. Its position at time is given by . What is the velocity of the particle at time ?

#### Solution

To find , the velocity of the particle at time , we must differentiate . Thus,.

Substituting into , we obtain .

A particle moves along a coordinate axis. Its position at time is given by . Find its acceleration at time .

#### Solution

#### Hint

Acceleration is the second derivative of position.

## Proof of the Chain Rule

At this point, we present a very informal proof of the chain rule. For simplicity’s sake we ignore certain issues: For example, we assume that for in some open interval containing . We begin by applying the limit definition of the derivative to the function to obtain :.

Rewriting, we obtain.

Although it is clear that,

it is not obvious that.

To see that this is true, first recall that since is differentiable at is also continuous at . Thus,.

Next, make the substitution and and use change of variables in the limit to obtain.

Finally,

### Using the Chain Rule with Functional Values

Let . If , and , find .

#### Solution

Use the chain rule, then substitute.

Let . If , and , find .

#### Solution

28

# The Chain Rule Using Leibniz’s Notation

As with other derivatives that we have seen, we can express the chain rule using Leibniz’s notation. This notation for the chain rule is used heavily in physics applications.

For , let and . Thus,, and .

Consequently,.

### Rule: Chain Rule Using Leibniz’s Notation

If is a function of , and is a function of , then.

### Taking a Derivative Using Leibniz’s Notation, Example 1

Find the derivative of .

#### Solution

First, let . Thus, . Next, find and . Using the quotient rule,

and.

Finally, we put it all together.

It is important to remember that, when using the Leibniz form of the chain rule, the final answer must be expressed entirely in terms of the original variable given in the problem.

### Taking a Derivative Using Leibniz’s Notation, Example 2

Find the derivative of .

#### Solution

First, let . Then . Next, find and : and .

Finally, we put it all together.

Use Leibniz’s notation to find the derivative of . Make sure that the final answer is expressed entirely in terms of the variable .

#### Solution

#### Hint

Let .

### Key Concepts

- The chain rule allows us to differentiate compositions of two or more functions. It states that for ,.In Leibniz’s notation this rule takes the form.
- We can use the chain rule with other rules that we have learned, and we can derive formulas for some of them.
- The chain rule combines with the power rule to form a new rule:If , then .
- When applied to the composition of three functions, the chain rule can be expressed as follows: If , then .

# Key Equations

**The chain rule****The power rule for functions**