Free for students · Ad-free · WCAG 2.1 AA Compliant · Accessibility

The Chain Rule

Lesson ~10 min read

In simple terms: In simple terms, the Chain Rule is a method for finding the derivative (or rate of change) of a function that is nested inside another function.

Why this matters

Imagine you're at a summer fair in Dallas, watching a team prepare for a hot air balloon launch. As they pump air into the balloon, its radius grows. As the radius grows, the balloon's volume increases. You can measure how fast the radius is increasing, maybe 2 inches per second. But what you really want to know is how fast the volume is increasing at that exact moment.

You know the formula for a sphere's volume depends on its radius. And you know the radius is changing over time. The Chain Rule is the calculus tool that lets us connect these related rates. It helps us find the rate of change of the "outer" function (volume) by considering the rate of change of the "inner" function (radius). It's the key to solving problems where one change causes another.

In this lesson, we'll break down exactly how to use this powerful rule.

Concept overview

flowchart TD
    A[Start: Find d/dx of f(g(x))] --> B{Identify outer f(u) and inner g(x)};
    B --> C[Step 1: Differentiate the outer function f'(u)];
    C --> D[Step 2: Keep the original inner function g(x) inside --> f'(g(x))];
    B --> E[Step 3: Differentiate the inner function g'(x)];
    D --> F((Multiply));
    E --> F;
    F --> G[Result: f'(g(x)) * g'(x)];
This flowchart shows the four main steps for applying the Chain Rule. It starts by identifying the outer and inner functions, then shows two parallel paths: differentiating the outer function while keeping the inner function inside, and differentiating the inner function. Both paths lead to a multiplication step to get the final result.

Core explanation

Hello everyone! It’s Saavi. Today, we're tackling one of the most important differentiation rules in all of calculus: the Chain Rule. Once you master this, you unlock a huge range of functions you can analyze.

What is a Composite Function?

First, let's make sure we're clear on what we're dealing with. The Chain Rule is for composite functions. That's just a formal name for a function that has another function plugged into it.

Think of a function like h(x) = (x^2 + 1)^3.

  • There's an "inner" function, the g(x) = x^2 + 1.
  • There's an "outer" function, the f(u) = u^3.

We've created h(x) by plugging g(x) into f(u). So, h(x) = f(g(x)).

You've seen these everywhere: sin(5x), e^(x^2), sqrt(4x - 1). They all have an "inside" piece and an "outside" piece. The question is, how do we find their derivatives?

The Russian Nesting Doll Analogy

I like to think of composite functions as Russian nesting dolls. You have a large outer doll, and when you open it, there's a smaller doll inside. Sometimes, there's even another doll inside that one!

The Chain Rule tells us how to handle this. To find the derivative, you work from the outside in.

  1. Take the derivative of the outermost doll (function).
  2. Leave the inner doll(s) untouched inside.
  3. Then, multiply by the derivative of the next doll in.
  4. Repeat until you've taken the derivative of the very last, innermost doll.

This act of multiplying by the derivative of the "inside" is the "chain" part of the Chain Rule.

The Rule Itself

Let's put that into mathematical notation. If you have a composite function h(x) = f(g(x)), its derivative is:

h'(x) = f'(g(x)) * g'(x)

Let's break down that formula. It looks a little intimidating, but it's exactly what we just described with the dolls.

  • f'(g(x)): This is "the derivative of the outer function, with the inner function left alone inside."
  • * g'(x): This is "times the derivative of the inner function."

Let's Apply It

Let's go back to our first example: h(x) = (x^2 + 1)^3.

  1. 1
    Identify the functions
    • Outer function: f(u) = u^3. Its derivative is f'(u) = 3u^2.
    • Inner function: g(x) = x^2 + 1. Its derivative is g'(x) = 2x.
  2. 2
    Apply the Chain Rule
    h'(x) = f'(g(x)) * g'(x)
    • Step 1: Derivative of the outside
      The derivative of (something)^3 is 3(something)^2.
      h'(x) = 3( ... )^2
    • Step 2: Leave the inside alone
      We plug the original inner function, x^2 + 1, back into the parentheses.
      h'(x) = 3(x^2 + 1)^2

      Right now, we have the f'(g(x)) part.

    • Step 3: Multiply by the derivative of the inside
      The derivative of the inside part (x^2 + 1) is 2x. We multiply our result by this.
      h'(x) = 3(x^2 + 1)^2 * (2x)

      This is the * g'(x) part. It's the crucial link in the chain.

  3. 3
    Simplify
    h'(x) = 6x(x^2 + 1)^2

And that's it! You've successfully used the Chain Rule. You took the derivative of the outer power function, left the inner polynomial alone, and then multiplied by the derivative of that inner polynomial.

The process is the same for any composite function, whether it involves trig functions, exponentials, or logarithms. Identify the outer layer, differentiate it, leave the inside alone, and multiply by the derivative of the inside.

Worked examples

Let's walk through a few examples together. The goal is to make this process second nature.

Example 1

A Power Rule Composition

Problem: Find the derivative of y = (4x^3 - 7)^5.

Solution:

  1. 1
    Identify the outer and inner functions
    This is the first and most important step.
    • The "outer" action is raising something to the 5th power. So, our outer function is f(u) = u^5.
    • The "inner" stuff being raised to that power is 4x^3 - 7. This is our inner function, g(x) = 4x^3 - 7.
  2. 2

    Differentiate the outer function, leaving the inner function untouched.

    • The derivative of u^5 is 5u^4.
    • So, the first part of our derivative is 5(4x^3 - 7)^4. Notice we just applied the Power Rule to the whole chunk in the parentheses and left that chunk alone.
  3. 3
    Find the derivative of the inner function
    • The derivative of g(x) = 4x^3 - 7 is g'(x) = 12x^2.
  4. 4
    Multiply the results from Step 2 and Step 3
    This is the "chain" step.
    • y' = 5(4x^3 - 7)^4 * (12x^2)
  5. 5
    Simplify
    It's good practice to clean up your answer.
    • y' = 60x^2(4x^3 - 7)^4

Example 2

A Trigonometric Composition

Problem: Find the derivative of f(x) = cos(x^2 + 3x).

Solution:

  1. 1
    Identify the functions
    • Outer function: cos(u). What's the outermost operation? It's cosine.
    • Inner function: u = x^2 + 3x. This is the expression "inside" the cosine.
  2. 2
    Differentiate the outer function
    • The derivative of cos(u) is -sin(u).
    • Applying this, we get -sin(x^2 + 3x). We keep the inside part the same!
  3. 3
    Find the derivative of the inner function
    • The derivative of x^2 + 3x is 2x + 3.
  4. 4
    Multiply
    • f'(x) = -sin(x^2 + 3x) * (2x + 3)
  5. 5
    Simplify/Rewrite
    It's standard to move the polynomial part to the front to avoid confusion.
    • f'(x) = -(2x + 3)sin(x^2 + 3x)

Try it yourself

Ready to try a couple on your own? Remember the process: outside, inside, multiply.

Problem 1: Find the derivative of h(t) = e^(t^2 + 5t).

  • Hint: What's the derivative of e^u? It's just e^u. So the derivative of the "outside" will look a lot like the original function. Don't forget to multiply by the derivative of the exponent!

Problem 2: Find the derivative of g(x) = tan(sqrt(x)).

  • Hint: This one has two steps. First, rewrite sqrt(x) as x^(1/2). The outer function is tan(u). The inner function is x^(1/2). The derivative of tan(u) is sec^2(u). Take it one step at a time.