Unit 3: Advanced Differentiation Techniques: Composite Functions
The Mechanics of the Chain Rule
In previous sections, you learned how to differentiate simple functions like $x^2$, $\sin(x)$, and $e^x$. However, most real-world mathematical models rely on composite functions—functions nested inside other functions. The Chain Rule is the essential tool for managing these layers.
Conceptual Definition
A composite function is written as $f(g(x))$, where $g(x)$ is the "inner" function and $f(x)$ is the "outer" function.
The Chain Rule states that the instantaneous rate of change of a composite function is the product of the derivative of the outer function (evaluated at the inner function) and the derivative of the inner function.

Notation and Formulas
There are two primary ways to express the Chain Rule. You must be comfortable with both, as AP exams switch between them frequently.
1. Function Notation (Lagrange)
If $y = f(g(x))$, then:
\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)
- $f'(g(x))$: Derive the outer layer, keeping the inside the same.
- $g'(x)$: Multiply by the derivative of the inside.
2. Leibniz Notation ($dy/dx$)
If we define $y = f(u)$ and $u = g(x)$, then:
\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}
This notation makes the "chaining" logic visible—it looks like the $du$ terms cancel out (though technically they are operators, not fractions).
Decomposition: Identifying Inner and Outer Functions
Success with the Chain Rule depends entirely on correctly identifying the layers of the function. This process is called decomposition.
| Function $y$ | Outer Function $f(u)$ | Inner Function $u = g(x)$ | Note |
|---|---|---|---|
| $(3x^2 + 1)^5$ | $u^5$ | $3x^2 + 1$ | Power function wrapping a polynomial |
| $\sin(4x)$ | $\sin(u)$ | $4x$ | Trig 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 $(\tan x)^2$ |
The "Onion" Analogy
Think of a composite function like an onion. To find the derivative, you must peel the formula one layer at a time, moving from the outside in.
- Peel the outer skin: Differentiate the outer function, leaving the inner core untouched.
- Peel the inner layer: Multiply by the derivative of the next layer inside.
Applying the Chain Rule: Worked Examples
Example 1: The General Power Rule
Problem: Find $f'(x)$ for $f(x) = \sqrt{5x^3 - 2x}$.
Step 1: Rewrite the root as a power.
f(x) = (5x^3 - 2x)^{1/2}
Step 2: Identify layers.
- Outer: $(\dots)^{1/2}$
- Inner: $5x^3 - 2x$
Step 3: Apply Chain Rule.
Derivative of outer (keep inside) $\times$ Derivative of inside:
f'(x) = \frac{1}{2}(5x^3 - 2x)^{-1/2} \cdot \frac{d}{dx}(5x^3 - 2x)
f'(x) = \frac{1}{2}(5x^3 - 2x)^{-1/2} \cdot (15x^2 - 2)
Step 4: Simplify (if required).
f'(x) = \frac{15x^2 - 2}{2\sqrt{5x^3 - 2x}}
Example 2: Transcendentals
Problem: Differentiate $y = e^{\sin(x)}$.
Analysis:
- Outer: $e^u$ (Derivative is $e^u$)
- Inner: $\sin(x)$ (Derivative is $\cos(x)$)
Solution:
y' = e^{\sin(x)} \cdot \cos(x)
Example 3: Nested Chains (Three Layers)
Problem: Find $y'$ for $y = \cos^3(4x)$.
Step 1: Rewrite to see hierarchy.
y = [\cos(4x)]^3
Step 2: Analysis.
- Outer: $[\dots]^3$ (Power Rule)
- Middle: $\cos(\dots)$ (Trig Derivative)
- Inner: $4x$ (Constant Multiple)
Step 3: Differentiate sequentially.
y' = \underbrace{3[\cos(4x)]^2}{\text{Outer}} \cdot \underbrace{(-\sin(4x))}{\text{Middle}} \cdot \underbrace{4}_{\text{Inner}}
Step 4: Clean up.
y' = -12 \cos^2(4x)\sin(4x)
Selecting Procedures for Calculating Derivatives
Calculus problems rarely announce "Use the Chain Rule now!" You must analyze the structure of the function to select the correct procedure. A major learning objective in Unit 3 is distinguishing between products and compositions.

Strategy Table
| Function Structure | Rule Required | Why? |
|---|---|---|
| $y = x^2 \sin(x)$ | Product Rule | Two functions multiplied: $x^2$ AND $\sin(x)$. |
| $y = \sin(x^2)$ | Chain Rule | One function inside another: $x^2$ is inside $\sin$. |
| $y = x \ln(x^2 + 1)$ | Product + Chain | Product of $x$ and $\ln(\dots)$; Chain needed for $\ln(\dots)$. |
| $y = \frac{\sin(2x)}{x}$ | Quotient + Chain | Quotient of trig and poly; Chain needed for $\sin(2x)$. |
Mixed Rule Application (Product + Chain)
Problem: Differentiate $f(x) = x^2(1-3x)^4$.
This is a Product Rule problem primarily ($u \cdot v$), but the derivative of $v$ requires the Chain Rule.
Let $u = x^2$ and $v = (1-3x)^4$.
- $u' = 2x$
- $v' = 4(1-3x)^3 \cdot (-3) = -12(1-3x)^3$ (Chain Rule applied here)
Apply Product Rule ($u'v + uv'$):
f'(x) = (2x)(1-3x)^4 + (x^2)[-12(1-3x)^3]
f'(x) = 2x(1-3x)^4 - 12x^2(1-3x)^3
(Pro Tip: On Free Response Questions (FRQs), you often do not need to simplify the algebra unless asked.)
Common Mistakes & Pitfalls
1. Stopping at the Outer Derivative
- Mistake: For $y = (3x+1)^5$, writing $y' = 5(3x+1)^4$.
- Correction: You forgot to multiply by the inner derivative (3). The answer involves $5(\dots) \cdot 3 = 15$.
2. Differentiating the Inner Function Too Early
- Mistake: For $y = \sin(x^2)$, writing $y' = \cos(2x)$.
- Correction: The outer derivative acts on the original inside function. It should be $f'(g(x))$, not $f'(g'(x))$.
- Correct answer: $\cos(x^2) \cdot 2x$.
3. Notation Confusion with Trig Powers
- Mistake: Treating $\sin^2(x)$ as $\sin(x^2)$.
- Fact: $\sin^2(x) = (\sin x)^2$ (Chain Rule: Power $\to$ Trig). $\sin(x^2)$ is Trig $\to$ Polynomial.
4. Forgetting Parentheses
- Mistake: Writing derivatives like $y' = \cos(4x) \cdot 4 + x$. Is the $+x$ part of the derivative or a separate term?
- Advice: Always wrap the derivative of the inner function in parentheses or move constants to the front immediately. Write $4\cos(4x)$, not $\cos(4x)4$.
Mnemonics
- "SOD": Same Outer, Derivative (of inside).
- Link the Chain: If $y$ is measured in meters, $u$ is degrees, and $x$ is seconds, basic dimensional analysis ($m/sec = m/deg \times deg/sec$) proves you must multiply the rates.