AP Calculus AB Unit 3: Chain Rule + Choosing the Right Differentiation Procedure

The Chain Rule

What a composite function is (and why derivatives get tricky)

A composite function is a function built by plugging one function into another. If you start with an “inner” function %%LATEX0%% and then apply an “outer” function %%LATEX1%% to it, you get the composite

h(x)=f(g(x))

In previous sections, you learned how to differentiate simpler, “single-layer” functions such as %%LATEX3%%, %%LATEX4%%, and %%LATEX5%%. However, most realistic expressions and models rely on nested layers: polynomials inside powers, expressions inside trig functions, and complicated formulas inside exponentials or logarithms. The challenge is that rules like the power rule are designed for forms like %%LATEX6%%, not for expressions like %%LATEX7%% where the base is not just %%LATEX8%%.

The key idea is that when %%LATEX9%% changes a little, the inside %%LATEX10%% changes, and that change then affects the outside f. The derivative must account for both layers of change.

Composite Function Diagram

What the Chain Rule says (conceptually)

The Chain Rule is the differentiation rule for composites: the instantaneous rate of change of a composite is the product of (1) how fast the outside changes with respect to the inside and (2) how fast the inside changes with respect to x.

Two helpful mental models:

  • Factory conveyor belt: %%LATEX13%% influences an intermediate quantity %%LATEX14%%, and %%LATEX15%% influences the final output %%LATEX16%%. To find how fast %%LATEX17%% changes as %%LATEX18%% changes, multiply the “conversion rate” from %%LATEX19%% to %%LATEX20%% by the “conversion rate” from %%LATEX21%% to %%LATEX22%%.
  • Units / dimensional analysis: if %%LATEX23%% is measured in meters, %%LATEX24%% in degrees, and x in seconds, then the structure

\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}

mirrors the idea that

\frac{\text{meters}}{\text{seconds}}=\frac{\text{meters}}{\text{degrees}}\cdot\frac{\text{degrees}}{\text{seconds}}

which strongly supports why the rates must multiply.

The Chain Rule formula and notation

AP problems switch notation frequently, so you should be fluent in both.

Function notation (Lagrange)

If

h(x)=f(g(x))

then

h'(x)=f'(g(x))\cdot g'(x)

Read this as: differentiate the outer function, keep the inner expression the same, then multiply by the derivative of the inner function.

Leibniz notation (excellent for understanding “why multiply”)

Let

y=f(u)

and

u=g(x)

Then

\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}

Even though these are operators (not literal fractions), this notation makes the chaining logic visible and is often remembered as “the du cancels.”

Notation reference (you must be fluent in all of these)

MeaningCommon notationNotes
Derivative of %%LATEX34%% with respect to %%LATEX35%%\frac{dy}{dx}Emphasizes rate of change
Derivative of ff'(x)Most common in AP problems
Derivative of yy'Used when %%LATEX41%% is clearly a function of %%LATEX42%%
Second derivative%%LATEX43%% or %%LATEX44%%Chain rule can appear inside higher derivatives too

Decomposition: identifying inner and outer functions

Success with the Chain Rule depends on correctly identifying the layers of the function. This process is often called decomposition.

Function yOuter function f(u)Inner function u=g(x)Note
\left(3x^2+1\right)^5u^53x^2+1Power function wrapping a polynomial
\sin(4x)\sin(u)4xTrig function wrapping a linear term
e^{\cos(x)}e^u\cos(x)Exponential wrapping a trig function
\tan^2(x)u^2\tan(x)Crucial: rewrite as \left(\tan x\right)^2
The “onion” analogy

Think of a composite function like an onion. To find the derivative, you peel one layer at a time, moving from the outside in.

  1. Differentiate the outer layer, leaving the inner core untouched.
  2. Multiply by the derivative of the next layer inside.
  3. Repeat until you reach x.

How to apply the Chain Rule (a reliable process)

When you see a composite, slow down and name the layers.

  1. Identify the outer operation. Ask: “What is the last thing being done?” (raising to a power, taking sine, taking a logarithm, etc.)
  2. Identify the inner expression. Ask: “What input is being fed into the outer operation?”
  3. Differentiate the outer function as if the inside were a single variable.
  4. Multiply by the derivative of the inner expression. If that inner expression is itself composite, repeat the process.

A common mistake is doing step 3 and stopping, which produces something that looks reasonable but is missing a crucial factor.

Worked examples (single-layer Chain Rule)

Example 1: Power of a polynomial

Differentiate

y=\left(3x^2+1\right)^5

Outer: %%LATEX63%%. Inner: %%LATEX64%%.

\frac{dy}{du}=5u^4

\frac{du}{dx}=6x

\frac{dy}{dx}=5\left(3x^2+1\right)^4\cdot 6x

You can simplify if you want:

\frac{dy}{dx}=30x\left(3x^2+1\right)^4

What goes wrong: students often write 5\left(3x^2+1\right)^4 and stop, forgetting the inner derivative factor.

Example 2: Trig with an inner function

Differentiate

y=\sin\left(x^2\right)

Outer: %%LATEX71%%, inner: %%LATEX72%%.

\frac{dy}{du}=\cos(u)

\frac{du}{dx}=2x

\frac{dy}{dx}=\cos\left(x^2\right)\cdot 2x

So

\frac{dy}{dx}=2x\cos\left(x^2\right)

What goes wrong: a frequent error is thinking the derivative is %%LATEX77%% or writing %%LATEX78%%, both of which confuse the role of “inside.”

Example 3: The general power rule (rewriting a root)

Find f'(x) for

f(x)=\sqrt{5x^3-2x}

Rewrite the root as a power:

f(x)=\left(5x^3-2x\right)^{1/2}

Apply Chain Rule (outer power, inner polynomial):

f'(x)=\frac{1}{2}\left(5x^3-2x\right)^{-1/2}\cdot\frac{d}{dx}\left(5x^3-2x\right)

f'(x)=\frac{1}{2}\left(5x^3-2x\right)^{-1/2}\cdot\left(15x^2-2\right)

Simplified form:

f'(x)=\frac{15x^2-2}{2\sqrt{5x^3-2x}}

Multi-layer composites (Chain Rule more than once)

Many AP problems include functions nested multiple times, like a power of a trig function of a polynomial. The logic stays the same: each layer contributes a derivative factor.

Example 4: Chain Rule twice

Differentiate

y=\left(\sin\left(2x\right)\right)^3

Layers:

  • Outer: u^3
  • Middle: u=\sin(v)
  • Inner: v=2x

\frac{dy}{du}=3u^2

\frac{du}{dv}=\cos(v)

\frac{dv}{dx}=2

Multiply:

\frac{dy}{dx}=3\left(\sin(2x)\right)^2\cdot\cos(2x)\cdot 2

So

\frac{dy}{dx}=6\left(\sin(2x)\right)^2\cos(2x)

What goes wrong: students often differentiate %%LATEX94%% as %%LATEX95%% but forget the extra factor of 2.

Example 5: Transcendentals (exponential wrapping trig)

Differentiate

y=e^{\sin(x)}

Outer: %%LATEX98%%, inner: %%LATEX99%%.

y'=e^{\sin(x)}\cdot\cos(x)

Example 6: Nested chains (three layers)

Find y' for

y=\cos^3(4x)

Rewrite to show the hierarchy:

y=\left[\cos(4x)\right]^3

Differentiate layer-by-layer (power, then cosine, then inner linear):

y'=3\left[\cos(4x)\right]^2\cdot\left(-\sin(4x)\right)\cdot 4

Cleaned up:

y'=-12\cos^2(4x)\sin(4x)

The Chain Rule in real-world rate problems

The Chain Rule is not just symbolic; it connects rates in a chain of dependencies.

Suppose temperature %%LATEX106%% depends on altitude %%LATEX107%%, and altitude depends on time t during a drone’s flight:

T=T(h)

h=h(t)

So

T=T(h(t))

The Chain Rule gives

\frac{dT}{dt}=\frac{dT}{dh}\cdot\frac{dh}{dt}

Interpretation: %%LATEX113%% is temperature change per unit altitude, %%LATEX114%% is altitude change per unit time, and multiplying gives temperature change per unit time.

Mnemonics (useful, but don’t let them replace understanding)
  • Outside then Inside: differentiate the outside, then multiply by the inside’s derivative; if the inside is itself composite, repeat.
  • SOD: Same Outer, Derivative (of inside).
  • Link the Chain: think of “units canceling” in \frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}.
Common mistakes & pitfalls (Chain Rule-specific)
  1. Stopping at the outer derivative. For

y=(3x+1)^5

writing

y'=5(3x+1)^4

forgets the inner derivative. Correctly,

y'=5(3x+1)^4\cdot 3

which includes the factor that makes 5\cdot 3=15.

  1. Differentiating the inner too early. For

y=\sin(x^2)

writing

y'=\cos(2x)

confuses the rule. The correct structure is

y'=\cos(x^2)\cdot 2x

because the outer derivative must be evaluated at the original inside function, %%LATEX123%%, not %%LATEX124%%.

  1. Notation confusion with trig powers.

\sin^2(x)=\left(\sin x\right)^2

but

\sin(x^2)

is completely different (trig of a polynomial). Mixing these up leads to wrong decomposition.

  1. Forgetting parentheses / unclear grouping. Writing something like

y'=\cos(4x)\cdot 4 + x

can be ambiguous and often signals sloppy grouping. Move constants to the front and keep grouping clear, e.g.

4\cos(4x)

instead of \cos(4x)4.

Exam Focus
  • Typical question patterns
    • Differentiate a given function that clearly contains a composite structure, often mixed with trig, exponentials, or logs.
    • Compute a derivative at a point, such as finding f'(2) for a composite function.
    • Interpret or compute a chained rate such as %%LATEX131%% given %%LATEX132%% and \frac{dh}{dt}.
  • Common mistakes
    • Differentiating the “outside” correctly but forgetting to multiply by the derivative of the inside.
    • Losing parentheses and effectively changing the function (for example treating %%LATEX134%% as %%LATEX135%%).
    • Mixing up layers when there are multiple nestings, leading to missing factors like the derivative of 2x inside a trig function.

Selecting Procedures for Calculating Derivatives

Why “procedure selection” matters

On many AP Calculus AB questions, the hardest part is not the algebraic differentiation itself; it’s deciding which differentiation rules apply and in what order. Functions are often built from combinations of structures:

  • A product of two functions, where each might itself be a composite
  • A quotient where the numerator contains a chain rule situation
  • An expression that looks complicated but becomes simple if rewritten

Problems rarely announce “Use the Chain Rule now!” A major Unit 3 skill is distinguishing between products and compositions, then stacking rules correctly.

Decision Tree for Differentiation

Start with structure, not with rules

A reliable way to choose a derivative procedure is to ask, in order:

  1. Can I simplify or rewrite first? Rewriting can turn a hard-looking problem into an easy one.
  2. What is the overall operation? Is it a sum, product, quotient, or a single outer function applied to something inside?
  3. Which rules are forced by that structure? A product forces product rule (unless you rewrite), a composite forces chain rule, etc.
  4. Will I need multiple rules? Many problems require stacking, such as product rule plus chain rule.

This mindset prevents a common error: seeing something familiar (like a power) and applying the power rule immediately even when the base is not just x.

Strategy table (common structures and what they imply)

Function structureRule requiredWhy?
y=x^2\sin(x)Product RuleTwo functions multiplied: %%LATEX139%% and %%LATEX140%%
y=\sin(x^2)Chain RuleOne function inside another: %%LATEX142%% is inside %%LATEX143%%
y=x\ln(x^2+1)Product + ChainProduct of %%LATEX145%% and %%LATEX146%%; chain needed for \ln(\dots)
y=\frac{\sin(2x)}{x}Quotient + ChainQuotient; chain needed for \sin(2x)

Rewriting to make differentiation easier

Before applying any rule, check whether rewriting reduces complexity.

Rewriting roots and negative powers

Instead of differentiating with radicals, rewrite using rational exponents.

Example: Differentiate

y=\sqrt{5x-2}

Rewrite:

y=\left(5x-2\right)^{1/2}

Differentiate:

\frac{dy}{dx}=\frac{1}{2}\left(5x-2\right)^{-1/2}\cdot 5

So

\frac{dy}{dx}=\frac{5}{2\sqrt{5x-2}}

What goes wrong: students sometimes write %%LATEX154%% and forget the inner derivative factor of %%LATEX155%%.

Rewriting quotients as negative powers (sometimes)

Sometimes a quotient is easier as a product with a negative exponent, which can reduce a quotient rule problem into a faster chain rule problem.

Example:

y=\frac{1}{\left(2x+1\right)^4}

Rewrite:

y=\left(2x+1\right)^{-4}

Differentiate (chain rule):

\frac{dy}{dx}=-4\left(2x+1\right)^{-5}\cdot 2

So

\frac{dy}{dx}=-8\left(2x+1\right)^{-5}

This is typically faster and less error-prone than quotient rule here.

Recognizing when the Chain Rule is the main tool

You should strongly suspect the chain rule when:

  • You see a function “wrapped around” an expression (trig, log, exponential, inverse trig, or a power applied to something more complicated than x).
  • Parentheses indicate an inside expression, especially forms like \left(\text{something}\right)^n.
  • The input of a known function is not just %%LATEX162%%, like %%LATEX163%% or \ln(7-x).

When multiple rules apply: deciding the order

Usually you don’t pick exactly one rule. You identify the outermost structure, apply the rule for that structure, and then inside that derivative you may need another rule.

Example 1: Product rule plus Chain Rule

Differentiate

y=\left(x^2+1\right)^3\cdot\sin(x)

At the top level, this is a product of

A(x)=\left(x^2+1\right)^3

and

B(x)=\sin(x)

Product rule:

y'=A'(x)B(x)+A(x)B'(x)

Now differentiate each part.

For A'(x) (chain rule):

A'(x)=3\left(x^2+1\right)^2\cdot 2x

So

A'(x)=6x\left(x^2+1\right)^2

For B'(x):

B'(x)=\cos(x)

Substitute:

y'=\left(6x\left(x^2+1\right)^2\right)\sin(x)+\left(\left(x^2+1\right)^3\right)\cos(x)

You can factor if desired, but correctness matters more than aggressive simplification.

What goes wrong: a common error is to apply chain rule to only one factor and forget product rule entirely, or to incorrectly assume

\frac{d}{dx}[AB]=A'B'

Example 2: Mixed rule application (Product + Chain)

Differentiate

f(x)=x^2(1-3x)^4

This is primarily a product rule problem, but the derivative of the second factor requires the chain rule.

Let

u=x^2

v=(1-3x)^4

Then

u'=2x

For v' (chain rule):

v'=4(1-3x)^3\cdot(-3)

So

v'=-12(1-3x)^3

Apply product rule:

f'(x)=(2x)(1-3x)^4+(x^2)\left[-12(1-3x)^3\right]

So

f'(x)=2x(1-3x)^4-12x^2(1-3x)^3

Pro Tip (FRQs): you often do not need to simplify the algebra unless the question explicitly asks.

Example 3: Quotient rule plus Chain Rule

Differentiate

y=\frac{\ln(3x)}{\left(x^2+1\right)^2}

This is a quotient with

N(x)=\ln(3x)

D(x)=\left(x^2+1\right)^2

Quotient rule:

y'=\frac{N'(x)D(x)-N(x)D'(x)}{\left(D(x)\right)^2}

Compute each derivative.

For N'(x) (chain rule):

N'(x)=\frac{1}{3x}\cdot 3

So

N'(x)=\frac{1}{x}

For D'(x) (chain rule):

D'(x)=2\left(x^2+1\right)\cdot 2x

So

D'(x)=4x\left(x^2+1\right)

Assemble:

y'=\frac{\left(\frac{1}{x}\right)\left(x^2+1\right)^2-\ln(3x)\cdot 4x\left(x^2+1\right)}{\left(\left(x^2+1\right)^2\right)^2}

This is correct as written. If you simplify, do it carefully; many errors happen during simplification rather than differentiation.

What goes wrong: students often mis-square the denominator in the quotient rule or forget that \ln(3x) needs chain rule.

Chain rule with exponentials and logarithms (common AP targets)

Exponentials and logarithms almost always bring chain rule because their inputs are rarely just x.

Example 4: Exponential with inner function

Differentiate

y=e^{\sqrt{x}}

Outer: %%LATEX199%%, inner: %%LATEX200%%.

\frac{dy}{du}=e^u

\frac{du}{dx}=\frac{1}{2\sqrt{x}}

So

\frac{dy}{dx}=e^{\sqrt{x}}\cdot\frac{1}{2\sqrt{x}}

Therefore

\frac{dy}{dx}=\frac{e^{\sqrt{x}}}{2\sqrt{x}}

Example 5: Logarithm with an inner function and an outer power

Differentiate

y=\left(\ln(5x-2)\right)^3

Layers:

  • Outer: u^3
  • Middle: u=\ln(v)
  • Inner: v=5x-2

\frac{dy}{du}=3u^2

\frac{du}{dv}=\frac{1}{v}

\frac{dv}{dx}=5

Multiply and substitute:

\frac{dy}{dx}=3\left(\ln(5x-2)\right)^2\cdot\frac{1}{5x-2}\cdot 5

So

\frac{dy}{dx}=\frac{15\left(\ln(5x-2)\right)^2}{5x-2}

What goes wrong: it’s easy to forget the derivative of %%LATEX214%% (which is %%LATEX215%%), especially when there are three layers.

A practical “layering” technique: name the inside

When expressions get complicated, explicitly naming inside expressions helps prevent missed factors.

If

y=\cos\left(\left(x^2+1\right)^4\right)

let

u=\left(x^2+1\right)^4

so

y=\cos(u)

and then let

v=x^2+1

so

u=v^4

This forces you to compute each derivative step (including \frac{dv}{dx}), making it much harder to “skip” a layer.

Exam Focus
  • Typical question patterns
    • “Find f'(x)” for an expression that requires combining chain rule with product rule or quotient rule.
    • “Find the derivative and evaluate at x=a,” which tests both correct procedure selection and careful substitution.
    • “Given a graph/table of %%LATEX224%% and a formula %%LATEX225%%, find \frac{d}{dx}[f(g(x))] at a point,” emphasizing chain rule in function notation.
  • Common mistakes
    • Choosing a complicated rule (like quotient rule) when a simple rewrite makes chain rule enough, or rewriting incorrectly and changing the function.
    • Treating composite structure as if it were a product, for example thinking %%LATEX227%% means %%LATEX228%%.
    • Making algebra errors after differentiating correctly, especially with parentheses and exponents in expressions like \left(\left(x^2+1\right)^2\right)^2.