AP® Calculus AB & BC · Unit 3

How Does the Chain Rule Work in AP Calculus?

The chain rule differentiates a composite function f(g(x))f(g(x)) by multiplying the derivative of the outer function (evaluated at the inner function) by the derivative of the inner function: ddxf(g(x))=f′(g(x))⋅g′(x)\dfrac{d}{dx}f(g(x)) = f'(g(x))\cdot g'(x). Use it whenever one function is "inside" another, and never forget the extra factor from differentiating the inner piece.

The chain rule

ddx[f(g(x))]=f′(g(x))⋅g′(x)\frac{d}{dx}\Big[f(g(x))\Big] = f'(g(x))\cdot g'(x)

Step-by-Step Method

  1. Identify the outer function and the inner function — the inner function is whatever is being plugged into the outer one.
  2. Differentiate the outer function, leaving the inner function unchanged inside it.
  3. Multiply by the derivative of the inner function.
  4. If the inner function is itself a composition (three or more layers), apply the chain rule again to differentiate it.
  5. Simplify the result algebraically when possible — some chain-rule derivatives simplify dramatically, as in the second example here.

Worked Examples

Foundational — a power of a composite functionFind dydx\dfrac{dy}{dx} for y=(x2+1)5y=(x^2+1)^5, and evaluate it at x=1x=1.
  1. Outer function: ( ⋅ )5(\,\cdot\,)^5. Inner function: x2+1x^2+1. By the chain rule: dydx=5(x2+1)4⋅2x=10x(x2+1)4\dfrac{dy}{dx} = 5(x^2+1)^4 \cdot 2x = 10x(x^2+1)^4.
  2. At x=1x=1: 10(1)(1+1)4=10(16)=16010(1)(1+1)^4 = 10(16) = 160.
  3. Check against a numerical derivative: evaluating (x2+1)5(x^2+1)^5 at values just above and below x=1x=1 and estimating the slope numerically gives 160160 as well — confirming the symbolic result.
Harder — a composite that simplifies, checked before simplifyingFind dydx\dfrac{dy}{dx} for y=ln⁡(sec⁡x+tan⁡x)y=\ln(\sec x+\tan x).
  1. Let u=sec⁡x+tan⁡xu=\sec x+\tan x. By the chain rule, dydx=u′u=sec⁡xtan⁡x+sec⁡2xsec⁡x+tan⁡x\dfrac{dy}{dx}=\dfrac{u'}{u} = \dfrac{\sec x\tan x+\sec^2 x}{\sec x+\tan x}.
  2. Factor the numerator: sec⁡xtan⁡x+sec⁡2x=sec⁡x(tan⁡x+sec⁡x)\sec x\tan x+\sec^2 x = \sec x(\tan x+\sec x), which exactly matches the denominator and cancels: dydx=sec⁡x\dfrac{dy}{dx} = \sec x.
  3. Check before trusting the simplification: evaluating the UNSIMPLIFIED expression sec⁡xtan⁡x+sec⁡2xsec⁡x+tan⁡x\dfrac{\sec x\tan x+\sec^2 x}{\sec x+\tan x} numerically at x=0.5x=0.5 gives the same value as sec⁡(0.5)\sec(0.5) directly — confirming the algebra, not just the chain rule step.

Common Mistakes on the AP Exam

How This Appears on the AP Exam

Try a timed AP-style question on this topic — free.

Start Free

Frequently Asked Questions

What is the chain rule formula?

For a composite function f(g(x))f(g(x)), the chain rule says ddxf(g(x))=f′(g(x))⋅g′(x)\dfrac{d}{dx}f(g(x)) = f'(g(x))\cdot g'(x) — the outer function’s derivative, evaluated at the inner function, multiplied by the inner function’s derivative.

How do you know when to use the chain rule?

Whenever one function is "plugged into" another — for example sin⁡(x2)\sin(x^2), e3xe^{3x}, or (x+1)7(x+1)^7 — rather than the variable appearing on its own. If you can identify an "inside" expression, the chain rule applies.

What do you do with a composition of three or more functions?

Apply the chain rule repeatedly, working from the outside in — differentiate the outermost function, multiply by the derivative of what’s inside it, and if that inside piece is itself a composition, apply the chain rule to it too.

How is the chain rule written in Leibniz notation?

If yy is a function of uu, and uu is a function of xx, then dydx=dydu⋅dudx\dfrac{dy}{dx} = \dfrac{dy}{du}\cdot\dfrac{du}{dx} — the same idea as f′(g(x))⋅g′(x)f'(g(x))\cdot g'(x), written with intermediate variables.

What's a common mistake with the chain rule?

Forgetting to multiply by the derivative of the inner function — writing just f′(g(x))f'(g(x)) and stopping there, instead of also multiplying by g′(x)g'(x).

Related Topics

Keep going with timed tests & full mocks, study materials for every unit, DME Nova — your AI tutorthat won't make up an answer, and FRQ feedback scored against an exam-style rubric.

Start Free

Written by the DME AP Calculus team — 20+ years of AP & STEM teaching.

Last updated: 2026-10-08

AP® is a registered trademark of the College Board, which is not affiliated with, and does not endorse, this site.