Find a course

Module 3: Differentiation TechniquesLesson 7 of 1213 min

The Product and Quotient Rules

Differentiate products and quotients of functions, avoid the tempting wrong shortcuts, and apply the product rule to changing revenue.

Step 1 of 13Learn

Why (fg)' is not f'g'

A coffee shop's revenue is price × number of cups sold. Suppose the price is rising and the number of cups is falling. How fast is revenue changing? You need the derivative of a product, and the obvious guess is wrong.

Try it with f(x) = x² and g(x) = x³. Their product is x⁵, with derivative 5x⁴. But f'(x) · g'(x) = 2x · 3x² = 6x³. Not even close.

The correct rule is the product rule:

(f · g)' = f' · g + f · g'

"Derivative of the first times the second, plus the first times the derivative of the second." Check: 2x · x³ + x² · 3x² = 2x⁴ + 3x⁴ = 5x⁴. Correct.

Why it works. Picture a rectangle with width f and height g, so its area is fg. When x changes a little, the width grows by Δf and the height by Δg. The new area includes a strip g · Δf along one side, a strip f · Δg along the other, and a tiny corner Δf · Δg. Divide by Δx and let it shrink: the strips give f'g + fg', and the corner vanishes because it's a product of two tiny changes.

Example. d/dx [x² sin x] = 2x · sin x + x² · cos x.

Step 2 of 13Practice · Diagram

Why (fg)′ has two terms

Picture a rectangle with sides f and g. When x changes a little, both sides grow, and the area gains two strips plus a tiny corner.

Which piece vanishes as Δx → 0 and is NOT part of the product rule?

Tap the shape that answers the question, then press Check.

Why (fg)′ has two termsParts diagram: Change in area f · g, Strip f′ · g, Strip f · g′, Corner f′ · g′ · Δx.Change in areaf · gStrip f′ · gStrip f · g′Corner f′ · g′· Δx
Change in area f · g
Strip f′ · g

The change in f, times the full width g.

Strip f · g′

The full height f, times the change in g.

Corner f′ · g′ · Δx

Shrinks much faster than the strips and disappears in the limit.

Step 3 of 13Learn

Product rule examples

Example 1. f(x) = x² eˣ

  • First: x², derivative 2x. Second: eˣ, derivative eˣ.
  • f'(x) = 2x eˣ + x² eˣ = eˣ(x² + 2x)

Factoring out the common eˣ makes the result easier to use, for example when setting f'(x) = 0 later.

Example 2. f(x) = (3x − 1)(x² + 4)

  • f'(x) = 3(x² + 4) + (3x − 1)(2x) = 3x² + 12 + 6x² − 2x = 9x² − 2x + 12

You could also multiply out first (3x³ − x² + 12x − 4) and use the power rule. You get the same answer, which is a good way to check yourself.

Example 3. f(x) = x ln x

  • f'(x) = 1 · ln x + x · (1/x) = ln x + 1

Three factors. For fgh, the product rule extends naturally: (fgh)' = f'gh + fg'h + fgh'. Each term differentiates exactly one factor.

When to skip it. If one factor is a constant, use the constant multiple rule instead: d/dx [5 sin x] = 5 cos x. The product rule gives the same result (0 · sin x + 5 cos x) but with extra work. And if you can simplify a product into a single power, like x² · √x = x5/2, do that first.

Step 4 of 13Practice · Work it out

Find the derivative of f(x) = x³ ln x and evaluate it at x = 1.

Step 5 of 13Learn

The quotient rule

For a quotient f/g, the rule is:

(f/g)' = (f' · g − f · g') / g²

A popular chant: "low d-high minus high d-low, over the square of what's below." Here "high" is the numerator f, "low" is the denominator g, and "d" means derivative.

Example. f(x) = (x² + 1)/(x − 3)

  • High: x² + 1, d-high: 2x. Low: x − 3, d-low: 1.
  • f'(x) = [(x − 3)(2x) − (x² + 1)(1)] / (x − 3)²
  • Numerator: 2x² − 6x − x² − 1 = x² − 6x − 1
  • f'(x) = (x² − 6x − 1)/(x − 3)²

Usually you leave the denominator squared and simplify only the numerator.

Deriving d/dx [tan x]. Write tan x = sin x / cos x:

  • [cos x · cos x − sin x · (−sin x)] / cos² x = (cos² x + sin² x)/cos² x = 1/cos² x = sec² x

Unlike the product rule, the order in the numerator matters. Reversing it to f · g' − f' · g flips the sign of the whole answer.

Avoid the quotient rule when you can. For 5/x³, rewrite as 5x−3 and use the power rule: −15x−4. For (x³ + x)/x, simplify to x² + 1 first. The quotient rule is for genuinely tangled fractions like (x² + 1)/(x − 3).

Step 6 of 13Practice · Choose one

What is the derivative of f(x) = x/(x + 1)?

Step 7 of 13Note

Step 8 of 13Compare

Product rule versus quotient rule

AspectProduct ruleQuotient rule
Formula(fg)′ = f′g + fg′(f/g)′ = (f′g − fg′) / g2
Does order matter?No (addition)Yes (subtraction)
Memory aidFirst d-second plus second d-firstLow d-high minus high d-low, over low squared
Shortcut to try firstExpand if it is a simple polynomialRewrite as a product with a negative exponent

Step 9 of 13Learn

Product rule in the real world

Back to the coffee shop. Revenue is R(t) = p(t) · q(t), where p is the price per cup and q is the number of cups sold per month, both changing over time t (in months). The product rule says:

R'(t) = p'(t) · q(t) + p(t) · q'(t)

Each term has a clear meaning:

  • p' · q: revenue gained because the price is rising, applied to all the cups being sold.
  • p · q': revenue lost (or gained) because the number of cups is changing, at the current price.

Example. Right now the price is $5 and rising by $0.20 per month. The shop sells 3,000 cups a month, a number falling by 150 cups per month.

R' = (0.20)(3000) + (5)(−150) = 600 − 750 = −$150 per month

Even though the price is going up, revenue is falling, because customers are leaving faster than the price increase compensates. That's a real decision point for the owner.

The same pattern appears whenever a total is a product of two changing quantities: total payroll = (number of workers) × (average wage), power = voltage × current, area = length × width. In each case, the rate of change of the total combines both rates through the product rule.

Step 10 of 13Practice · Work it out

A store sells q = 400 units a month at price p = $15. The price is rising $1 per month and sales are falling by 20 units per month. How fast is revenue R = pq changing, in dollars per month?

Step 11 of 13Chart

Where the store’s revenue change comes from

Where the store’s revenue change comes fromBar chart with 3 categories: Price rising: p′q: $400; Sales falling: pq′: -$300; Net change R′: $100.-$400-$200$0$200$400Price rising: p′qSales falling: pq′Net change R′$400-$300$100
From the example: p = $15, q = 400, p′ = +$1, q′ = −20 units per month.
Where the store’s revenue change comes from
ItemDollars per month
Price rising: p′q$400
Sales falling: pq′-$300
Net change R′$100

Step 12 of 13Practice · Spot the mistake

Here is a student's work for the derivative of y = x² cos x. Tap the line with the first error.

Step 13 of 13Practice · Choose one

What is the derivative of f(x) = sin x cos x?