# Chain Rule

> AP Calculus BC · CED Differentiation: Composite, Implicit, Inverse Functions
> Source: https://www.owlsprep.com/study/ap-calculus-bc-u3-chain-rule/

This guide covers the chain rule for composite functions, including basic outside-inside differentiation, generalized rules for nested functions, and applications to parametric curves and inverse functions, with AP-style worked examples.

**Prerequisites:** Basic derivative rules for elementary functions; Definition of composite functions; Parametric curve notation

## Learning objectives

- State and apply the chain rule for composite functions
- Differentiate nested composite functions with multiple layers
- Use the chain rule to find derivatives of parametric curves
- Apply the chain rule to find derivatives of inverse functions
- Avoid common exam pitfalls when using the chain rule

## What is the Chain Rule?

The chain rule is the core differentiation rule for composite functions of the form $y = f(g(x))$, where $y$ depends on an intermediate function $u = g(x)$ that itself depends on $x$. According to the AP Calculus BC CED, chain rule concepts make up 4-6% of total exam weight, and are embedded in 9-13% of Unit 3 content, appearing on both MCQ and FRQ sections.

Unlike basic derivative rules that only work for elementary functions, the chain rule lets you break complex combined functions into simpler pieces whose derivatives you already know, then multiply those derivatives to get the full derivative. It is the foundation for all remaining differentiation techniques in Unit 3, and is required for related rates, optimization, and integration by substitution later in the course.

> **mnemonic**
>
> A common synonym for the chain rule is the *outside-inside rule*, a mnemonic for the order of differentiation: differentiate the outer function first, then the inner.

## Basic Outside-Inside Chain Rule

**Basic Chain Rule** — If $f$ is differentiable at $u = g(x)$ and $g$ is differentiable at $x$, the derivative is given by: $\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}$, or equivalently $\frac{d}{dx}\left[f(g(x))\right] = f'(g(x)) \cdot g'(x)$

*Notation:* For $y = f(g(x))$, inner $u = g(x)$, outer $y = f(u)$

*Example:* For $y = (3x)^2$, $f(g(x)) = (g(x))^2$, $g(x) = 3x$, derivative is $2(3x)(3) = 18x$

The product form of the rule aligns with how rates of change work: if $y$ changes 3 times as fast as $u$, and $u$ changes 2 times as fast as $x$, then $y$ changes $3 \cdot 2 = 6$ times as fast as $x$, which matches the result from the chain rule.

**Worked example:** Find $\frac{dy}{dx}$ for $y = (2x^3 - 4x + 1)^4$.

1. 1. Identify inner and outer functions: Outer function $y = u^4$, inner function $u = 2x^3 - 4x + 1$.
2. 2. Differentiate the outer function, leaving the inner function unchanged:
3. $$dy/du = 4u^3 = 4(2x^3 - 4x + 1)^3$$
4. 3. Differentiate the inner function with respect to $x$:
5. $$du/dx = 6x^2 - 4$$
6. 4. Multiply the two derivatives per the chain rule:
7. $$dy/dx = 4(2x^3 - 4x + 1)^3 (6x^2 - 4)$$
8. 5. Simplify to standard form:
9. $$dy/dx = 8(3x^2 - 2)(2x^3 - 4x + 1)^3$$

> **Exam tip:** Always mark your inner and outer functions explicitly when you first start a problem, even if you can do it in your head — this prevents forgetting the inner $g'(x)$ factor on exam problems.

## Generalized Chain Rule for Nested Composite Functions

Many AP exam problems have more than two layers of composition (called nested functions), for example $y = f(g(h(x)))$ with three layers. For these functions, extend the chain rule by applying it repeatedly, working from the outermost layer inward.

$$dy/dx = dy/du \cdot du/dv \cdot dv/dx$$

for three layers $y = f(u), u = g(v), v = h(x)$. The pattern extends to any number of nested layers: you will end up with one derivative term per layer, all multiplied together. A common three-layer example on the exam is a trigonometric function of an exponential function of a polynomial.

**Worked example:** Find $\frac{d}{dx}\left[\cos\left(e^{3x^2}\right)\right]$.

1. 1. Identify layers from outside to inside: Outer $y = \cos(u)$, where $u = e^{3x^2}$; middle $u = e^v$, where $v = 3x^2$; inner $v = 3x^2$.
2. 2. Differentiate the outer layer:
3. $$dy/du = -\sin(u) = -\sin\left(e^{3x^2}\right)$$
4. 3. Differentiate the middle layer:
5. $$du/dv = e^v = e^{3x^2}$$
6. 4. Differentiate the inner layer:
7. $$dv/dx = 6x$$
8. 5. Multiply all derivative terms to get the final result:
9. $$dy/dx = -\sin\left(e^{3x^2}\right) \cdot e^{3x^2} \cdot 6x = -6x e^{3x^2} \sin\left(e^{3x^2}\right)$$

> **Exam tip:** When working with nested functions, count your layers before starting — if you have $n$ layers, you should have $n$ terms multiplied in your final derivative. If you have fewer, you missed a differentiation step.

## Chain Rule for Parametric Curves

AP Calculus BC requires finding derivatives of parametric curves defined by $x = x(t)$ and $y = y(t)$, where both coordinates are functions of a parameter $t$. To find $\frac{dy}{dx}$, the slope of the tangent line to the curve, we use the chain rule to rearrange the derivative identity:

$$dy/dt = dy/dx \cdot dx/dt$$

Rearranging gives the first derivative formula, and applying the chain rule again gives the second derivative formula:

$$dy/dx = \frac{dy/dt}{dx/dt}, \quad dx/dt \neq 0$$

$$d^2 y / dx^2 = \frac{\frac{d}{dt}\left(dy/dx\right)}{dx/dt}, \quad dx/dt \neq 0$$

**Worked example:** Given the parametric curve $x(t) = t^2 + 3t$, $y(t) = \cos(4t)$, find $\frac{d^2 y}{dx^2}$ at $t = 0$.

1. 1. Calculate first derivatives with respect to $t$:
2. $$dx/dt = 2t + 3, \quad dy/dt = -4\sin(4t)$$
3. 2. Find the first derivative $\frac{dy}{dx}$:
4. $$dy/dx = \frac{-4\sin(4t)}{2t + 3}$$
5. 3. Differentiate $\frac{dy}{dx}$ with respect to $t$ using the quotient rule:
6. $$\frac{d}{dt}\left(dy/dx\right) = \frac{-16(2t+3)\cos(4t) + 8\sin(4t)}{(2t+3)^2}$$
7. 4. Apply the chain rule for the second derivative by dividing by $\frac{dx}{dt} = 2t+3$:
8. $$d^2 y / dx^2 = \frac{-16(2t+3)\cos(4t) + 8\sin(4t)}{(2t+3)^3}$$
9. 5. Evaluate at $t=0$, using $\sin(0) = 0$ and $\cos(0) = 1$:
10. $$d^2 y / dx^2 = \frac{-16(3)(1) + 0}{3^3} = \frac{-48}{27} = -\frac{16}{9}$$

> **Exam tip:** Never forget to divide by $\frac{dx}{dt}$ when calculating the second derivative of a parametric curve — this is one of the most frequently tested chain rule mistakes on BC MCQs.

*Calculator:* allowed

## Chain Rule for Derivatives of Inverse Functions

The chain rule is used to derive the formula for the derivative of an inverse function. For a one-to-one differentiable function $y = f(x)$ with inverse $f^{-1}(y)$, start with the inverse identity:

$$f\left(f^{-1}(y)\right) = y$$

Differentiate both sides with respect to $y$, apply the chain rule to the left-hand side, then rearrange to get the inverse derivative formula:

$$(f^{-1})'(a) = \frac{1}{f'\left(f^{-1}(a)\right)}$$

This formula lets you find the derivative of an inverse at a point without having to derive the full inverse function explicitly, which is especially useful for functions with complicated inverses like cubics.

**Worked example:** Let $f(x) = x^3 + 3x - 2$, which is one-to-one for all real $x$. Find $\left(f^{-1}\right)'(2)$.

1. 1. First find $f^{-1}(2)$, which is the value of $x$ such that $f(x) = 2$. Testing integer values gives $f(1) = 1^3 + 3(1) - 2 = 2$, so $f^{-1}(2) = 1$.
2. 2. Find the derivative of $f(x)$:
3. $$f'(x) = 3x^2 + 3$$
4. 3. Evaluate $f'$ at $x = f^{-1}(2) = 1$:
5. $$f'(1) = 3(1)^2 + 3 = 6$$
6. 4. Apply the inverse derivative formula:
7. $$(f^{-1})'(2) = \frac{1}{f'(f^{-1}(2))} = \frac{1}{6}$$

> **Exam tip:** When asked for the derivative of an inverse at a point, always solve for the input of the inverse first (the $x$ that gives the target $y$) before calculating the derivative — never waste time trying to find the full inverse function.

## AP-Style Concept Check

**Check your understanding**

Test your understanding with this AP-style multiple choice question:

1. What is the derivative of $y = \tan\left(\sqrt{x^2 - 9}\right)$?

   - A) $\sec^2\left(\frac{x}{\sqrt{x^2-9}}\right)$
   - B) $\frac{x \sec^2\left(\sqrt{x^2 - 9}\right)}{\sqrt{x^2 - 9}}$
   - C) $\frac{\sec^2\left(\sqrt{x^2 - 9}\right)}{\sqrt{x^2 - 9}}$
   - D) $2x \sec^2\left(\sqrt{x^2 - 9}\right)$

   *Answer:* B) $\frac{x \sec^2\left(\sqrt{x^2 - 9}\right)}{\sqrt{x^2 - 9}}$

   *Why:* Correct! You correctly identified 3 layers of composition, multiplied all derivatives, and canceled the common factor of 2. Wrong answers miss one layer of differentiation or misapply the power rule to the square root.

## Common pitfalls

- **Wrong:** For $y = (x^2 + 3)^4$, calculating $y' = 4(x^2 + 3)^3$ and stopping, omitting the $2x$ inner derivative factor.
  - Why it fails: Students get comfortable differentiating the outer function and forget to multiply by the inner derivative, especially when doing mental math for simple problems.
  - Correct: After differentiating the outer function, explicitly ask 'what is the derivative of the inner function?' and write that factor down before moving on.
- **Wrong:** For the second derivative of a parametric curve, calculating $\frac{d}{dt}\left(\frac{dy}{dx}\right)$ and stopping, without dividing by $\frac{dx}{dt}$.
  - Why it fails: Students confuse differentiation with respect to $t$ vs $x$, and forget the extra chain rule division step.
  - Correct: Every time you differentiate a function of $t$ with respect to $x$, divide the derivative with respect to $t$ by $\frac{dx}{dt}$ before moving on.
- **Wrong:** For $y = x^2 e^{x^3}$, after applying the product rule getting $y' = 2x e^{x^3} + x^2 e^{x^3}$, omitting the $3x^2$ inner derivative for the exponential term.
  - Why it fails: Students remember product/quotient rule but forget that individual terms are often composite functions that need the chain rule.
  - Correct: After applying product/quotient rule, check each term individually to see if any factor needs the chain rule.
- **Wrong:** For $y = \sin^2(4x)$, writing the derivative as $y' = 2\cos(4x) \cdot 4 = 8\cos(4x)$.
  - Why it fails: Students misidentify layers, skipping the outer power layer.
  - Correct: Rewrite $\sin^n(u)$ as $(\sin(u))^n$ before differentiating, to make all layers explicit.
- **Wrong:** When finding $(f^{-1})'(a)$, calculating $\frac{1}{f'(a)}$ instead of $\frac{1}{f'(f^{-1}(a))}$.
  - Why it fails: Students mix up the input for the derivative of the original function.
  - Correct: Always first solve $f(x) = a$ to get $x = f^{-1}(a)$, then plug that $x$ into $f'$, not $a$.

## Cheatsheet

| Category | Formula | Notes |
| --- | --- | --- |
| Basic Chain Rule (single composite) | $\frac{d}{dx}[f(g(x))] = f'(g(x))g'(x) = \frac{dy}{du}\frac{du}{dx}$ | Applies when $f$ differentiable at $g(x)$, $g$ differentiable at $x$ |
| Generalized Chain Rule (nested composites) | $\frac{dy}{dx} = \frac{dy}{du_1} \frac{du_1}{du_2} ... \frac{du_n}{dx}$ | Differentiate outside to inside; one derivative term per layer |
| Power Chain Rule | $\frac{d}{dx}[u^n] = n u^{n-1} u'$ | Most common form for polynomial composites; never forget $u'$ |
| Exponential Chain Rule | $\frac{d}{dx}[e^u] = e^u u'$ | Works for any differentiable $u$; derivative of $e^u$ is itself times $u'$ |
| Parametric First Derivative | $\frac{dy}{dx} = \frac{dy/dt}{dx/dt}, \frac{dx}{dt} \neq 0$ | Gives slope of tangent to parametric curve |
| Parametric Second Derivative | $\frac{d^2 y}{dx^2} = \frac{\frac{d}{dt}\left(\frac{dy}{dx}\right)}{dx/dt}, \frac{dx}{dt} \neq 0$ | Always divide by $dx/dt$; do not just differentiate $dy/dx$ w.r.t $t$ |
| Inverse Function Derivative | $(f^{-1})'(a) = \frac{1}{f'(f^{-1}(a))}$ | First find $f^{-1}(a)$ by solving $f(x)=a$, no full inverse needed |
| Trigonometric Composite | $\frac{d}{dx}[\sin(u)] = \cos(u) u'$, $\frac{d}{dx}[\tan(u)] = \sec^2(u) u'$ | Same pattern as basic trig derivatives, just multiply by $u'$ |

## What's next

Mastering the chain rule is non-negotiable for all remaining content in AP Calculus BC, as it is the foundation for every advanced differentiation and integration technique that comes next. Immediately after this topic, you will apply the chain rule to implicit differentiation, which lets you differentiate functions that are not written explicitly as $y = f(x)$. Without a solid command of the chain rule, you cannot correctly differentiate implicit relations, which are regularly tested on FRQ sections. The chain rule is also required for all related rates problems, the core technique for solving real-world rate change problems, and it is the core idea behind integration by substitution, the first major integration technique you will learn. It also underpins logarithmic differentiation and derivatives of inverse trigonometric functions, coming up later in this unit.

- [Implicit Differentiation](https://www.owlsprep.com/study/ap-calculus-bc-u3-implicit-differentiation/)
- [Integration by Substitution](https://www.owlsprep.com/study/ap-calculus-bc-u6-integration-by-substitution/)
- [Differentiating inverse functions](https://www.owlsprep.com/study/ap-calculus-bc-u3-differentiating-inverse-functions/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ap-calculus-bc-u3-chain-rule/
