---
title: "The Chain Rule | FiveStudy"
description: "Differentiate the outside, leave the inside alone, then multiply by the derivative of the inside."
url: https://fivestudy.com/guides/ap-calculus-ab-3-1-the-chain-rule
---

[AP Calculus AB](https://fivestudy.com/ap-calculus-ab) · Study guide

# The Chain Rule

[Figure: FiveStudy]

FiveStudy

AP® Calculus AB · Unit 3 · Differentiation: Composite, Implicit, and Inverse Functions

AP® Calculus AB · Unit 3 · Differentiation: Composite, Implicit, and Inverse Functions

# The *Chain Rule*

Most functions are built by putting one function inside another. The chain rule differentiates them: differentiate the outside, leave the inside alone, then multiply by the derivative of the inside.

1. Functions inside functions 2. The rule and why it works 3. One layer at a time 4. Tables, products and rates

The idea in one paragraph

For a composite function \(f(g(x))\), the derivative is \(f'(g(x)) \cdot g'(x)\): the outer function’s derivative, evaluated at the inside, times the inside’s derivative. In rate language, \(\dfrac{dy}{dx} = \dfrac{dy}{du} \cdot \dfrac{du}{dx}\): rates along a chain multiply. Each layer of a function contributes one factor, and the factor everyone forgets is the last one, the derivative of the inside.

## 1 Functions inside functions

A **composite function** applies one function to the output of another. In \(\sin(3x)\), first triple \(x\), then take the sine. The function applied first is the **inner** function; the one applied last is the **outer** function. To find the outer function, ask: if I were computing this on a calculator, what would I do last?

| Expression | Outer | Inner | Derivative |
| --- | --- | --- | --- |
| \((3x + 1)^5\) | \(\square^5\) | \(3x + 1\) | \(5(3x + 1)^4 \cdot 3\) |
| \(\sin(x^2)\) | \(\sin\square\) | \(x^2\) | \(\cos(x^2) \cdot 2x\) |
| \(e^{4x}\) | \(e^{\square}\) | \(4x\) | \(e^{4x} \cdot 4\) |
| \(\ln(5x - 2)\) | \(\ln\square\) | \(5x - 2\) | \(\frac{1}{5x - 2} \cdot 5\) |
| \(\tan^3 x\) | \(\square^3\) | \(\tan x\) | \(3\tan^2 x \cdot \sec^2 x\) |

## 2 The rule and why it works

\[ \frac{d}{dx}\Big[f\big(g(x)\big)\Big] = f'\big(g(x)\big) \cdot g'(x) \qquad\text{or}\qquad \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} \]

**Figure 1.** If u changes 3 times as fast as x, and y changes 2 times as fast as u, then y changes 2 · 3 = 6 times as fast as x. In symbols: dy/dx = dy/du · du/dx.

**Figure 2.** sin 3x is the sine wave squeezed to one third the width. Squeezing horizontally makes every slope three times as steep, which is the factor 3 the chain rule multiplies in.

Worked Example 1 One layer

### \(\dfrac{d}{dx}[\sin(3x)]\)

1. 1

   Outer: \(\sin(\square)\), with derivative \(\cos(\square)\). Inner: \(3x\), with derivative 3.

2. 2

   Differentiate the outer and leave the inside alone: \(\cos(3x)\). Then multiply by the inner derivative: \(\cdot\,3\).

**Answer:** \(3\cos(3x)\)

Worked Example 2 A power of a polynomial

### \(\dfrac{d}{dx}\left[(x^2 + 1)^5\right]\)

1. 1

   Outer: \((\square)^5\), derivative \(5(\square)^4\). Inner: \(x^2 + 1\), derivative \(2x\).

2. 2

   \(5(x^2 + 1)^4 \cdot 2x\).

3. 3

   Expanding (x² + 1)⁵ first would take ten terms; the chain rule avoids that.

**Answer:** \(10x(x^2 + 1)^4\)

Common Mistake 1 · Leaving off the inner derivative

\(\frac{d}{dx}[\sin(3x)] = 3\cos(3x)\), not \(\cos(3x)\). If your answer would look the same no matter what was inside, you dropped the factor. A good habit is to write the inner derivative first so it cannot be forgotten.

Common Mistake 2 · Changing the inside while differentiating the outside

\(\frac{d}{dx}\left[(x^2 + 1)^5\right]\) starts with \(5(x^2 + 1)^4\). The inside, \(x^2 + 1\), stays as written in that factor; its derivative only appears in the separate factor \(2x\).

## 3 One layer at a time

Worked Example 3 A root

### \(\dfrac{d}{dx}\sqrt{x^2 + 9}\)

1. 1

   Rewrite: \((x^2 + 9)^{1/2}\). Outer derivative: \(\tfrac12(\square)^{-1/2}\). Inner derivative: \(2x\).

2. 2

   \(\tfrac12(x^2 + 9)^{-1/2} \cdot 2x = \dfrac{x}{\sqrt{x^2 + 9}}\).

**Answer:** \(\dfrac{x}{\sqrt{x^2 + 9}}\)

Worked Example 4 Exponential and log

### \(\dfrac{d}{dx}\left[e^{-x^2}\right]\) and \(\dfrac{d}{dx}\left[\ln(x^2 + 1)\right]\)

1. 1

   \(e^{\square}\) is its own derivative, so \(e^{-x^2} \cdot (-2x)\).

2. 2

   \(\ln(\square)\) has derivative \(\dfrac{1}{\square}\), so \(\dfrac{1}{x^2 + 1} \cdot 2x\).

**Answer:** \(-2xe^{-x^2}\) and \(\dfrac{2x}{x^2 + 1}\)

Worked Example 5 Two layers

### \(\dfrac{d}{dx}\left[\sin^3(2x)\right]\)

1. 1

   \(\sin^3(2x)\) means \([\sin(2x)]^3\). Peel from the outside: a cube, around a sine, around \(2x\).

2. 2

   Cube: \(3[\sin(2x)]^2\). Sine: \(\cos(2x)\). Innermost: 2.

3. 3

   Multiply one factor per layer: \(3\sin^2(2x) \cdot \cos(2x) \cdot 2\).

**Answer:** \(6\sin^2(2x)\cos(2x)\)

Common Mistake 3 · Confusing sin²x with sin(x²)

\(\sin^2 x = (\sin x)^2\): the square is the outer layer, derivative \(2\sin x\cos x\). \(\sin(x^2)\): the sine is outer, derivative \(\cos(x^2) \cdot 2x\). Different functions, different derivatives.

## 4 Tables, products and rates

Worked Example 6 From a table

### \(h(x) = f(g(x))\); find \(h'(1)\)

| \(x\) | \(f(x)\) | \(f'(x)\) | \(g(x)\) | \(g'(x)\) |
| --- | --- | --- | --- | --- |
| 1 | 6 | −2 | 3 | 5 |
| 3 | 4 | 7 | 1 | −8 |

1. 1

   \(h'(1) = f'(g(1)) \cdot g'(1)\). Find the inside value first: \(g(1) = 3\).

2. 2

   So the outer derivative is needed at 3, not at 1: \(f'(3) = 7\).

3. 3

   \(h'(1) = 7 \cdot 5 = 35\).

**Answer:** \(h'(1) = 35\)

Common Mistake 4 · Evaluating the outer derivative at x

In Worked Example 6, using \(f'(1) = -2\) gives \(-10\), which is wrong. The outer derivative is evaluated at the inner output, \(g(1) = 3\). Read the inside first, then go back to the table.

Worked Example 7 Chain inside a product

### \(\dfrac{d}{dx}\left[x^2\sin(3x)\right]\)

1. 1

   The outermost structure is a product, so the product rule leads and the chain rule works inside it.

2. 2

   \(2x \cdot \sin(3x) + x^2 \cdot 3\cos(3x)\).

**Answer:** \(2x\sin(3x) + 3x^2\cos(3x)\)

Worked Example 8 Rates in context

### Inflating a balloon

A spherical balloon’s radius is 5 cm and growing at 0.2 cm per second. How fast is its volume \(V = \frac43\pi r^3\) growing?

1. 1

   Volume depends on radius, and radius depends on time, so \(\dfrac{dV}{dt} = \dfrac{dV}{dr} \cdot \dfrac{dr}{dt}\).

2. 2

   \(\dfrac{dV}{dr} = 4\pi r^2 = 4\pi(25) = 100\pi\) cm³ per cm.

3. 3

   \(\dfrac{dV}{dt} = 100\pi \cdot 0.2 = 20\pi \approx 62.83\) cm³ per second.

**Answer:** \(20\pi \approx 62.83\) cubic centimeters per second.

Write it like this

“\(\dfrac{dV}{dt} = \dfrac{dV}{dr} \cdot \dfrac{dr}{dt} = 4\pi(5)^2(0.2) = 20\pi\). When the radius is 5 cm, the volume is increasing at \(20\pi\) cubic centimeters per second.”

### Quick reference

| Outer function | Chain rule result |
| --- | --- |
| \([u]^n\) | \(n[u]^{n - 1} \cdot u'\) |
| \(\sin u\) | \(\cos u \cdot u'\) |
| \(\cos u\) | \(-\sin u \cdot u'\) |
| \(e^u\) | \(e^u \cdot u'\) |
| \(\ln u\) | \(\frac{1}{u} \cdot u'\) |
| \(\sqrt{u}\) | \(\frac{1}{2\sqrt{u}} \cdot u'\) |

FiveStudy AP® Calculus AB · The chain rule
