What Is the Product Rule?
The product rule is a differentiation formula used when you need to find the derivative of two functions that are multiplied together.
y = f(x) · g(x), then the derivative is y' = f'(x) · g(x) + f(x) · g'(x). In words: differentiate the first function and multiply by the second, then add the first function multiplied by the derivative of the second.For example, if y = x² · sin(x), you have two separate functions being multiplied: f(x) = x² and g(x) = sin(x).
Applying the product rule: y' = 2x · sin(x) + x² · cos(x).
The key indicator that you need the product rule is seeing two distinct functions joined by multiplication where neither is simply a constant. If one factor is a constant (like 5 · sin(x)), you can just pull the constant out and differentiate normally — no product rule needed.
The product rule arises naturally in physics when differentiating quantities like momentum (mass times velocity) when both mass and velocity depend on time.
What Is the Chain Rule?
The chain rule is used when you need to differentiate a composite function — a function inside another function.
y = f(g(x)), then the derivative is y' = f'(g(x)) · g'(x). In words: differentiate the outer function (keeping the inner function unchanged), then multiply by the derivative of the inner function.For example, if y = sin(3x), the outer function is sin(u) and the inner function is u = 3x.
The derivative of the outer is cos(u) = cos(3x), and the derivative of the inner is 3.
y' = cos(3x) · 3 = 3cos(3x)Another example: y = (x² + 1)⁵. The outer function is u⁵ and the inner is u = x² + 1.
y' = 5(x² + 1)⁴ · 2x = 10x(x² + 1)⁴The chain rule is needed whenever something other than a plain x is "inside" another function — inside parentheses raised to a power, inside a trig function, inside a logarithm, under a square root, or inside an exponential.
How to Tell Which Rule You Need
The decision comes down to asking one question: Is this a product of two functions, or is this a function inside a function? Look at the structure of the expression.
| Structure | What You See | Rule to Use |
|---|---|---|
| Product | Two separate pieces multiplied together — like x³ · eˣ or ln(x) · cos(x) | Product rule |
| Composition | One function wrapped around another — like e^(x²), sin(5x + 1), or √(x³ + 2) | Chain rule |
Can you point to two separate factors being multiplied at the outermost level? If yes, start with the product rule. If instead the outermost operation is something like a power, trig, exponential, or log function applied to a non-trivial input, start with the chain rule.
When you need both rules
Sometimes you need both rules in the same problem. For instance, y = x² · sin(3x) is a product (product rule first) where the second factor sin(3x) is a composition (chain rule for its derivative).
Training yourself to read the structure of an expression is one of the most valuable calculus skills you can develop.
Common Mistakes and How to Avoid Them
Students make several predictable errors when applying these rules.
Writing the derivative of sin(3x) as cos(3x) instead of 3cos(3x) is one of the most common errors in calculus. Always check: is there an inner function whose derivative I need to multiply by?
Some students write f'(x) · g'(x) instead of f'(x) · g(x) + f(x) · g'(x). The product of the derivatives is not the derivative of the product.
The expression (2x + 1)⁴ is not a product of two functions — it is a composition (the power function applied to a linear function). Use the chain rule, not the product rule.
When differentiating x · e^(2x), the product rule gives 1 · e^(2x) + x · (derivative of e^(2x)), and that derivative of e^(2x) requires the chain rule to get 2e^(2x). If you skip it, your answer is wrong.
When in doubt, scan your problem with Solver AI to see the correct rule applied step by step.
Worked Examples: Product Rule
Let's practice the product rule with several examples.
Find d/dx [x³ · eˣ].
Let f = x³, g = eˣ. Then f' = 3x², g' = eˣ.
Product rule: y' = 3x² · eˣ + x³ · eˣ.
y' = eˣ(3x² + x³) = x²eˣ(3 + x)Find d/dx [sin(x) · cos(x)].
Let f = sin(x), g = cos(x). Then f' = cos(x), g' = −sin(x).
Product rule: y' = cos(x) · cos(x) + sin(x) · (−sin(x)) = cos²(x) − sin²(x) = cos(2x).
y' = cos(2x)This result matches the derivative of ½sin(2x) — a nice verification using a trig identity.
Find d/dx [x · ln(x)].
Let f = x, g = ln(x). Then f' = 1, g' = 1/x.
Product rule: y' = 1 · ln(x) + x · (1/x).
y' = ln(x) + 1Notice how the product rule elegantly produces a result you might not have guessed.
Each example follows the same pattern: identify the two factors, differentiate each, and apply the formula.
Worked Examples: Chain Rule
Find d/dx [(2x − 5)⁷].
Outer: u⁷, inner: u = 2x − 5.
7(2x − 5)⁶ · 2 = 14(2x − 5)⁶Find d/dx [e^(x²)].
Outer: eᵘ, inner: u = x².
e^(x²) · 2x = 2xe^(x²)Find d/dx [ln(sin(x))].
Outer: ln(u), inner: u = sin(x).
(1/sin(x)) · cos(x) = cos(x)/sin(x) = cot(x)Find d/dx [√(3x² + 1)]. Rewrite as (3x² + 1)^(1/2).
Outer: u^(1/2), inner: u = 3x² + 1.
(1/2)(3x² + 1)^(−1/2) · 6x = 3x / √(3x² + 1)In every case, the pattern is the same: differentiate the outer shell, leave the inside alone, then multiply by the derivative of the inside. If you can identify the "layers" of a function, the chain rule becomes second nature.
When You Need Both Rules Together
Many real calculus problems require both the product rule and the chain rule in a single differentiation.
Consider y = x² · e^(3x). At the top level, this is a product of x² and e^(3x), so start with the product rule:
y' = 2x · e^(3x) + x² · d/dx[e^(3x)]
Now, d/dx[e^(3x)] requires the chain rule: outer eᵘ, inner 3x, so the derivative is 3e^(3x).
Putting it together: y' = 2x · e^(3x) + x² · 3e^(3x)
y' = e^(3x)(2x + 3x²) = xe^(3x)(2 + 3x)Here is another example: y = sin(x) · (x² + 1)⁴.
Product rule first: y' = cos(x) · (x² + 1)⁴ + sin(x) · d/dx[(x² + 1)⁴]
Chain rule for the second term: 4(x² + 1)³ · 2x = 8x(x² + 1)³.
y' = cos(x)(x² + 1)⁴ + 8x · sin(x)(x² + 1)³The strategy is always the same: identify the outermost structure, apply the appropriate rule, and handle inner layers with the chain rule as needed. With practice, this layered approach becomes automatic.
Solver AI is excellent for checking these multi-rule problems — just snap a photo and see each rule applied in the correct order.