Unit 3 Differentiation Skills: Mastering Composite Functions

The Chain Rule

What a composite function is (and why it changes how you differentiate)

A composite function is a function built by plugging one function into another. If one function gives an output and you immediately feed that output into a second function, you have a composition. In function notation, if y = f(g(x)), then g(x) happens “first” (it produces an intermediate value), and then f acts on that intermediate value.

This matters for derivatives because a derivative measures a rate of change with respect to the input variable (usually x). When you change x, you may not be changing y directly; instead, x changes an “inside” quantity, and that inside quantity changes the outside function. The derivative has to account for both effects.

A useful real-world analogy is temperature conversion: suppose a sensor records temperature in Celsius, but a display shows Fahrenheit. A small change in the sensor reading changes the displayed value, but the size of the effect depends on the conversion rule. If the sensor reading itself is a complicated function of time, then the display’s rate of change in time must combine both relationships. That “combine the relationships” idea is exactly what the chain rule formalizes.

The idea behind the Chain Rule

The Chain Rule is the differentiation rule for composite functions. Conceptually, it says:

  • The outside function changes at some rate with respect to its input.
  • The inside function changes at some rate with respect to x.
  • The overall change is the product of those rates.

To see the structure, introduce an intermediate variable. Let

u = g(x)
y = f(u)

If you want \frac{dy}{dx}, you can think in two stages: first compute how y changes when u changes, then how u changes when x changes. Multiplying those gives the overall sensitivity of y to x.

The Chain Rule formula (multiple equivalent notations)

In its most common AP Calculus AB form:

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

Using the intermediate variable form:

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

These are the same statement; they just emphasize different thinking. The intermediate-variable version is especially helpful when you want to be explicit about “inside” and “outside.”

Notation reference (same meaning, different styles)
MeaningCommon notationAnother common notation
Derivative of y with respect to x\frac{dy}{dx}y'
Derivative of ff'(x)\frac{d}{dx}[f(x)]
Chain rule structure\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}\frac{d}{dx}[f(g(x))] = f'(g(x))g'(x)

A frequent confusion is thinking you can “cancel” symbols carelessly. The intermediate-variable form can look like fractions that cancel, and in many routine cases it behaves that way, but what makes it valid is the chain rule theorem, not algebraic cancellation. Treat it as a reliable structure: outside derivative evaluated at the inside, times inside derivative.

How to apply the Chain Rule (a process that prevents mistakes)

When you differentiate a composite function successfully, you’re doing two tasks in the correct order.

  1. Identify the outside function (the last operation applied) and the inside function (what’s being plugged in).
  2. Differentiate the outside function as if the inside were just a single variable.
  3. Multiply by the derivative of the inside function.

The phrase “outside times inside” is a common memory aid, but what you actually need to remember is: differentiate the outside, then multiply by the derivative of the inside.

A practical method is to literally name the inside expression u. If you can rewrite your function as f(u), you are setting yourself up to use

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

This reduces errors like forgetting to evaluate f' at g(x), or forgetting the factor of g'(x).

Worked examples (single-layer chain rule)

Example 1: Power of an inner expression

Differentiate:

y = (3x^2 - 5)^7

Step 1: Identify layers.

  • Outside function: raise to the 7th power.
  • Inside function: 3x^2 - 5.

Let

u = 3x^2 - 5
y = u^7

Step 2: Differentiate outside with respect to u.

\frac{dy}{du} = 7u^6

Step 3: Differentiate inside with respect to x.

\frac{du}{dx} = 6x

Step 4: Multiply and substitute back.

\frac{dy}{dx} = 7u^6\cdot 6x

Substitute u = 3x^2 - 5:

y' = 42x(3x^2 - 5)^6

A common mistake here is stopping at 7(3x^2 - 5)^6 (forgetting the inside derivative) or writing 7x^6(3x^2 - 5)^6 (differentiating the inside incorrectly).

Example 2: Trig with an inner expression

Differentiate:

y = \sin(4x - 1)

The outside function is sine; the inside is 4x - 1.

Let

u = 4x - 1
y = \sin(u)

Differentiate:

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

\frac{du}{dx} = 4

Multiply and substitute:

y' = \cos(4x - 1)\cdot 4

So,

y' = 4\cos(4x - 1)

A frequent error is writing \cos(4x - 1) without the factor of 4.

Multiple layers (chain rule applied more than once)

Some functions have more than one “inside.” For example:

y = \sqrt{1 + (2x - 3)^4}

You can still do this systematically by peeling layers from the outside inward.

  • Outer layer: square root.
  • Next layer inside: 1 + (2x - 3)^4.
  • Next layer: fourth power.
  • Next layer: linear expression 2x - 3.

A clean way is to introduce multiple intermediate variables.

Example 3: Nested composition

Differentiate:

y = \sqrt{1 + (2x - 3)^4}

Let

a = 2x - 3
b = 1 + a^4
y = \sqrt{b}

Now compute derivatives step by step:

\frac{dy}{db} = \frac{1}{2\sqrt{b}}

\frac{db}{da} = 4a^3

\frac{da}{dx} = 2

Multiply them:

\frac{dy}{dx} = \frac{dy}{db}\cdot\frac{db}{da}\cdot\frac{da}{dx}

Substitute:

y' = \frac{1}{2\sqrt{b}}\cdot 4a^3\cdot 2

Now substitute back:

y' = \frac{4(2x - 3)^3}{\sqrt{1 + (2x - 3)^4}}

Two things often go wrong in nested problems:

  • You differentiate the outermost correctly but lose track of one inner derivative factor.
  • You simplify too early and accidentally change the structure (for instance, mishandling radicals).

Chain rule with exponential and logarithmic functions

The chain rule shows up constantly with e^{g(x)} and \ln(g(x)).

Key derivative facts (used with chain rule):

\frac{d}{dx}[e^x] = e^x

\frac{d}{dx}[\ln(x)] = \frac{1}{x}

So if the input is not just x, you multiply by the derivative of that input.

Example 4: Exponential with inner function

Differentiate:

y = e^{x^2 + 1}

Let

u = x^2 + 1
y = e^u

Then

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

\frac{du}{dx} = 2x

So

y' = e^{x^2 + 1}\cdot 2x

A common slip is writing e^{x^2+1} as the derivative without the 2x.

Example 5: Logarithm with inner function

Differentiate:

y = \ln(5x - 4)

Let

u = 5x - 4
y = \ln(u)

Then

\frac{dy}{du} = \frac{1}{u}

\frac{du}{dx} = 5

So

y' = \frac{1}{5x - 4}\cdot 5

Thus,

y' = \frac{5}{5x - 4}

Chain rule as “rate of change through a pipeline” (related rates connection)

Even though related rates is often taught later, the chain rule is the engine behind it. If a quantity y depends on u, and u depends on time t, then

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

This is the same idea: changes in time cause changes in the inside quantity, which cause changes in the outside quantity.

Exam Focus
  • Typical question patterns:
    • Differentiate a function with clear nesting, such as a power of a polynomial, trig of a linear function, or exponential/logarithm of an expression.
    • Differentiate a function with multiple layers and expect a fully simplified derivative.
    • Use the chain rule implicitly through notation like \frac{dy}{du}\cdot\frac{du}{dx}, especially when intermediate variables are given.
  • Common mistakes:
    • Forgetting to multiply by the derivative of the inside function (missing the g'(x) factor).
    • Differentiating the outside correctly but failing to evaluate it at the inside (writing f'(x) instead of f'(g(x))).
    • Losing a layer in multi-step compositions (especially with radicals, exponentials, or trig).

Selecting Procedures for Calculating Derivatives

What “selecting a procedure” really means

In AP Calculus AB, you’re rarely asked to differentiate only “a chain rule problem” in isolation. More often, you’re given a function that could involve products, quotients, powers, trig, exponentials, and compositions all at once. Selecting procedures for calculating derivatives means you can look at a function and decide, strategically, which differentiation rules to apply and in what order.

This skill matters because calculus problems are not labeled for you on the exam. If you choose the wrong procedure (for example, trying to use the quotient rule when there is no quotient, or expanding an expression in a way that makes it harder), you waste time and increase error risk. Good selection is about recognizing structure.

A helpful mindset is: differentiation is like parsing a sentence. You look for the “main verb” (the outermost operation), then you analyze the parts inside it.

Start with structure: what is the outermost operation?

A reliable strategy is to ask: “What is the last thing being done to x?” That last operation determines the first differentiation rule you should apply.

For example:

  • If the entire expression is raised to a power, the outermost operation is a power.
  • If the whole thing is inside \sin(\cdot), the outermost operation is sine.
  • If the function is a product of two large expressions, the outermost operation is multiplication.

This is why chain rule is so central: many functions have an outermost operation acting on an inner expression.

When the chain rule is the correct “first move”

You should think “chain rule” when you see:

  • A function inside another function, like \cos(3x), \ln(x^2+1), or (1-5x)^{12}.
  • A “single chunk” being manipulated, such as a whole polynomial inside a trig, exponential, or radical.
  • Nested operations, like e^{\sin(x)} or \sqrt{\ln(x^2+3)}.

One subtlety: sometimes the function looks like a chain rule problem, but algebraic simplification can remove the need for it. For example,

y = (x^2)^3

You can treat it as a composition (power of a power) and use chain rule, or you can simplify first:

y = x^6

Then differentiate easily. Both are valid as long as your algebra is correct. On an exam, the best choice is usually the one that minimizes mistakes.

When other derivative rules should come first

Many functions require chain rule plus another rule. Choosing the right starting rule depends on the outer structure.

Product structure: use the product rule (and chain rule inside it)

If your function is a product of two expressions, you typically begin with the product rule:

\frac{d}{dx}[u(x)v(x)] = u'(x)v(x) + u(x)v'(x)

Then, when you compute u'(x) or v'(x), you may need the chain rule.

Example 1: Product with chain rule inside
Differentiate:

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

The outermost structure is a product: first factor (x^2+1)^5, second factor \sin(3x).

Let

u(x) = (x^2 + 1)^5
v(x) = \sin(3x)

Product rule:

y' = u'(x)v(x) + u(x)v'(x)

Now compute each derivative using chain rule.

For u(x), let a = x^2+1 and u = a^5:

u'(x) = 5(x^2+1)^4\cdot 2x

So

u'(x) = 10x(x^2+1)^4

For v(x), chain rule:

v'(x) = \cos(3x)\cdot 3

So

v'(x) = 3\cos(3x)

Substitute back into product rule:

y' = 10x(x^2+1)^4\sin(3x) + (x^2+1)^5\cdot 3\cos(3x)

A common mistake is to attempt chain rule on the entire product as if it were a single composite. Multiplication is not composition; you need product rule.

Quotient structure: use the quotient rule (and chain rule inside it)

If your function is one expression divided by another, you may use the quotient rule:

\frac{d}{dx}\left[\frac{u(x)}{v(x)}\right] = \frac{u'(x)v(x) - u(x)v'(x)}{(v(x))^2}

Often, though, rewriting as a product with a negative exponent can be simpler and less error-prone, especially when the denominator is a single factor.

Example 2: Quotient with chain rule inside
Differentiate:

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

The outermost structure is a quotient. Use quotient rule with

u(x) = \ln(x^2+1)
v(x) = x

Compute derivatives:

For u(x), chain rule:

u'(x) = \frac{1}{x^2+1}\cdot 2x

So

u'(x) = \frac{2x}{x^2+1}

For v(x):

v'(x) = 1

Now quotient rule:

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

You can simplify the numerator’s first term:

y' = \frac{\frac{2x^2}{x^2+1} - \ln(x^2+1)}{x^2}

A common error is mixing up the order in the numerator (writing u v' - u' v instead of u' v - u v'), or forgetting that u'(x) itself requires chain rule.

Composite-but-not-obvious: rewriting can reveal the chain rule

Sometimes the outer operation isn’t immediately obvious until you rewrite.

Example 3: Rewrite to see a composition
Differentiate:

y = \frac{1}{\sqrt{5x-1}}

You could use quotient rule, but rewriting makes it cleaner:

y = (5x-1)^{-\frac{1}{2}}

Now it’s clearly a power of an inner linear function, so chain rule applies.

Differentiate:

y' = -\frac{1}{2}(5x-1)^{-\frac{3}{2}}\cdot 5

So

y' = -\frac{5}{2}(5x-1)^{-\frac{3}{2}}

If desired, rewrite with radicals:

y' = -\frac{5}{2(5x-1)^{\frac{3}{2}}}

The mistake to avoid is treating \sqrt{5x-1} as \sqrt{5x} - 1 (an invalid simplification). Incorrect algebra leads to incorrect derivatives.

Choosing between simplifying first vs. applying rules directly

You often have a choice:

  • Simplify first (algebra) to reduce complexity.
  • Differentiate directly using product/quotient/chain rules.

A good principle is: simplify when it clearly reduces the number of rules you’ll need and you can do it safely.

For instance:

y = (x^3)(x^4)

Simplify to y = x^7, then differentiate.

But if you have

y = (x^2+1)^5(3x-2)^6

There is no meaningful simplification that removes the product, so you should accept the product structure and use product rule (with chain rule for each factor) rather than expanding, which would be long and error-prone.

A deeper reason chain rule is central to “procedure selection”

Many derivative rules are really “outer structure rules” (product and quotient) plus “inner structure rule” (chain). On free-response questions, you’re often graded on correct setup and correct differentiation. Recognizing layers lets you write correct derivatives efficiently.

One way to practice selection is to train yourself to answer these two questions before you do any algebra:

  1. “Is the outermost operation addition/subtraction, multiplication, division, or a named function like \sin, \ln, e^{x}, a power, or a root?”
  2. “After I choose the outer rule, will the pieces I differentiate require chain rule?”

Worked mixed-procedure examples

Example 4: Quotient where rewriting avoids quotient rule

Differentiate:

y = \frac{(x^2+1)^3}{(x^2+1)^5}

Here, simplifying first is a smart selection move. Use exponent rules:

y = (x^2+1)^{-2}

Now chain rule:

y' = -2(x^2+1)^{-3}\cdot 2x

So

y' = -4x(x^2+1)^{-3}

Or as a fraction:

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

If you used quotient rule directly, you would still be correct, but you would do much more work and increase the chance of algebra errors.

Example 5: A “layered” trig-power composition

Differentiate:

y = \cos^2(3x)

This notation means

y = (\cos(3x))^2

The outermost operation is squaring; inside is \cos(3x), which itself contains 3x. So you’ll apply chain rule more than once.

Let

u = \cos(3x)
y = u^2

Then

\frac{dy}{du} = 2u

Now differentiate u:

u' = -\sin(3x)\cdot 3

So

u' = -3\sin(3x)

Multiply:

y' = 2u\cdot u'

Substitute back:

y' = 2\cos(3x)(-3\sin(3x))

Thus,

y' = -6\cos(3x)\sin(3x)

A common mistake is to treat \cos^2(3x) as \cos(6x). Those expressions are not the same function.

Exam Focus

  • Typical question patterns:
    • Given a complicated function, decide and execute the appropriate combination of rules (product/quotient with chain rule inside).
    • Rewrite an expression (negative exponents, simplified powers) to make differentiation cleaner, then differentiate.
    • Differentiate expressions where notation can be misleading, such as \sin^2(x) or \cos^2(3x), requiring you to interpret structure correctly.
  • Common mistakes:
    • Using chain rule when the outermost structure is actually a product or quotient (or failing to use product/quotient rule when needed).
    • Expanding expressions unnecessarily, creating long work and increasing algebraic error.
    • Misreading notation: interpreting \sin^2(x) as \sin(x^2), or interpreting \cos^2(3x) as \cos(6x).