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 of a "function inside a function," like figuring out how fast a balloon's volume changes as its radius grows.

Why this matters

Imagine you have one of those giant, multi-layered jawbreakers from a candy shop in Chicago. The color changes as you get deeper into it. Now, let's think like a calculus student. The rate at which the color changes depends on two things: first, how fast you're licking the jawbreaker (the rate of change of the radius), and second, how thick each colored layer is. You can't find the overall rate of color change without considering both parts—the "outer" action and the "inner" layers.

This is exactly the kind of problem the chain rule solves. It helps us deal with functions that are layered, or "nested," inside of each other. It’s one of the most powerful and common derivative rules you'll use. So, let's break it down and learn how to handle these mathematical jawbreakers.

Concept overview

flowchart TD
    A[Start with h(x)] --> B{Is h(x) a composite function f(g(x))?};
    B -->|No| C[Use other rules: Power, Product, Quotient];
    B -->|Yes| D[Identify outer f(u) and inner g(x)];
    D --> E[Find derivative of outer function: f'(u)];
    D --> F[Find derivative of inner function: g'(x)];
    E --> G[Assemble the derivative: f'(g(x))];
    G & F --> H[Multiply the parts: h'(x) = f'(g(x)) * g'(x)];
    H --> I[Simplify and check for more layers];
    I --> J[Final Answer];
This diagram is a flowchart that outlines the steps for applying the chain rule. It starts by asking if a function is composite, then branches to show the process of identifying inner and outer functions, finding their respective derivatives, and multiplying them together to get the final answer.

Core explanation

Alright, let's dive into one of the most important rules in all of calculus: the chain rule.

So far, you’ve gotten really good at finding derivatives of standard functions.

  • The derivative of x^4 is 4x^3. (Power Rule)
  • The derivative of sin(x) is cos(x). (Trig Rule)

But what happens when we combine them? What is the derivative of sin(x^4)?

This is not a simple product or sum. This is a composite function—a function living inside another function. In this case, the x^4 function is inside the sin(x) function. To handle this, we need the chain rule.

The "Russian Nesting Doll" Analogy

Think of a composite function like a set of Russian nesting dolls (Matryoshka dolls). You have a big doll on the outside, and when you open it, there's a smaller doll inside, and maybe another inside that one.

f(g(x)) is exactly like this:

  • Outer Function
    f( ) is the biggest, outermost doll.
  • Inner Function
    g(x) is the doll nested inside.

To find the derivative, you can't just jump to the innermost doll. You have to deal with each layer, from the outside in. The chain rule is the process of opening each doll, one at a time.

The Rule Itself

Let's look at the rule in its most common form. If you have a function h(x) = f(g(x)), its derivative is:

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

This looks a little abstract, so let's translate it into plain English. This is the mantra you should repeat to yourself:

"The derivative of the outside function (leaving the inside function alone), times the derivative of the inside function."

Let's break down that phrase:

  1. f'(g(x)): This is the "derivative of the outside, leaving the inside alone." You look at the outermost function, f, and take its derivative, f'. But notice what's still inside the parentheses: the original inner function, g(x). You don't touch it in this step.
  2. *` g'(x)**: This is the "times the derivative of the inside." After you've handled the outer layer, you multiply your result by the derivative of the inner function,g'(x)`.

Let's Try It: A Step-by-Step Example

Let's find the derivative of h(x) = (x^2 + 5)^3.

Step 1: Identify the outer and inner functions.

  • What is the main thing happening to the expression? It's being cubed. So, our outer function is "something cubed." Let's call it f(u) = u^3.
  • What is the "something" being cubed? It's x^2 + 5. This is our inner function. Let's call it g(x) = x^2 + 5.

Step 2: Take the derivative of the outside function.

  • The derivative of our outer function f(u) = u^3 is f'(u) = 3u^2.
  • Now, apply the first part of our mantra: "derivative of the outside, leaving the inside alone." We'll take that 3u^2 structure and plug our original inside function (x^2 + 5) back in for u.
  • This gives us 3(x^2 + 5)^2.

Step 3: Take the derivative of the inside function.

  • Our inner function is g(x) = x^2 + 5.
  • Its derivative is simple: g'(x) = 2x.

Step 4: Multiply the results from Step 2 and Step 3.

  • h'(x) = [Result from Step 2] * [Result from Step 3]
  • h'(x) = 3(x^2 + 5)^2 * (2x)

And that's it! You can simplify it to 6x(x^2 + 5)^2 for a final answer.

You have successfully "unpacked" the nesting doll. You dealt with the outer "cubing" layer first, then multiplied by the derivative of the inner x^2 + 5 layer. This process covers the core requirement of the AP exam: calculating the derivative of a composite function (LO FUN-3.C).

Another Notation (Leibniz Notation)

Sometimes you'll see the chain rule written like this:

If y = f(u) and u = g(x), then dy/dx = dy/du * du/dx.

This is just another way of saying the exact same thing. dy/du is the derivative of the outer function with respect to its temporary variable u, and du/dx is the derivative of the inner function with respect to x. It's helpful because it almost looks like the du terms cancel out, leaving you with dy/dx.

No matter which notation you prefer, the process is the same: outside, then inside.

Worked examples

Let's walk through a couple of examples together. The key is to be systematic: identify layers, differentiate the outside, then multiply by the derivative of the inside.

Example 1

A Trigonometric Function

Problem: Find the derivative of y = cos(4x^3).

Solution:

  1. Identify the layers. This can trip people up because the parentheses are the only clue.

    • The "outer" function is the main operation: cos(u).
    • The "inner" function is the stuff inside the cosine: u = 4x^3.
  2. Find the derivative of the outer function, cos(u).

    • The derivative of cos(u) is -sin(u).
    • Now, apply the "leave the inside alone" rule. We substitute our original inner function back in for u. This gives us -sin(4x^3).
  3. Find the derivative of the inner function, 4x^3.

    • Using the power rule, the derivative of 4x^3 is 12x^2.
  4. Multiply the results.

    • y' = (Derivative of outside) * (Derivative of inside)
    • y' = -sin(4x^3) * (12x^2)
  5. Clean it up. It's standard practice to move the polynomial part to the front to avoid confusion.

    • y' = -12x^2 * sin(4x^3)

Example 2

A Multi-Layer Chain Rule

Problem: Find the derivative of f(x) = sin^4(2x).

Hold on! This looks tricky. The first step is always to rewrite it to make the layers obvious. sin^4(2x) is just a shorthand way of writing [sin(2x)]^4.

Solution: Now we can see we have three layers, like a triple nesting doll!

  • Outermost layer
    u^4 (something to the fourth power)
  • Middle layer
    sin(v)
  • Innermost layer
    2x

We just apply the chain rule from the outside in, peeling one layer at a time.

  1. Differentiate the outermost layer, u^4.

    • The derivative is 4u^3. We leave everything inside it alone.
    • 4[sin(2x)]^3
  2. Multiply by the derivative of the next layer in, sin(2x).

    • What's the derivative of sin(2x)? Uh oh, this is another chain rule!
      • Outer: sin(v). Derivative is cos(v).
      • Inner: 2x. Derivative is 2.
      • So, the derivative of sin(2x) is cos(2x) * 2.
    • Let's chain this onto our result from step 1.
    • f'(x) = 4[sin(2x)]^3 * [cos(2x) * 2]
  3. Clean it up.

    • f'(x) = 8 * sin^3(2x) * cos(2x)

We handled the ( )^4 layer, then the sin( ) layer, and finally the 2x layer, multiplying all the derivatives together.

Try it yourself

Ready to try a couple on your own? Don't worry about getting the perfect answer right away. Focus on identifying the layers and applying the process.

  1. Find the derivative of f(x) = sqrt(x^2 + 3x)

    • Hint: How can you rewrite a square root as a power? Once you do that, the "outer" function becomes much clearer.
  2. Find the derivative of g(t) = e^(sin(t))

    • Hint: The base is e, so you know the derivative of the outer layer will look very similar to the original function. What's the inner function you need to multiply by the derivative of?

Take your time, write out the steps, and say the mantra to yourself. You can do this.