Deriving the Chain Rule

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].

[latex]h^{\prime}(a)=\underset{x\to a}{\lim}\dfrac{\sin (x^3)- \sin (a^3)}{x-a}[/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

[latex]h^{\prime}(a)=\underset{x\to a}{\lim}\dfrac{\sin (x^3)- \sin (a^3)}{x^3-a^3} \cdot \dfrac{x^3-a^3}{x-a}[/latex]

 

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,

[latex]\underset{x\to a}{\lim}\frac{x^3-a^3}{x-a}=\frac{d}{dx}(x^3)|_{x=a}=3a^2[/latex]

 

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]:

[latex]\begin{array}{ll} \underset{x\to a}{\lim}\dfrac{\sin (x^3)- \sin (a^3)}{x^3-a^3} & =\underset{u\to a^3}{\lim}\dfrac{\sin u- \sin (a^3)}{u-a^3} \\ & =\frac{d}{du}{(\sin u)}|_{u=a^3} \\ & = \cos (a^3) \end{array}[/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

[latex]h(x)=(f\circ g)(x)=f(g(x))[/latex]

 

is given by

[latex]h^{\prime}(x)=f^{\prime}(g(x))g^{\prime}(x)[/latex]

 

Alternatively, if [latex]y[/latex] is a function of [latex]u[/latex], and [latex]u[/latex] is a function of [latex]x[/latex], then

[latex]\frac{dy}{dx}=\frac{dy}{du} \cdot \frac{du}{dx}[/latex]

 

Problem-Solving Strategy: Applying the Chain Rule

  1. To differentiate [latex]h(x)=f(g(x))[/latex], begin by identifying [latex]f(x)[/latex] and [latex]g(x)[/latex].
  2. Find [latex]f^{\prime}(x)[/latex] and evaluate it at [latex]g(x)[/latex] to obtain [latex]f^{\prime}(g(x))[/latex].
  3. Find [latex]g^{\prime}(x)[/latex].
  4. 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.

Try It