3.3 Chain Rule

Chain Rule

There is one more type of complicated function that we will want to know how to differentiate: composition. The Chain Rule will let us find the derivative of a composition.  Think of the Chain Rule when the function to be differentiated consists of an “outer” function and an “inner” function which we can write as f(g(x)).

 

Example 1

Find the derivative of [latex]y=\left(4x^3+15x\right)^2[/latex]

This is not a simple polynomial, so we can’t use the basic building block rules yet. It is a product, so we could write it as [latex]y=\left(4x^3+15x\right)^2=\left(4x^3+15x\right)\left(4x^3+15x\right)[/latex] and use the product rule. Or we could multiply it out and simply differentiate the resulting polynomial. I’ll do it the second way:
\[ \begin{align*}
y=& \left(4x^3+15x\right)^2\\
=& 16x^6+120x^4+225x^2\\
y’=& 96x^5+480x^3+450x
\end{align*} \]

Now suppose we want to find the derivative of [latex]y=\left(4x^3+15x\right)^{20}[/latex]. We could write it as a product with 20 factors and use the product rule, or we could multiply it out. But I don’t want to do that, do you?

We need an easier way, a rule that will handle a composition like this. The Chain Rule is a little complicated, but it saves us the much more complicated algebra of multiplying something like this out. It will also handle compositions where it wouldn’t be possible to multiply it out.

The Chain Rule is a common place for students to make mistakes. Part of the reason is that the notation takes a little getting used to. And part of the reason is that students often forget to use it when they should. When should you use the Chain Rule? Almost every time you take a derivative.

 

Derivative Rules: Chain Rule

In what follows, [latex]f[/latex] and [latex]g[/latex] are differentiable functions with [latex]y=f(u)[/latex] and [latex]u=g(x)[/latex].

Chain Rule (Leibniz notation)

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

Notice that the [latex]du[/latex]’s seem to cancel. This is one advantage of the Leibniz notation – it can remind you of how the chain rule chains together.

Chain Rule (using prime notation)

\[\frac{d}{dx}\left[f\left(g(x)\right)\right]=f'(u)\cdot g'(x)=f’\left(g(x)\right)\cdot g'(x)\]

Chain Rule (in words)

The derivative of a composition is the derivative of the outside (with the inside staying the same) TIMES the derivative of the inside.

I recite the version in words each time I take a derivative, especially if the function is complicated.

 

Example 2

Find the derivative of [latex]y=\left(4x^3+15x\right)^2[/latex]

This is the same one we did before by multiplying out. This time, let’s use the Chain Rule: The inside function is what appears inside the parentheses: [latex]4x^3+15x[/latex]. The outside function is the first thing we find as we come in from the outside – it’s the square function, [latex](\text{inside})^2[/latex].

The derivative of this outside function is [latex](2\cdot\text{inside})[/latex]. Now using the chain rule, the derivative of our original function is [latex](2\cdot\text{inside})[/latex] TIMES the derivative of the inside (which is [latex]12x^2+15[/latex]):
\[ y’=2\left(4x^3+15x\right)\left(12x^2+15 \right)\]

If you multiply this out, you get the same answer we got before. Hurray! Algebra works!

 

Example 3

Find the derivative of [latex]y=\left(4x^3+15x\right)^{20}[/latex].

Now we have a way to handle this one. It’s the derivative of the outside TIMES the derivative of the inside.

The outside function is [latex]\left(\text{inside}\right)^{20}[/latex], which has derivative [latex]20\left(\text{inside}\right)^{19}[/latex], so \[y’=20\left(4x^3+15x\right)^{19}\left(12x^2+15\right).\]

 

Example 4

Differentiate [latex]y=e^{x^2+5}[/latex].

This isn’t a simple exponential function; it’s a composition. Typical calculator or computer syntax can help you see what the “inside” function is here. On a TI calculator, for example, when you push the [latex]e^x[/latex] key, it opens up parentheses: e^( . This tells you that the “inside” of the exponential function is the exponent. Here, the inside is the exponent [latex]x^2+5[/latex]. Now we can use the Chain Rule: We want the derivative of the outside TIMES the derivative of the inside. The outside is the [latex]e[/latex] to the something function, so its derivative is the same thing. The derivative of what’s inside is [latex]2x[/latex]. So \[\frac{d}{dx}\left( e^{x^2+5} \right)= \left( e^{x^2+5} \right)\cdot (2x).\]

 

Example 5

The table gives values for [latex]f[/latex] , [latex]f'[/latex] , [latex]g[/latex], and [latex]g'[/latex] at a number of points. Use these values to determine [latex]( f \circ g )(x)[/latex] and [latex]( f \circ g ) '(x)[/latex] at [latex]x = -1[/latex] and 0.

Table 3.1
[latex]x[/latex] [latex]f(x)[/latex] [latex]g(x)[/latex] [latex]f'(x)[/latex] [latex]g'(x)[/latex] [latex](f\circ g)(x)[/latex] [latex](g\circ f)(x)[/latex]
-1 2 3 1 0
0 -1 1 3 2
1 1 0 -1 3
2 3 -1 0 1
3 0 2 2 -1

[latex](f\circ g)(-1)=f\left(g(-1)\right)=f(3)=0[/latex]

[latex](f\circ g)(0)=f\left(g(0)\right)=f(1)=1[/latex]

 

[latex](f\circ g)'(-1)=f'\left(g(-1)\right)\cdot g'(-1)=f'(3)\cdot (0)=(2)(0)=0 \text{ and}[/latex]

[latex](f\circ g)'(0)=f'\left(g(0)\right)\cdot g'(0)=f'(1)\cdot (2)=(-1)(2)=-2[/latex]

 

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Techniques of Calculus 1 Copyright © 2021 by Larry Musolino is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book