Chain Rule I
Objectives
- Given two functions, find the specified composition; recognize that order matters.
- Given a composition, identify the inside and outside functions.
- Use the chain rule to find the derivative of a composition by hand.
1. Composition of Functions
Objective. Given two functions, find the specified composition; recognize that order matters.
Definition 1 (Composition).
If and are functions, then the composition of with is when this expression is defined.
Definition 2 (Inside and outside functions).
In the composition , the function is the inside function. The function is the outside function.
The inside function is applied first, to the input . The outside function is applied to the output of . The brackets in mark evaluation: means evaluated at , the same as .
For and , the expression is undefined at every input, because every output is at most and is defined only for positive inputs. The expression fails the condition in the definition of composition that be defined.
The product is not the composition of and in either order. Its last step multiplies the outputs of the two functions instead of applying one function to the output of the other. The product has no inside function and no outside function.
To find , replace every in the formula for with the whole formula for , in parentheses.
Example 1
For
find and , and evaluate both at .
ShowHide solution
By the definition of composition, . For , replace in the formula for with , then evaluate at :
For , replace in the formula for with , then evaluate at :
In the diagram, the input passes through both compositions. In the inside function is applied first and sends to . In the inside function is applied first and sends to .
Order of composition. The compositions and are different functions when their outputs differ at some input, as at in Example 1. The two can agree at one input and still be different functions. At in Example 1, both compositions equal 1:
For some pairs the two orders give the same function. For and ,
Example 2
For
find and .
ShowHide solution
Replacing in the formula for each outside function with the formula for the inside function gives
The two compositions are different functions, because the graph of stays between 0 and 1 while the graph of runs from to 1. At , for example, and .
Example 3
For
find , , and .
ShowHide solution
For , replace each in with and distribute the 3:
For , replace each in with :
For the product, multiply the two outputs instead of applying one function to the other:
2. Inside and Outside Functions
Objective. Given a composition, identify the inside and outside functions.
Decomposing a composition.
- Find the last function applied in computing the composition. Pass over a constant added, subtracted, multiplied, or divided at the very end, and keep that constant in the outside function. A constant divided by a power counts as a power in a denominator.
- Find the row of the table for that function, and read the inside function from it.
- Replace with in the composition to get the outside function .
| Outside function | Where sits | Composition and |
|---|---|---|
| Trigonometric or logarithmic | in the parentheses after the function name | , |
| Exponential | in the exponent | , |
| Power or root, including a power in a denominator | in the base of the power or under the root | , |
In the table’s rows, step 3 gives the outside functions , , and .
Example 4
Identify the inside function and the outside function of each composition:
ShowHide solution
By the definition of inside and outside functions (section 1), the inside function is applied to first, and the outside function is applied to the output of .
- In , the last function applied is a power, and by the power row is the base. The inside function is and the outside function is .
- In , the last function applied is an exponential, and by the exponential row is the exponent. The inside function is and the outside function is .
- In , the last function applied before adding 1 is a sine, and by the trigonometric row is in the parentheses. The inside function is and the outside function is .
In the last item, the choice with is also correct, because . With that choice, is itself a composition, and the chain rule of section 3 is applied a second time to find .
Products, quotients, sums, and differences. Let the last step of a function combine the outputs of two functions of , neither of them a constant. The function is a product when the last step multiplies, a quotient when it divides, and a sum or difference when it adds or subtracts. Differentiate a product with the product rule and a quotient with the quotient rule (Lesson 30), and a sum or difference term by term. A factor or a term that is itself a composition is differentiated with the chain rule of section 3, as the term is in .
Example 5
For each function, identify the inside and outside functions, or state that the function is a product, a quotient, or a sum:
ShowHide solution
- The function is a product, because its last step multiplies the outputs of two functions of . Differentiate it with the product rule.
- In , the inside function is and the outside function is . The constant 5, multiplied at the last step, stays in the outside function.
- The function is the constant 1 divided by a power, which counts as a power in a denominator, the last row of the table. Its inside function is and its outside function is .
- The function is a sum, because its last step adds the outputs of two functions of . Differentiate it term by term.
3. The Chain Rule
Objective. Use the chain rule to find the derivative of a composition by hand.
Rule 3 (Chain rule).
Let and be differentiable functions. When the compositions are defined,
The chain rule in words. The derivative of a composition is the derivative of the outside function , evaluated at the inside function , times the derivative of the inside function.
Applying the chain rule.
- Name the inside function and the outside function .
- Differentiate each one: and .
- Evaluate at the inside function: .
- Multiply by .
Each row of the table is the chain rule applied to one basic outside function. In the table, is a constant and is a constant with . The power row is true at each where is differentiable and is defined, and the row at each where is differentiable and .
| Outside function | Composition | Derivative |
|---|---|---|
The two factors of the chain rule. The derivative of is . The inside function stays unchanged in the cosine, and the derivative of the inside function multiplies the cosine as the factor .
Example 6
Find the derivative by hand:
ShowHide solution
The function is the composition of the functions named below. By the chain rule, . Name the inside and outside functions and their derivatives:
Evaluate at the inside function:
Multiply by :
Example 7
Find the derivative by hand:
ShowHide solution
The inside function is , with . The outside function is , with . Substitute into the chain rule:
Example 8
Find the derivative by hand:
ShowHide solution
The inside function is , with . The outside function is , with . Substitute into the chain rule and distribute the 4:
Example 9
Find the derivative by hand:
ShowHide solution
The inside function is , with . The outside function is , with . Substitute into the chain rule:
Example 10
Find the derivative by hand:
ShowHide solution
Rewrite as . The inside function is . Differentiate the first term by the rule for and the second term by the power rule:
The outside function is , with . Substitute into the chain rule:
Example 11
Find the slope of the tangent line to the graph of
at .
ShowHide solution
The slope of the tangent line at is . Find by the chain rule, then evaluate it at . Rewrite the root as a power, . The inside function is , with . The outside function is , with by the power rule. Substitute into the chain rule:
Evaluate the derivative at :
The tangent line passes through the point on the graph, and it rises 0.8 units for each unit of .
Checking in R. To check a hand derivative, evaluate it and the derivative function that D() returns (Lesson 30 section 3) at the same input. Compare values instead of formulas, because the formula that D() prints can look different from the hand derivative. A different value shows an error in the hand work or the R entry. Equal values support the hand derivative, and a check at a second input makes a chance agreement of two different functions unlikely. For Example 6, the hand derivative gives
and D() gives the same values:
> dh = D((x^2 - 3)^5 ~ x) > dh(2) [1] 20 > dh(1) [1] 160
Found a mistake, a broken tool or something unclear? Report a problem