Learning Outcomes
- State the chain rule for the composition of two functions
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: [latex]h(x)= \sin (x^3)[/latex]. We can think of the derivative of this function with respect to [latex]x[/latex] as the rate of change of [latex]\sin (x^3)[/latex] relative to the change in [latex]x[/latex]. Consequently, we want to know how [latex]\sin (x^3)[/latex] changes as [latex]x[/latex] changes. We can think of this event as a chain reaction: As [latex]x[/latex] changes, [latex]x^3[/latex] changes, which leads to a change in [latex]\sin (x^3)[/latex]. This chain reaction gives us hints as to what is involved in computing the derivative of [latex]\sin (x^3)[/latex]. First of all, a change in [latex]x[/latex] forcing a change in [latex]x^3[/latex] suggests that somehow the derivative of [latex]x^3[/latex] is involved. In addition, the change in [latex]x^3[/latex] forcing a change in [latex]\sin (x^3)[/latex] suggests that the derivative of [latex]\sin (u)[/latex] with respect to [latex]u[/latex], where [latex]u=x^3[/latex], is also part of the final derivative.
We can take a more formal look at the derivative of [latex]h(x)= \sin (x^3)[/latex] by setting up the limit that would give us the derivative at a specific value [latex]a[/latex] in the domain of [latex]h(x)= \sin (x^3)[/latex].
This expression does not seem particularly helpful; however, we can modify it by multiplying and dividing by the expression [latex]x^3-a^3[/latex] to obtain
From the definition of the derivative, we can see that the second factor is the derivative of [latex]x^3[/latex] at [latex]x=a[/latex]. 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 [latex]u=x^3[/latex] and observing that as [latex]x\to a, \, u\to a^3[/latex]:
Thus, [latex]h^{\prime}(a)= \cos (a^3) \cdot 3a^2[/latex]
In other words, if [latex]h(x)= \sin (x^3)[/latex], then [latex]h^{\prime}(x)= \cos (x^3) \cdot 3x^2[/latex]. Thus, if we think of [latex]h(x)= \sin (x^3)[/latex] as the composition [latex](f\circ g)(x)=f(g(x))[/latex] where [latex]f(x)=\sin x[/latex] and [latex]g(x)=x^3[/latex], then the derivative of [latex]h(x)= \sin (x^3)[/latex] is the product of the derivative of [latex]g(x)=x^3[/latex] and the derivative of the function [latex]f(x)= \sin x[/latex] evaluated at the function [latex]g(x)=x^3[/latex]. At this point, we anticipate that for [latex]h(x)= \sin (g(x))[/latex], it is quite likely that [latex]h^{\prime}(x)= \cos (g(x))g^{\prime}(x)[/latex]. As we determined above, this is the case for [latex]h(x)= \sin (x^3)[/latex].
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.
The Chain Rule
Let [latex]f[/latex] and [latex]g[/latex] be functions. For all [latex]x[/latex] in the domain of [latex]g[/latex] for which [latex]g[/latex] is differentiable at [latex]x[/latex] and [latex]f[/latex] is differentiable at [latex]g(x)[/latex], the derivative of the composite function
is given by
Alternatively, if [latex]y[/latex] is a function of [latex]u[/latex], and [latex]u[/latex] is a function of [latex]x[/latex], then
Interactive
Problem-Solving Strategy: Applying the Chain Rule
- To differentiate [latex]h(x)=f(g(x))[/latex], begin by identifying [latex]f(x)[/latex] and [latex]g(x)[/latex].
- Find [latex]f^{\prime}(x)[/latex] and evaluate it at [latex]g(x)[/latex] to obtain [latex]f^{\prime}(g(x))[/latex].
- Find [latex]g^{\prime}(x)[/latex].
- Write [latex]h^{\prime}(x)=f^{\prime}(g(x)) \cdot g^{\prime}(x)[/latex].
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.