AP-CALCBC-3.1

U3.1 The Chain Rule

Master the chain rule for AP Calculus BC: differentiate composite and nested functions using d/dx[f(g(x))]=f'(g(x))·g'(x) with worked examples.

What you'll do in this lesson

A voice-first session with the Crimsora tutor on U3.1 The Chain Rule, then targeted practice and FRQs — with the tutor adapting to where you get stuck.

What this lesson covers

Almost every derivative you meet after this lesson hides a composition inside it. The chain rule is the tool that unlocks them all — it tells you how to differentiate a function that is built by plugging one function into another, like sin(x2)\sin(x^2) or 3x+1\sqrt{3x+1}.

In this lesson you will learn to spot a composite function, identify its outer and inner layers, and apply the rule systematically — even when compositions are nested three layers deep. Getting fluent here is essential because Unit 3 topics like implicit differentiation and inverse-function derivatives all lean on the chain rule.

What the Chain Rule Says

A composite function has the form f(g(x))f(g(x)): you apply gg first, then feed the result into ff. The chain rule statesddx[f(g(x))]=f(g(x))g(x).\frac{d}{dx}\left[f(g(x))\right] = f'(g(x))\cdot g'(x).In words: differentiate the outer function while leaving the inner function untouched, then multiply by the derivative of the inner function. The phrase students memorize is 'derivative of the outside, keep the inside, times the derivative of the inside.'

An equivalent Leibniz form is often clearer. If y=f(u)y=f(u) and u=g(x)u=g(x), thendydx=dydududx.\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}.The intuition: if uu changes dudx\frac{du}{dx} times as fast as xx, and yy changes dydu\frac{dy}{du} times as fast as uu, then yy changes at the product rate with respect to xx. The two dudu factors appear to 'cancel,' which is a useful memory aid even though derivatives are not literally fractions.

The hardest part is not the formula but correctly separating the layers. Once you name the outer and inner functions precisely, the mechanical steps follow every time.

Identifying Outer and Inner Functions

Before differentiating, ask: 'What is the last operation I would perform to evaluate this at a number?' That last operation is the outer function; everything inside it is the inner function.
CompositeOuter ffInner ggDerivative
(3x+1)5(3x+1)^5u5u^53x+13x+15(3x+1)435(3x+1)^4\cdot 3
sin(x2)\sin(x^2)sinu\sin ux2x^2cos(x2)2x\cos(x^2)\cdot 2x
e4xe^{4x}eue^u4x4xe4x4e^{4x}\cdot 4
cosx\sqrt{\cos x}u\sqrt{u}cosx\cos x12cosx(sinx)\frac{1}{2\sqrt{\cos x}}\cdot(-\sin x)
Notice the outer derivative always keeps the original inner expression plugged in — you never replace the inside with xx. A very common error is writing cos(2x)\cos(2x) for the derivative of sin(x2)\sin(x^2); the correct inside stays x2x^2, giving cos(x2)2x\cos(x^2)\cdot 2x.

Know your basic derivatives cold, because the outer step relies on them: powers, sin\sin, cos\cos, tan\tan, exe^x, lnx\ln x, and inverse trig. If you cannot instantly write the derivative of the outer template, the chain rule cannot help you.

Nested Compositions and Combining Rules

When a function has three or more layers, apply the chain rule repeatedly, working from the outermost layer inward and multiplying every derivative you generate. For sin ⁣((3x+1)4)\sin\!\left((3x+1)^4\right):ddx=cos ⁣((3x+1)4)4(3x+1)33.\frac{d}{dx}=\cos\!\left((3x+1)^4\right)\cdot 4(3x+1)^3\cdot 3.Each factor is the derivative of one layer with everything inside it preserved. A clean method is to write the layers as y=sinuy=\sin u, u=v4u=v^4, v=3x+1v=3x+1, then chain dydx=dydududvdvdx\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dv}\cdot\frac{dv}{dx}.

The chain rule also combines with the product and quotient rules. For x2sin(3x)x^2\sin(3x), use the product rule first, and apply the chain rule when you differentiate sin(3x)\sin(3x):ddx[x2sin(3x)]=2xsin(3x)+x2cos(3x)3.\frac{d}{dx}\left[x^2\sin(3x)\right]=2x\sin(3x)+x^2\cdot\cos(3x)\cdot 3.On the AP exam, chain-rule questions appear in multiple-choice as direct derivatives and in free-response as pieces of larger problems — related rates, tangent lines, and evaluating dydx\frac{dy}{dx} at a point from a table of values. Table problems test whether you can read f(g(a))g(a)f'(g(a))\cdot g'(a) from given data rather than from a formula, so practice that skill explicitly.

Common Mistakes and Exam Traps

The most frequent error is forgetting the inner derivative entirely — writing ddx[(3x+1)5]=5(3x+1)4\frac{d}{dx}[(3x+1)^5]=5(3x+1)^4 and dropping the ×3\times 3. Always ask whether the inside was just xx; if not, you owe a factor.

A second trap is replacing the inner function with xx in the outer derivative. Keep the inside intact: the derivative of ex2e^{x^2} is ex22xe^{x^2}\cdot 2x, never e2x2xe^{2x}\cdot 2x.

A third issue arises with table-based questions. Suppose h(x)=f(g(x))h(x)=f(g(x)) and you want h(2)h'(2). You need f(g(2))g(2)f'(g(2))\cdot g'(2) — evaluate gg at 2 first, then evaluate ff' at that output, not f(2)f'(2). Confusing f(g(2))f'(g(2)) with f(2)f'(2) costs points.

Finally, watch composite functions disguised as products or quotients. Rewriting can simplify: 1(2x+1)3=(2x+1)3\frac{1}{(2x+1)^3}=(2x+1)^{-3} turns a quotient into a clean power-plus-chain problem, giving 3(2x+1)42-3(2x+1)^{-4}\cdot 2. Choosing the cleaner form reduces algebra errors, which matters on the no-calculator section where a small slip can propagate through an entire free-response part.

Key terms

Composite function.
A function formed by applying one function to the output of another, written f(g(x))f(g(x)) or (fg)(x)(f\circ g)(x); gg is applied first.
Outer function.
The function applied last when evaluating a composite; its derivative is taken with the inner expression left unchanged.
Inner function.
The function applied first, sitting inside the outer function; the chain rule requires multiplying by its derivative.
Chain rule.
The rule ddx[f(g(x))]=f(g(x))g(x)\frac{d}{dx}[f(g(x))]=f'(g(x))\cdot g'(x) for differentiating composite functions.
Leibniz notation.
Writing derivatives as dydx\frac{dy}{dx}; the chain rule appears as dydx=dydududx\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}.
Nested composition.
A composite with three or more layers, such as f(g(h(x)))f(g(h(x))), requiring repeated application of the chain rule.

Worked example

Find dydx\frac{dy}{dx} for y=(cos(2x))3y=\left(\cos(2x)\right)^3 and evaluate it at x=0x=0.
Identify the layers. The outermost operation is 'cube something,' so the outer function is u3u^3 with u=cos(2x)u=\cos(2x). But cos(2x)\cos(2x) is itself a composite: cosv\cos v with v=2xv=2x. So this is a three-layer nested composition.

Write the chain step by step. Differentiate the outer cube: ddu[u3]=3u2\frac{d}{du}[u^3]=3u^2, giving 3(cos(2x))23(\cos(2x))^2 with the inside preserved.

Multiply by the derivative of cos(2x)\cos(2x). That derivative is sin(2x)-\sin(2x) times the derivative of the inner 2x2x, which is 22. So the middle-plus-inner factor is sin(2x)2=2sin(2x)-\sin(2x)\cdot 2=-2\sin(2x).

Combine everything:dydx=3(cos(2x))2(2sin(2x))=6cos2(2x)sin(2x).\frac{dy}{dx}=3(\cos(2x))^2\cdot(-2\sin(2x))=-6\cos^2(2x)\sin(2x).Evaluate at x=0x=0. Here cos(0)=1\cos(0)=1 and sin(0)=0\sin(0)=0, sodydxx=0=6(1)2(0)=0.\frac{dy}{dx}\Big|_{x=0}=-6(1)^2(0)=0.The slope of the curve at x=0x=0 is 00.

Practice questions

If h(x)=5x2+4h(x)=\sqrt{5x^2+4}, what is h(x)h'(x)?
  1. 5x5x2+4\frac{5x}{\sqrt{5x^2+4}}
  2. 125x2+4\frac{1}{2\sqrt{5x^2+4}}
  3. 10x5x2+4\frac{10x}{\sqrt{5x^2+4}}
  4. 5x2+425x2+4\frac{5x^2+4}{2\sqrt{5x^2+4}}

Answer: 5x5x2+4\frac{5x}{\sqrt{5x^2+4}}

Write h(x)=(5x2+4)1/2h(x)=(5x^2+4)^{1/2}. The outer power gives 12(5x2+4)1/2\frac{1}{2}(5x^2+4)^{-1/2}, keeping the inside intact. Multiply by the inner derivative 10x10x: 12(5x2+4)1/210x=10x25x2+4=5x5x2+4\frac{1}{2}(5x^2+4)^{-1/2}\cdot 10x=\frac{10x}{2\sqrt{5x^2+4}}=\frac{5x}{\sqrt{5x^2+4}}. Choice C forgets to divide by 2; choice B forgets the inner derivative.
The functions ff and gg are differentiable with the values below. Let h(x)=f(g(x))h(x)=f(g(x)). Find h(1)h'(1).
xxf(x)f(x)f(x)f'(x)g(x)g(x)g(x)g'(x)
11442-23355
336677221-1

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

By the chain rule, h(1)=f(g(1))g(1)h'(1)=f'(g(1))\cdot g'(1). From the table g(1)=3g(1)=3, so we need f(3)=7f'(3)=7, and g(1)=5g'(1)=5. Thus h(1)=75=35h'(1)=7\cdot 5=35. The key is evaluating ff' at g(1)=3g(1)=3, not at 11 — using f(1)=2f'(1)=-2 would be the classic mistake.
Differentiate y=esin(3x)y=e^{\sin(3x)}.

Answer: y=3cos(3x)esin(3x)y'=3\cos(3x)\,e^{\sin(3x)}

This has three layers: the exponential outer eue^u, the middle sinv\sin v, and the inner 3x3x. The derivative of eue^u is esin(3x)e^{\sin(3x)} with the inside kept. Multiply by the derivative of sin(3x)\sin(3x), which is cos(3x)\cos(3x) times the derivative of 3x3x, namely 33. Combining gives esin(3x)cos(3x)3=3cos(3x)esin(3x)e^{\sin(3x)}\cdot\cos(3x)\cdot 3=3\cos(3x)\,e^{\sin(3x)}.

FAQ

How do I know when to use the chain rule?
Use it whenever a function is a composition — one function plugged inside another, like sin(x2)\sin(x^2), (2x+1)7(2x+1)^7, or e3xe^{3x}. A quick test: ask what operation you would perform last to evaluate the expression at a number. If that last operation acts on a whole expression rather than just xx, you have a composite and need the chain rule.
What is the difference between the chain rule and the product rule?
The product rule differentiates a product of two functions multiplied together, like x2sinxx^2\sin x. The chain rule differentiates a composition, where one function is nested inside another, like sin(x2)\sin(x^2). Look at the structure: multiplication means product rule, substitution-inside means chain rule. Many problems require both — apply the product rule first, then use the chain rule on any composite factor.
Why do I keep forgetting to multiply by the inner derivative?
It usually happens because you differentiate the outer template on autopilot. Build a habit: after writing the outer derivative, immediately ask 'was the inside just xx?' If the inside is anything more complex, you must multiply by its derivative. Writing the inner function as uu and tracking dudx\frac{du}{dx} separately makes the missing factor obvious.
Can I use the chain rule on a table of values instead of a formula?
Yes, and the AP exam frequently tests this. If h(x)=f(g(x))h(x)=f(g(x)), then h(a)=f(g(a))g(a)h'(a)=f'(g(a))\cdot g'(a). You read g(a)g(a) from the table, then look up ff' at that output value, and multiply by g(a)g'(a). No formula is needed — just careful reading and the correct order of evaluation.

Learn this with a teacher, not a page

The Crimsora tutor teaches U3.1 The Chain Rule live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.