Chain Rule vs Product Rule: When to Use Each
The Core Distinction
Chain rule: Use when one function is applied to the output of another — a composition. Structure: f(g(x)) — one inside the other.
Product rule: Use when two functions are multiplied together. Structure: f(x) × g(x) — side by side.
The test: can you separate the expression into f(g(x)) form, or f(x)·g(x) form?
Quick Identification
| Expression | Structure | Rule |
|---|---|---|
| sin(x²) | sin(■) where ■ = x² | Chain rule |
| x²·sin(x) | ■ × ■ | Product rule |
| e^(x²) | e^(■) | Chain rule |
| x·eˣ | ■ × ■ | Product rule |
| (3x+1)^5 | (■)^5 | Chain rule |
| (x+1)(x−1) | ■ × ■ | Product rule (or expand) |
| ln(cos x) | ln(■) | Chain rule |
| x·ln(x) | ■ × ■ | Product rule |
The Product Rule
For y = f(x)·g(x):
dy/dx = f'(x)·g(x) + f(x)·g'(x)
Mnemonic: “first times derivative of second, plus second times derivative of first.”
When Both Apply Together
Many real calculus problems require both rules on the same expression.
Example: y = x²·sin(x²)
This is a product of x² and sin(x²). But sin(x²) itself requires chain rule.
- Apply product rule: d/dx[x²·sin(x²)] = (2x)·sin(x²) + x²·d/dx[sin(x²)]
- Apply chain rule to d/dx[sin(x²)]: cos(x²)·2x
- Combine: 2x·sin(x²) + x²·cos(x²)·2x = 2x·sin(x²) + 2x³·cos(x²)
Example: y = eˣ·cos(3x)
Product rule first:
- d/dx[eˣ] = eˣ
- d/dx[cos(3x)] needs chain rule = −sin(3x)·3 = −3sin(3x)
- Result: eˣ·cos(3x) + eˣ·(−3sin(3x)) = eˣ(cos(3x) − 3sin(3x))
The Quotient Rule
A third rule applies when one function divides another:
d/dx[f(x)/g(x)] = [f'(x)·g(x) − f(x)·g'(x)] / [g(x)]²
The quotient rule can always be rewritten as a product rule (multiply by g(x)^−1) plus chain rule, but the formula is often faster.
Decision Tree
Is the expression a composition f(g(x))?
Yes → Chain rule
No → Is it a product f(x)·g(x)?
Yes → Product rule
No → Is it a quotient f(x)/g(x)?
Yes → Quotient rule
No → Direct rule (power, trig, etc.)
For complex expressions, multiple rules apply at different levels. Work from outermost to innermost, applying the appropriate rule at each level.
For worked examples that combine product rule, quotient rule, and chain rule on progressively harder problems, see the Chain Rule Practice Problems guide. To avoid common errors when combining rules, see 7 Common Chain Rule Mistakes.