Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

3.4: Chain Rule

( \newcommand{\kernel}{\mathrm{null}\,}\)

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. (This is the last derivative rule we will learn!)

Example 3.4.1

Find the derivative of y=(4x3+15x)2.

Solution

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 y=(4x3+15x)2=(4x3+15x)(4x3+15x) and use the product rule. Or we could multiply it out and simply differentiate the resulting polynomial. I’ll do it the second way: y=(4x3+15x)2=16x6+120x4+225x2y=96x5+480x3+450x

Now suppose we want to find the derivative of y=(4x3+15x)20. 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, f and g are differentiable functions where y=f(g(x)). We could alternatively write y=f(u) and u=g(x).

Chain Rule (Leibniz notation)

dydx=dydududx

Notice that the du’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)

ddxf(g(x))=f(g(x))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 3.4.2

Find the derivative of y=(4x3+15x)2.

Solution

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: 4x3+15x. The outside function is the first thing we find as we come in from the outside – it’s the square function, (inside)2.

The derivative of this outside function is (2inside). Now using the chain rule, the derivative of our original function is (2inside) TIMES the derivative of the inside (which is 12x2+15): y=2(4x3+15x)(12x2+15)

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

Example 3.4.3

Find the derivative of y=(4x3+15x)20.

Solution

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 (inside)20, which has derivative 20(inside)19, so y=20(4x3+15x)19(12x2+15).

Example 3.4.4

Differentiate y=ex2+5.

Solution

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 ex 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 x2+5. Now we can use the Chain Rule: We want the derivative of the outside TIMES the derivative of the inside. The outside is the e to the something function, so its derivative is the same thing. The derivative of what’s inside is 2x. So ddx(ex2+5)=(ex2+5)(2x).

Example 3.4.5

The table gives values for f, f, g, and g at a number of points. Use these values to determine (fg)(x) and (fg)(x) at x=1 and 0.

x f(x) g(x) f(x) g(x) (fg)(x) (gf)(x)
-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    

Solution

(fg)(1)=f(g(1))=f(3)=0(fg)(0)=f(g(0))=f(1)=1(fg)(1)=f(g(1))g(1)=f(3)(0)=(2)(0)=0 and(fg)(0)=f(g(0))g(0)=f(1)(2)=(1)(2)=2

Example 3.4.6

If 2400 people now have a disease, and the number of people with the disease appears to double every 3 years, then the number of people expected to have the disease in t years is y=24002t/3.

  1. How many people are expected to have the disease in 2 years?
  2. When are 50,000 people expected to have the disease?
  3. How fast is the number of people with the disease expected to grow now and 2 years from now?
  1. In 2 years, y=240022/33,810 people.
  2. We know y=50,000, and we need to solve 50,000=24002t/3 for t. We could start by isolating the exponential by dividing both sides by 2400, 500002400=2t/3ln(500002400)=ln(2t/3)(Taking the natural log of both sides.)ln(500002400)=t3ln(2)(Using the exponent property for logs.)t=3ln(500002400)ln(2)13.14 years(Solving for t.) We expect 50,000 people to have the disease about 13.14 years from now.
  3. This is asking for dydt when t= 0 and 2 years. Using the chain rule, dydt=ddt(24002t/3)=24002t/3ln(2)13554.52t/3 So, at t=0 the rate of growth of the disease is approximately 554.520554.5 people/year. In 2 years the rate of growth will be approximately 554.522/3880 people/year.

Derivatives of Complicated Functions

You're now ready to take the derivative of some mighty complicated functions. But how do you tell what rule applies first? Work your way in from the outside – what do you encounter first? That’s the first rule you need. Use the Product, Quotient, and Chain Rules to peel off the layers, one at a time, until you’re all the way inside.

Example 3.4.7

Find ddx(e3xln(5x+7)).

Solution

Coming in from the outside, we see that this is a product of two (complicated) functions. So we’ll need the Product Rule first. we’ll fill in the pieces we know, and then we can figure the rest as separate steps and substitute in at the end: ddx(e3xln(5x+7))=(ddx(e3x))ln(5x+7)+e3x(ddx(ln(5x+7)))

Now as separate steps, we’ll find ddx(e3x)=3e3x (using the Chain Rule) and ddx(ln(5x+7))=15x+75 (also using the Chain Rule).

Finally, to substitute these in their places:ddx(e3xln(5x+7))=(3e3x)ln(5x+7)+e3x(15x+75)

(We can stop here – we don't need to try to simplify any further.)

Example 3.4.8

Differentiate z=(3t3et(t1))4.

Solution

Don’t panic! As we come in from the outside, what’s the first thing we encounter? It’s that fourth power. That tells us that this is a composition, a (complicated) function raised to the fourth power.

Step One: Use the Chain Rule. The derivative of the outside TIMES the derivative of the inside: dzdt=ddt(3t3et(t1))4=4(3t3et(t1))3ddt(3t3et(t1))

Now we’re one step inside, and we can concentrate on just the ddt(3t3et(t1)) part. Now, as you come in from the outside, the first thing you encounter is a quotient – this is the quotient of two (complicated) functions.

Step Two: Use the Quotient Rule. The derivative of the numerator is straightforward, so we can just calculate it. The derivative of the denominator is a bit trickier, so we'll leave it for now: ddt(3t3et(t1))=(9t2)(et(t1))(3t3)(ddt(et(t1)))(et(t1))2

Now we’ve gone one more step inside, and we can concentrate on just the ddt(et(t1)) part, which involves a product.

Step Three: Use the Product Rule: ddt(et(t1))=(et)(t1)+(et)(1)

And now we’re all the way in – no more derivatives to take!

Step Four: Now it’s just a question of substituting back – be careful now!

ddt(et(t1))=(et)(t1)+(et)(1) so ddt(3t3et(t1))=(9t2)(et(t1))(3t3)((et)(t1)+(et)(1))(et(t1))2 so dzdt=ddt(3t3et(t1))4=4(3t3et(t1))3((9t2)(et(t1))(3t3)((et)(t1)+(et)(1))(et(t1))2)

Phew!

What if the Derivative Doesn’t Exist?

Differentiable

A function is called differentiable at a point if its derivative exists at that point.

We’ve been acting as if derivatives exist everywhere for every function. This is true for most of the functions that you will run into in this class. But there are some common places where the derivative doesn’t exist.

Remember that the derivative is the slope of the tangent line to the curve. That’s what to think about.

Where can a slope not exist? If the tangent line is vertical, the derivative will not exist.

Example 3.4.9

Show that f(x)=3x=x1/3 is not differentiable at x=0.

Solution

Finding the derivative, f(x)=13x2/3=13x2/3. At x=0, this function is undefined. From the graph, we can see that the tangent line to this curve at x=0 is vertical with undefined slope, which is why the derivative does not exist at x=0.

graph

Where can a tangent line not exist?

If there is a sharp corner (cusp) in the graph, the derivative will not exist at that point because there is no well-defined tangent line (a teetering tangent, if you will).

If there is a discontinuity in the graph (a jump, a break, a hole in the graph, or a vertical asymptote), the tangent line will be different on either side and the derivative will not exist at that point.

Example 3.4.10

Show that f(x)=|x| is not differentiable at x=0.

Solution

On the left side of the graph, the slope of the line is -1. On the right side of the graph, the slope is +1. There is no well-defined tangent line at the sharp corner at x=0, so the function is not differentiable at that point.

graph

This page titled 3.4: Chain Rule is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Shana Calaway, Dale Hoffman, & David Lippman (The OpenTextBookStore) via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?