Motivating Questions
- What is a composite function and how do we recognize its structure algebraically?
- Given a composite function that is built from differentiable functions and how do we compute in terms of and What is the statement of the Chain Rule?
In addition to learning how to differentiate a variety of basic functions, we have also been developing our ability to use rules to differentiate certain algebraic combinations of them.
Example
State the rule(s) to find the derivative of each of the following combinations of and
- Answer
-
Finding uses the sum and constant multiple rules, because Determining requires the product rule, because To calculate we use the quotient rule, because
There is one more natural way to combine basic functions algebraically, and that is by composing them. For instance, let's consider the function
and observe that any input passes through a chain of functions. In the process that defines the function is first squared, and then the sine of the result is taken. Using an arrow diagram,
In terms of the elementary functions and we observe that is the input for the function and the result is used as the input for We write
and say that is the composition of and We will refer to the function that is first applied to as the inner function, while the function that is applied to the result, is the outer function.
Given a composite function that is built from differentiable functions and how do we compute in terms of and In the same way that the rate of change of a product of two functions, depends on the behavior of both and it makes sense intuitively that the rate of change of a composite function will also depend on some combination of and and their derivatives. The rule that describes how to compute in terms of and and their derivatives is called the chain rule.
But before we can learn what the chain rule says and why it works, we first need to be comfortable decomposing composite functions so that we can correctly identify the inner and outer functions, as we did in the example above with
Preview Activity
For each function given below, identify its fundamental algebraic structure. In particular, is the given function a sum, product, quotient, or composition of basic functions? If the function is a composition of basic functions, state a formula for the inner function and the outer function so that the overall composite function can be written in the form If the function is a sum, product, or quotient of basic functions, use the appropriate rule to determine its derivative.
Often a composite function cannot be written in an alternate algebraic form. For instance, the function cannot be expanded or otherwise rewritten, so it presents no alternate approaches to taking the derivative. But some composite functions can be expanded or simplified, and these provide a way to explore how the chain rule works.
Example
Let and Determine a formula for and compute How is related to and and their derivatives?
- Answer
-
By the rules given for and
Thus, Noting that and we observe that appears to be the product of and
It may seem that Example is too elementary to illustrate how to differentiate a composite function. Linear functions are the simplest of all functions, and composing linear functions yields another linear function. While this example does not illustrate the full complexity of a composition of nonlinear functions, at the same time we remember that any differentiable function is locally linear, and thus any function with a derivative behaves like a line when viewed up close. The fact that the derivatives of the linear functions and are multiplied to find the derivative of their composition turns out to be a key insight.
We now consider a composition involving a nonlinear function.
Example
Let Use the double angle identity to rewrite as a product of basic functions, and use the product rule to find Rewrite in the simplest form possible.
- Answer
-
Using the double angle identity for the sine function, we write
Applying the product rule and simplifying, we find
Next, we recall that the double angle identity for the cosine,
Substituting this result into our expression for we now have that
In Example , if we let and we observe that Now, and so we can view the structure of as
In this example, as in the example involving linear functions, we see that the derivative of the composite function is found by multiplying the derivatives of and but with evaluated at
It makes sense intuitively that these two quantities are involved in the rate of change of a composite function: if we ask how fast is changing at a given value, it clearly matters how fast is changing at as well as how fast is changing at the value of It turns out that this structure holds for all differentiable functions 1 as is stated in the Chain Rule.
Chain Rule
If is differentiable at and is differentiable at then the composite function defined by is differentiable at and
As with the product and quotient rules, it is often helpful to think verbally about what the chain rule says: “If is a composite function defined by an outer function and an inner function then is given by the derivative of the outer function evaluated at the inner function, times the derivative of the inner function.”
It is helpful to identify clearly the inner function and outer function compute their derivatives individually, and then put all of the pieces together by the chain rule.
Example
Determine the derivative of the function
- Answer
-
The function is composite, with inner function and outer function Organizing the key information involving and their derivatives, we have
Applying the chain rule, we find that
As a side note, we remark that is usually written as This is common notation for powers of trigonometric functions: and are all composite functions, with the outer function a power function and the inner function a trigonometric one.
Activity
For each function given below, identify an inner function and outer function to write the function in the form Determine and and then apply the chain rule to determine the derivative of the given function.
Using multiple rules simultaneously
The chain rule now joins the sum, constant multiple, product, and quotient rules in our collection of techniques for finding the derivative of a function through understanding its algebraic structure and the basic functions that constitute it. It takes practice to get comfortable applying multiple rules to differentiate a single function, but using proper notation and taking a few extra steps will help.
Example
Find a formula for the derivative of
- Answer
-
We first observe that is the product of two functions: where and We will need to use the product rule to differentiate And because and are composite functions, we will need the chain rule. We therefore begin by computing and
Writing and finding the derivatives of and we have
Thus, by the chain rule, it follows that
Turning next to we write and find the derivatives of and
By the chain rule,
Now we are finally ready to compute the derivative of the function Recalling that by the product rule we have
From our work above with and we know the derivatives of and and therefore
Activity
For each of the following functions, find the function's derivative. State the rule(s) you use, label relevant derivatives appropriately, and be sure to clearly identify your overall answer.
The chain rule now adds substantially to our ability to compute derivatives. Whether we are finding the equation of the tangent line to a curve, the instantaneous velocity of a moving particle, or the instantaneous rate of change of a certain quantity, if the function under consideration is a composition, the chain rule is indispensable.
Activity
Use known derivative rules, including the chain rule, as needed to answer each of the following questions.
- Find an equation for the tangent line to the curve at the point where
- If represents the position function of a particle moving horizontally along an axis at time (where is measured in inches and in seconds), find the particle's instantaneous velocity at Is the particle moving to the left or right at that instant?
- At sea level, air pressure is 30 inches of mercury. At an altitude of feet above sea level, the air pressure, in inches of mercury, is given by the function Compute and explain what this derivative function tells you about air pressure, including a discussion of the units on In addition, determine how fast the air pressure is changing for a pilot of a small plane passing through an altitude of feet.
- Suppose that and are differentiable functions and that the following information about them is known:
Table . Data for functions and If is a function given by the formula determine In addition, if is the function find
The composite version of basic function rules
As we gain more experience with differentiation, we will become more comfortable in simply writing down the derivative without taking multiple steps. This is particularly simple when the inner function is linear, since the derivative of a linear function is a constant.
Example
Use the chain rule to differentiate each of the following composite functions whose inside function is linear:
More generally, following is an excellent exercise for getting comfortable with the derivative rules. Write down a list of all the basic functions whose derivatives we know, and list the derivatives. Then write a composite function with the inner function being an unknown function and the outer function being a basic function. Finally, write the chain rule for the composite function. The following example illustrates this for two different functions.
Example
To determine
where is a differentiable function of we use the chain rule with the sine function as the outer function. Applying the chain rule, we find that
This rule is analogous to the basic derivative rule that
Similarly, since it follows by the chain rule that
This rule is analogous to the basic derivative rule that
Summary
- A composite function is one where the input variable first passes through one function, and then the resulting output passes through another. For example, the function is composite since
- Given a composite function where and are differentiable functions, the chain rule tells us that