Calculus I › Differentiation rules › full formula sheet

(fg)′ = f′g + fg′

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:

Before reading on: is (fg)′ = f′g′? Test it on f(x) = g(x) = x before you read the verdict.
(fg)′ = f′g′  ??the tempting — and wrong — guess

Kill it with one example. Take f(x) = x and g(x) = x:

fg
=
x · x = x²
The product is x², whose derivative we already know: 2x.
f′g′
=
1 · 1 = 1
But the naive guess gives 1 — a constant. At x = 5 the true answer is 10 and the guess says 1. Dead on arrival.

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:

(f+Δf)(g+Δg) − fg
=
f·Δg + g·Δf + Δf·Δg
The area grew by two strips (f·Δg and g·Δf) plus a tiny corner square Δf·Δg.
F′
=
limh→0 [f·(Δg/h) + g·(Δf/h) + Δf·(Δg/h)]
Divide by h. As h → 0, Δg/h → g′ and Δf/h → f′ — and Δf → 0, so the corner square vanishes.
=
f·g′ + g·f′
Two strips survive, the corner dies. That is why there are two terms — each factor's change contributes one.

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.

F′(x)
=
limh→0 [f(x+h)·g(x+h) − f(x)·g(x)] / h
Step 1 — the definition. The derivative is the limit of the difference quotient. So far this is just the definition applied to the product F = fg.
=
limh→0 [f(x+h)g(x+h) − f(x+h)g(x) + f(x+h)g(x) − f(x)g(x)] / h
Step 2 — the trick: add zero. We insert −f(x+h)·g(x) + f(x+h)·g(x). Since +A − A = 0 for any A, the value is completely unchanged. Why this A? Because it is the one choice that lets the next step factor the numerator.
=
limh→0 [ f(x+h)·(g(x+h)−g(x))/h  +  g(x)·(f(x+h)−f(x))/h ]
Step 3 — factor and split. The first pair shares the factor f(x+h); the second pair shares g(x). Each pair now contains a difference quotient — exactly the shape whose limit is a derivative. We split one limit into two (the sum law for limits, allowed because both pieces converge).
=
f(x)·g′(x) + g(x)·f′(x)
Step 4 — take the limit. As h → 0: f(x+h) → f(x) because a differentiable function is continuous; [g(x+h)−g(x)]/h → g′(x) and [f(x+h)−f(x)]/h → f′(x) by the very definition of the derivative. ∎

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:

  1. 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).
  2. Name the factors f and g. Order never matters — the rule is symmetric: f′g + fg′ is the same as fg′ + f′g.
  3. Differentiate each factor separately. This is where most errors happen: differentiate f completely (chain rule inside if needed) before assembling.
  4. Assemble: f′g + fg′. Count your terms — two factors, two terms. If you wrote one term, you dropped something.
  5. 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

(fgh)′ = f′gh + fg′h + fgh′one term per factor — each term wakes up exactly one factor while the others sleepSay it: the derivative of f g h equals f prime g h plus f g prime h plus f g h prime

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.

Common mistake: writing (fg)′ = f′g′. Run the x² test in your head: f = g = x gives f′g′ = 1, but (x²)′ = 2x. Five seconds, catches the error every time.

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)]

  1. Name the factors. f(x) = 2x+1, g(x) = x²−3. (Either order works — the rule is symmetric.)
  2. Differentiate each separately. f′(x) = 2, g′(x) = 2x.
  3. Assemble f′g + fg′. = 2·(x²−3) + (2x+1)·(2x).
  4. Simplify. = 2x² − 6 + 4x² + 2x = 6x² + 2x − 6.
  5. Check by expanding. (2x+1)(x²−3) = 2x³ + x² − 6x − 3, whose derivative is 6x² + 2x − 6. Matches ✓
Common mistake: writing f′g′ = 2·2x = 4x and stopping. The x² test catches it: that wrong rule claims (x·x)′ = 1, but it is 2x.
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]

  1. Name the factors. f(x) = x², g(x) = sin x.
  2. 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.)
  3. Assemble. = 2x·sin x + x²·cos x.
  4. Tidy (optional). Factor x: x(2 sin x + x cos x).
Common mistake: writing g′ = −sin x (mixing up which trig derivative carries the minus). Say it: “sine to cosine, cosine to negative sine.”
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]

  1. Name the factors. f(x) = x, g(x) = e2x.
  2. Differentiate f. f′(x) = 1.
  3. 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.)
  4. Assemble. = 1·e2x + x·2e2x = e2x + 2x·e2x.
  5. Factor. = e2x(1 + 2x).
Common mistake: writing g′ = e2x — forgetting the chain-rule ×2. This single dropped factor is the most common error on product+chain problems. Always ask: “is there anything inside?”
Your turn — d/dx [x²e3x] = ?

Answer: xe3x(2 + 3x). 2x·e3x + x²·3e3x; factor xe3x.

Before reading on: (x²−1)(x+4) — expand first, or product rule? Which route is faster here, and why?

Example 4 — judgment call: expand or product rule? d/dx [(x²−1)(x+4)]

Path A — expand first (cheap here: small polynomials).

  1. Expand: (x²−1)(x+4) = x³ + 4x² − x − 4.
  2. Differentiate term by term: 3x² + 8x − 1.

Path B — product rule (no expansion needed).

  1. f = x²−1, f′ = 2x; g = x+4, g′ = 1.
  2. 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.

Common mistake: FOIL errors while expanding (dropping the −x term is the usual one). The product rule dodges expansion risk entirely — one more reason to know both paths.
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

  1. 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.
  2. Work the examples with the answers covered, then uncover one step at a time and compare.
  3. Finish with the final challenge — five mixed questions including the classic traps.
  4. 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