AP Calculus AB and BC · Unit 3 · Topic 3.1

    3.1 The Chain Rule

    Reviewed by P V Satish, Senior Faculty of Science and Academic Consultant · PG Life Sciences, PGD Biotechnology · 20+ years teaching NEET and AP · Special interest in biotechnology, biochemistry and the basics of physics
    Updated

    In short

    To differentiate a composite function f(g(x))f(g(x)), differentiate the outside function, keeping the inside unchanged, then multiply by the derivative of the inside: ddxf(g(x))=f′(g(x)) g′(x)\frac{d}{dx} f(g(x)) = f'(g(x))\,g'(x). In Leibniz form, if y=f(u)y = f(u) and u=g(x)u = g(x), then dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}. Rates multiply along the chain.

    What you need to know

    • Identify the inside and outside functions of a composite.
    • Apply the chain rule with power, exponential, logarithmic and trigonometric outer functions.
    • Use the chain rule more than once for nested compositions.
    • Apply the chain rule with values from tables.

    Outside, then inside

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

    Take y=(3x2+1)5y = (3x^2 + 1)^5. The outside function is u5u^5 and the inside is u=3x2+1u = 3x^2 + 1. Differentiate the outside as if the inside were a single variable, giving 5(3x2+1)45(3x^2 + 1)^4, then multiply by the inside's derivative, 6x6x: y′=30x(3x2+1)4y' = 30x(3x^2 + 1)^4. Expanding (3x2+1)5(3x^2 + 1)^5 first would work but take far longer.

    Why multiply? In Leibniz notation, dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}. If uu changes 6 times as fast as xx, and yy changes 5 times as fast as uu, then yy changes 30 times as fast as xx. Rates of change multiply along a chain of dependence, like gears turning gears.

    The Leibniz form is how the chain rule appears in context. A balloon's volume is V=43πr3V = \frac{4}{3}\pi r^3, and its radius is growing with time. Then dVdt=dVdr⋅drdt=4πr2drdt\frac{dV}{dt} = \frac{dV}{dr}\cdot\frac{dr}{dt} = 4\pi r^2 \frac{dr}{dt}. If r=10r = 10 cm and the radius grows at 0.5 cm per second, the volume grows at 4π(100)(0.5)=200π≈6284\pi(100)(0.5) = 200\pi \approx 628 cubic centimetres per second. This is the engine of related rates in Unit 4.

    Common patterns

    The chain rule with standard outer functions
    FunctionDerivative
    [g(x)]n[g(x)]^nn[g(x)]n−1g′(x)n[g(x)]^{n-1} g'(x)
    eg(x)e^{g(x)}eg(x)g′(x)e^{g(x)} g'(x)
    ln⁡g(x)\ln g(x)g′(x)g(x)\frac{g'(x)}{g(x)}
    sin⁡g(x)\sin g(x)cos⁡g(x)⋅g′(x)\cos g(x) \cdot g'(x)
    cos⁡g(x)\cos g(x)−sin⁡g(x)⋅g′(x)-\sin g(x) \cdot g'(x)

    Examples: ddxsin⁡4x=4cos⁡4x\frac{d}{dx}\sin 4x = 4\cos 4x; ddxex2=2xex2\frac{d}{dx}e^{x^2} = 2xe^{x^2}, which is 2e2e at x=1x = 1; ddxln⁡(x2+1)=2xx2+1\frac{d}{dx}\ln(x^2 + 1) = \frac{2x}{x^2 + 1}, which is 1 at x=1x = 1; ddx1+x3=3x221+x3\frac{d}{dx}\sqrt{1 + x^3} = \frac{3x^2}{2\sqrt{1 + x^3}}.

    The chain rule also explains exponentials with other bases. Since ax=exln⁡aa^x = e^{x\ln a}, its derivative is exln⁡a⋅ln⁡a=axln⁡ae^{x\ln a}\cdot\ln a = a^x\ln a. So ddx2x=2xln⁡2\frac{d}{dx}2^x = 2^x\ln 2, not x⋅2x−1x\cdot 2^{x-1}.

    Several layers and tables

    For nested compositions, peel layers from the outside in, multiplying a derivative for each layer. sin⁡2(3x)\sin^2(3x) means [sin⁡(3x)]2[\sin(3x)]^2: the outer square gives 2sin⁡(3x)2\sin(3x), the sine gives cos⁡(3x)\cos(3x), and the innermost 3x3x gives 3. So the derivative is 6sin⁡(3x)cos⁡(3x)6\sin(3x)\cos(3x).

    With tables, evaluate the inside first. If h(x)=f(g(x))h(x) = f(g(x)), g(1)=3g(1) = 3, g′(1)=2g'(1) = 2 and f′(3)=−4f'(3) = -4, then h′(1)=f′(g(1))⋅g′(1)=f′(3)⋅2=−8h'(1) = f'(g(1))\cdot g'(1) = f'(3)\cdot 2 = -8. Note that f′f' is evaluated at g(1)=3g(1) = 3, not at 1: this is the step most often missed on table questions.

    Key terms

    Composite function
    A function of a function, f(g(x))f(g(x)).
    Chain rule
    ddxf(g(x))=f′(g(x))g′(x)\frac{d}{dx} f(g(x)) = f'(g(x))g'(x).
    Inside function
    The inner function g(x)g(x), whose derivative is the final factor.
    Leibniz chain rule
    dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}.

    Common mistakes

    • Forgetting to multiply by the inside derivative.

      ddxsin⁡4x=4cos⁡4x\frac{d}{dx}\sin 4x = 4\cos 4x, not cos⁡4x\cos 4x.

    • Evaluating f′f' at xx instead of g(x)g(x).

      Use f′(g(a))⋅g′(a)f'(g(a))\cdot g'(a).

    • Changing the inside while differentiating the outside.

      Keep the inside exactly as it is: ddx(3x2+1)5\frac{d}{dx}(3x^2+1)^5 starts with 5(3x2+1)45(3x^2+1)^4.

    How this topic is tested

    • Name the inside function before differentiating.
    • For table questions, write f′(g(a))·g′(a) and substitute g(a) first.
    • Use the chain rule rather than expanding high powers.

    Practice questions

    Original AP-style multiple-choice questions. Pick an answer to see the explanation.

    1. Question 1 · MP 1 · Implementing Mathematical Processes

      What is ddx(3x2+1)5\frac{d}{dx}(3x^2 + 1)^5?

    2. Question 2 · MP 1 · Implementing Mathematical Processes

      For y=ex2y = e^{x^2}, what is y′(1)y'(1)?

    3. Question 3 · MP 2 · Connecting Representations

      h(x)=f(g(x))h(x) = f(g(x)) with g(1)=3g(1) = 3, g′(1)=2g'(1) = 2, f′(1)=5f'(1) = 5 and f′(3)=−4f'(3) = -4. What is h′(1)h'(1)?

    4. Question 4 · MP 1 · Implementing Mathematical Processes

      What is the derivative of ln⁡(x2+1)\ln(x^2 + 1) at x=1x = 1?

    5. Question 5 · MP 3 · Justification

      What is ddx2x\frac{d}{dx}2^x?

    Free-response practice

    Write your answer first, then mark it against the scoring guide.

    Free response (no calculator) · 5 points

    The functions ff and gg are differentiable with g(2)=−1g(2) = -1, g′(2)=3g'(2) = 3, f(−1)=4f(-1) = 4 and f′(−1)=5f'(-1) = 5. Let h(x)=f(g(x))h(x) = f(g(x)) and k(x)=[g(x)]3k(x) = [g(x)]^3.

    1. (a) Find h′(2)h'(2).
    2. (b) Find k′(2)k'(2).
    3. (c) Write an equation of the tangent line to the graph of hh at x=2x = 2.

    Connected topics

    Frequently asked questions

    How do I know when to use the chain rule?

    Whenever something other than plain x sits inside a function: a power of an expression, sin(3x), e to anything other than x, ln of an expression.

    Is the product rule ever needed with the chain rule?

    Often. x²e^{3x} needs the product rule, and the e^{3x} factor needs the chain rule inside it (topic 3.5).

    Why does Leibniz notation look like fractions cancelling?

    The du's appear to cancel, which is a useful memory aid, though it is not literally fraction arithmetic.

    How this shows up on the exam42 multiple-choice and 6 free-response questions, with and without a calculator. See how the exam is laid out.

    Free Unit 3 cheat sheet

    Every topic in Unit 3: Differentiation: Composite, Implicit, and Inverse Functions on a few printable pages: the core idea, key terms, the two traps students fall into and what the exam asks.

    We'll use your email to tell you when new AP Calculus AB practice material is ready. No spam, and we'll delete it if you ask.

    Full-length AP Calculus AB practice examsUnit 3 is one of 8 units on the exam. Two timed exams in the 2027 format (42 MCQ + 6 FRQ, with calculator and no-calculator parts), worked explanations, scoring guides and an estimated 1–5 score. $14.99 · try 5 questions free.

    All topics in Unit 3: Differentiation: Composite, Implicit, and Inverse Functions

    1. 3.1 The Chain Rule
    2. 3.2 Implicit Differentiation
    3. 3.3 Differentiating Inverse Functions
    4. 3.4 Differentiating Inverse Trigonometric Functions
    5. 3.5 Selecting Procedures for Calculating Derivatives
    6. 3.6 Calculating Higher-Order Derivatives

    Other units in AP Calculus AB

    AP® is a trademark registered by College Board, which is not affiliated with, and does not endorse, this website.