Calculus I › Differentiation rules › full formula sheet
Say it: “the derivative of f times g equals f prime times g plus f times g prime”
The product rule
How to differentiate a product of two functions — and why the obvious guess is wrong.
Notation on this page: f′ means df/dx, the derivative of f. f and g are differentiable functions of x.
Before this lesson: The definition of the derivative, The sum / difference law
Notation in this lesson
- f′g + fg′
- “first times derivative of second, plus second times derivative of first”
- d(uv) = u dv + v du
- Leibniz: in each term one factor sleeps while the other wakes
Where it comes from
You already know the sum rule: the derivative of a sum is the sum of the derivatives, (f+g)′ = f′ + g′. It feels natural to guess the same pattern for products:
Kill it with one example. Take f(x) = x and g(x) = x:
So a product needs its own rule. Here is the intuition that makes the real rule obvious. Picture f and g as the sides of a rectangle, so fg is its area. Nudge x by a tiny amount h: f grows by Δf = f(x+h) − f(x), and g grows by Δg = g(x+h) − g(x). The new area is (f + Δf)(g + Δg). Expand it:
The product rule first appeared in Gottfried Wilhelm Leibniz’s 1684 paper Nova Methodus pro Maximis et Minimis — the founding paper of differential calculus. It needs no new axioms: everything above follows from the limit definition, as we’ll prove next.
Derivation
Let F(x) = f(x)·g(x), where f and g are differentiable at x (hence continuous — more on that below). We apply the limit definition of the derivative to F. Watch the second line: it is the whole proof.
Why does differentiability imply continuity? Write f(x+h) = f(x) + h·[f(x+h)−f(x)]/h. As h → 0, the bracket tends to f′(x), so f(x+h) → f(x) + 0·f′(x) = f(x). That one line is the whole proof — and it is exactly what lets us replace f(x+h) with f(x) in Step 4.
How to use it
The procedure, every time:
- Confirm it is a product. Two expressions in x multiplied: x²·sin x. Not a composition like sin(x²) (that is the chain rule), not a quotient like (sin x)/x (that is the quotient rule).
- Name the factors f and g. Order never matters — the rule is symmetric: f′g + fg′ is the same as fg′ + f′g.
- Differentiate each factor separately. This is where most errors happen: differentiate f completely (chain rule inside if needed) before assembling.
- Assemble: f′g + fg′. Count your terms — two factors, two terms. If you wrote one term, you dropped something.
- Simplify. Factor out common terms; students lose more marks to unsimplified answers than to wrong rules.
Expand first, or rule first?
If both factors are simple polynomials, expanding first is often faster: d/dx [(x²−1)(x+4)] expands to d/dx [x³+4x²−x−4] = 3x²+8x−1. The product rule gives the same answer (check it in Example 4 below). Rule of thumb: expand when it is cheap, reach for the product rule when a factor is transcendental (sin, cos, ex, ln x) or expansion would be ugly.
Three factors
Product meets chain
For d/dx [x²·sin(3x)] you need both rules: the product rule for the outer structure, and the chain rule inside sin(3x), whose derivative is 3 cos(3x). Full answer: 2x·sin(3x) + 3x²·cos(3x). Forgetting the ×3 is the classic error — see Example 3.
Worked examples
Four problems, easiest first. In each one, read every step — the why of each move is the lesson.
Example 1 — the basic move: d/dx [(2x+1)(x²−3)]
- Name the factors. f(x) = 2x+1, g(x) = x²−3. (Either order works — the rule is symmetric.)
- Differentiate each separately. f′(x) = 2, g′(x) = 2x.
- Assemble f′g + fg′. = 2·(x²−3) + (2x+1)·(2x).
- Simplify. = 2x² − 6 + 4x² + 2x = 6x² + 2x − 6.
- Check by expanding. (2x+1)(x²−3) = 2x³ + x² − 6x − 3, whose derivative is 6x² + 2x − 6. Matches ✓
Your turn — d/dx [(3x+2)(x²−1)] = ?
Answer: 9x² + 4x − 3. f′ = 3, g′ = 2x: 3(x²−1) + (3x+2)(2x) = 3x² − 3 + 6x² + 4x.
Example 2 — with trigonometry: d/dx [x²·sin x]
- Name the factors. f(x) = x², g(x) = sin x.
- Differentiate each. f′(x) = 2x, g′(x) = cos x. (Why cos? The derivative of sine is cosine — the minus sign belongs to the derivative of cosine, not sine.)
- Assemble. = 2x·sin x + x²·cos x.
- Tidy (optional). Factor x: x(2 sin x + x cos x).
Your turn — d/dx [x³ cos x] = ?
Answer: 3x² cos x − x³ sin x. f′g + fg′ with g′ = −sin x.
Example 3 — product meets chain: d/dx [x·e2x]
- Name the factors. f(x) = x, g(x) = e2x.
- Differentiate f. f′(x) = 1.
- Differentiate g — chain rule inside. The exponent 2x is itself a function of x, so d/dx [e2x] = e2x·2 = 2e2x. (Why the ×2? The chain rule multiplies by the derivative of the inside: d/dx [2x] = 2.)
- Assemble. = 1·e2x + x·2e2x = e2x + 2x·e2x.
- Factor. = e2x(1 + 2x).
Your turn — d/dx [x²e3x] = ?
Answer: xe3x(2 + 3x). 2x·e3x + x²·3e3x; factor xe3x.
Example 4 — judgment call: expand or product rule? d/dx [(x²−1)(x+4)]
Path A — expand first (cheap here: small polynomials).
- Expand: (x²−1)(x+4) = x³ + 4x² − x − 4.
- Differentiate term by term: 3x² + 8x − 1.
Path B — product rule (no expansion needed).
- f = x²−1, f′ = 2x; g = x+4, g′ = 1.
- Assemble: 2x(x+4) + (x²−1)·1 = 2x² + 8x + x² − 1 = 3x² + 8x − 1. Same answer ✓
The lesson: expand when it is cheap, use the rule when a factor is transcendental (sin, ex, ln x) or expansion would be a mess. Both paths must agree — use the second as a check on the first.
Your turn — Judgment call: d/dx [(x−1)(x+1)] — expand or product rule?
Answer: 2x either way — expand wins. Expand: x² − 1 → 2x. Product rule: 1·(x+1) + (x−1)·1 = 2x. Same ✓, but expanding was one line.
Memorization tips
- Say it aloud: “first times derivative of second, plus second times derivative of first.” The rhythm of the sentence matches the formula.
- Leibniz form: d(uv) = u dv + v du. In each term one factor “sleeps” while the other “wakes up” (gets differentiated). Picture the sleeping factor, then the waking one.
- The x² test (your 5-second self-check): f = g = x kills f′g′ instantly, since 2x ≠ 1. Run it in your head whenever you are unsure.
- The collapse check: if one factor is constant, the rule must collapse to the constant-multiple rule — (5f)′ = 5f′ + f·0 = 5f′. If your answer does not collapse, something is off.
- The rectangle picture: two strips survive, the corner square vanishes. That image is the formula — f·g′ + g·f′, one strip per factor.
- It is symmetric: f′g + fg′ — it never matters which factor you call f. If swapping the names changes your answer, you made an algebra slip.
Final challenge
Five mixed questions — basics, applications, and the traps, all in one. Score 5/5 and the product rule is yours.
← Back to the Calculus I formula sheet
How to learn a formula here
- Read each section in order — every section ends with a short quiz. Take it before moving on; the questions test exactly what you just read.
- Work the examples with the answers covered, then uncover one step at a time and compare.
- Finish with the final challenge — five mixed questions including the classic traps.
- Retake what you miss — every quiz reshuffles each attempt, and every answer explains itself.
Frequently asked questions
What is the product rule?
The product rule says the derivative of a product of two functions is (fg)′ = f′g + fg′: first times the derivative of the second, plus second times the derivative of the first.
Why isn’t the derivative of a product just f′g′?
Test it with f(x) = g(x) = x: the product is x², whose derivative is 2x, but f′g′ = 1·1 = 1. The limit definition forces the extra cross terms, giving f′g + fg′.
What is the add-and-subtract trick in the product rule derivation?
We insert −f(x+h)g(x) + f(x+h)g(x) into the difference quotient. Since +A − A = 0, nothing changes — but the numerator can then be factored into two groups, each containing a recognizable difference quotient.
When should I expand instead of using the product rule?
When both factors are simple polynomials, expanding first is often faster. Reach for the product rule when factors involve sin, cos, ex, or ln x — or when expansion would be messy.
Does the product rule work for three factors?
Yes: (fgh)′ = f′gh + fg′h + fgh′. Each term differentiates exactly one factor while the other two stay put.
More from the codex
Support the codex
This page is free, with no account and no ads. If it helped you learn, consider supporting the indie dev behind it.
Questions or a bug to report? Email [email protected].