Search

Search papers and lessons

Product Rule

Level 1 · 8 min read

The product rule says the rate of change of a product of two functions is the first times the rate of the second, plus the second times the rate of the first.

On this page

  • Colour = topic mix
  • Calculus
  • Sign in to see your progress

TL;DR

When you multiply two changing quantities together, the product does not change at the rate of either one alone. The product rule gives the exact rate: take the first function times the rate of the second, then add the second function times the rate of the first. Two inputs that both move both contribute to the result.

Where you'll see it: in finding how the area of a rectangle changes when both its sides change, in the rate of change of momentum mvmv when both mass and velocity vary, and in differentiating almost any formula that multiplies two expressions in xx.

Intuition

A rectangle that grows on both sides

Picture a rectangle whose width and height both change over time. Its area is width times height. If only the width grows, the area grows by the height times the extra width. If only the height grows, the area grows by the width times the extra height. When both grow at once, you get both of those strips, plus a tiny corner piece that is so small it can be ignored when the change is infinitesimal.

That picture is the whole product rule. The area of a product is made of two strips: one for each factor moving while the other stays put.

The plot below shows one such rectangle. Its width is 3+2t3 + 2t and its height is 5−t5 - t, so its area is A(t)=(3+2t)(5−t)A(t) = (3+2t)(5-t). The curve rises, peaks, and falls. Its slope at any moment is what the product rule computes.

0123450510152025time tarea
  • area A(t)
The area of a rectangle with width 3 plus 2t and height 5 minus t. The marked point at t = 1 has area 20. The peak at t = 1.75 is where the slope is zero.

Why this is not just "multiply the rates"

It is tempting to guess that the rate of a product is the product of the rates. That guess is wrong. If the width grows by 2 per second and the height shrinks by 1 per second, the product of those rates is −2-2, but the area can still be increasing. The correct answer depends on the sizes of the factors as well as their rates, and the product rule accounts for both.

The math

Definition

Definition: Product rule

If ff and gg are differentiable functions of xx, then their product is differentiable and

ddx(f(x) g(x))=f′(x) g(x)+f(x) g′(x).\frac{d}{dx}\bigl(f(x)\,g(x)\bigr) = f'(x)\,g(x) + f(x)\,g'(x).

Here f′(x)f'(x) and g′(x)g'(x) are the derivatives of ff and gg, the rates at which each one changes. The rule says the product's rate is the derivative of the first times the second, plus the first times the derivative of the second. In shorthand, (fg)′=f′g+fg′(fg)' = f'g + fg'.

Where it comes from

Start from the definition of the derivative of h(x)=f(x)g(x)h(x) = f(x)g(x):

h′(x)=lim⁡ε→0f(x+ε) g(x+ε)−f(x) g(x)ε.h'(x) = \lim_{\varepsilon \to 0} \frac{f(x+\varepsilon)\,g(x+\varepsilon) - f(x)\,g(x)}{\varepsilon}.

The trick is to subtract and add the same term, f(x+ε) g(x)f(x+\varepsilon)\,g(x), in the numerator. This does not change its value:

f(x+ε)g(x+ε)−f(x)g(x)=f(x+ε)g(x+ε)−f(x+ε)g(x)+f(x+ε)g(x)−f(x)g(x)=f(x+ε)(g(x+ε)−g(x))+g(x)(f(x+ε)−f(x)).\begin{aligned} f(x+\varepsilon)g(x+\varepsilon) - f(x)g(x) &= f(x+\varepsilon)g(x+\varepsilon) - f(x+\varepsilon)g(x) + f(x+\varepsilon)g(x) - f(x)g(x) \\ &= f(x+\varepsilon)\bigl(g(x+\varepsilon) - g(x)\bigr) + g(x)\bigl(f(x+\varepsilon) - f(x)\bigr). \end{aligned}

Divide by ε\varepsilon and split the fraction:

f(x+ε)g(x+ε)−f(x)g(x)ε=f(x+ε) g(x+ε)−g(x)ε+g(x) f(x+ε)−f(x)ε.\frac{f(x+\varepsilon)g(x+\varepsilon) - f(x)g(x)}{\varepsilon} = f(x+\varepsilon)\,\frac{g(x+\varepsilon) - g(x)}{\varepsilon} + g(x)\,\frac{f(x+\varepsilon) - f(x)}{\varepsilon}.

Now let ε\varepsilon shrink to zero. The two fractions on the right approach g′(x)g'(x) and f′(x)f'(x). The factor f(x+ε)f(x+\varepsilon) approaches f(x)f(x), because a differentiable function is continuous. What remains is f(x) g′(x)+g(x) f′(x)f(x)\,g'(x) + g(x)\,f'(x), which is the product rule.

Worked example check

For a quick sanity check, use f(x)=xf(x) = x and g(x)=x2g(x) = x^2, so fg=x3fg = x^3. The product rule gives f′=1f' = 1, g′=2xg' = 2x, so (fg)′=1⋅x2+x⋅2x=3x2(fg)' = 1 \cdot x^2 + x \cdot 2x = 3x^2. This agrees with the power rule applied directly to x3x^3.

Worked examples

Example
Product of two simple functions

Let f(x)=x2f(x) = x^2 and g(x)=sin⁡xg(x) = \sin x. Find the derivative of h(x)=x2sin⁡xh(x) = x^2 \sin x at x=π/2x = \pi/2.

  1. Find the derivatives: f′(x)=2xf'(x) = 2x and g′(x)=cos⁡xg'(x) = \cos x.
  2. Apply the product rule: h′(x)=2xsin⁡x+x2cos⁡xh'(x) = 2x \sin x + x^2 \cos x.
  3. Evaluate at x=π/2x = \pi/2. We have sin⁡(π/2)=1\sin(\pi/2) = 1 and cos⁡(π/2)=0\cos(\pi/2) = 0, so h′(π/2)=2⋅π2⋅1+(π2)2⋅0=πh'(\pi/2) = 2 \cdot \frac{\pi}{2} \cdot 1 + \left(\frac{\pi}{2}\right)^2 \cdot 0 = \pi.

The slope of x2sin⁡xx^2 \sin x at x=π/2x = \pi/2 is exactly π≈3.14\pi \approx 3.14. Only the first term survives, because the cosine factor vanishes there.

Example
The growing rectangle, at t = 1

Use the rectangle from the Intuition section: width w(t)=3+2tw(t) = 3 + 2t and height h(t)=5−th(t) = 5 - t, so the area is A(t)=w(t) h(t)A(t) = w(t)\,h(t). Find how fast the area changes at t=1t = 1.

  1. At t=1t = 1: w=3+2=5w = 3 + 2 = 5 and h=5−1=4h = 5 - 1 = 4. So A(1)=5×4=20A(1) = 5 \times 4 = 20.
  2. The rates are w′(t)=2w'(t) = 2 and h′(t)=−1h'(t) = -1.
  3. Apply the product rule: A′(t)=w′(t) h(t)+w(t) h′(t)A'(t) = w'(t)\,h(t) + w(t)\,h'(t).
  4. Substitute: A′(1)=2×4+5×(−1)=8−5=3A'(1) = 2 \times 4 + 5 \times (-1) = 8 - 5 = 3.

The area is growing at 3 square units per unit of time at t=1t = 1. The width gains 2×4=82 \times 4 = 8 from its own growth, and the shrinking height takes back 55. The net gain is 3.

Check: expanding gives A(t)=15+7t−2t2A(t) = 15 + 7t - 2t^2, so A′(t)=7−4tA'(t) = 7 - 4t, and A′(1)=3A'(1) = 3. The two methods agree.

Example
Product with an exponential

Find the derivative of xexx e^x at x=1x = 1.

  1. Take f(x)=xf(x) = x and g(x)=exg(x) = e^x, so f′=1f' = 1 and g′=exg' = e^x.
  2. Apply the product rule: (xex)′=1⋅ex+x⋅ex=(1+x)ex(x e^x)' = 1 \cdot e^x + x \cdot e^x = (1 + x)e^x.
  3. At x=1x = 1: (1+1)e1=2e≈5.44(1 + 1)e^1 = 2e \approx 5.44.

The factor exe^x is its own derivative, so it appears on both sides of the rule.

Tradeoffs and failure modes

The product rule is exact for any two differentiable functions, but it is easy to misuse. Some common errors and when to use something else:

SituationWhat goes wrongBetter choice
Multiplying the two derivatives: (fg)′=f′g′(fg)' = f'g'Wrong in general. It drops the cross termsUse f′g+fg′f'g + fg'
Product of many factors, such as fghfghEasy to forget a termExtend the rule: (fgh)′=f′gh+fg′h+fgh′(fgh)' = f'gh + fg'h + fgh'
One factor is a constantUnnecessary workJust multiply the derivative by the constant
Product of two expressions that expand easilyProduct rule adds effortExpand first, then differentiate the polynomial

Two practical warnings. Label each factor before differentiating, since most mistakes come from pairing a derivative with the wrong factor. And watch signs: a decreasing factor has a negative derivative.

The rule applies only where both factors are differentiable. A product involving a non-differentiable factor (such as ∣x∣|x| at 00) may fail to be differentiable there.

History

Gottfried Wilhelm Leibniz developed the calculus of differentials in the 1670s and published his notation and basic differentiation rules in the 1680s. The product rule came out of that work, as did the notation ddx\frac{d}{dx} that the rule is usually written with. Isaac Newton worked on closely related ideas with his method of fluxions, and the two developed the subject roughly in parallel, which led to a long priority dispute.

The rule caught on because it turned a hard problem into bookkeeping. Without it, finding the slope of a product means returning to the limit definition each time. With it, you list the two factors and their derivatives, which made the formulas of physics and geometry practical to differentiate.

Check yourself

QuestionUse the product rule to differentiate h(x)=(2x+1)(x−3)h(x) = (2x + 1)(x - 3). What is h′(x)h'(x)?Show answer

Take f=2x+1f = 2x + 1 and g=x−3g = x - 3. Then f′=2f' = 2 and g′=1g' = 1, so h′(x)=2(x−3)+(2x+1)⋅1=2x−6+2x+1=4x−5h'(x) = 2(x - 3) + (2x + 1) \cdot 1 = 2x - 6 + 2x + 1 = 4x - 5. As a check, expanding gives h(x)=2x2−5x−3h(x) = 2x^2 - 5x - 3, whose derivative is 4x−54x - 5.

QuestionEvaluate the derivative of x3cos⁡xx^3 \cos x at x=0x = 0.Show answer

Let f=x3f = x^3 and g=cos⁡xg = \cos x. Then f′=3x2f' = 3x^2 and g′=−sin⁡xg' = -\sin x, so the derivative is 3x2cos⁡x−x3sin⁡x3x^2 \cos x - x^3 \sin x. At x=0x = 0, the first term is 3⋅0⋅1=03 \cdot 0 \cdot 1 = 0 and the second is 0⋅0=00 \cdot 0 = 0, so the answer is 0. The product is flat there, which makes sense because x3x^3 itself has a zero of order three at the origin.

QuestionWhy is it wrong to say the derivative of a product is the product of the derivatives, (fg)′=f′g′(fg)' = f'g'? Give a concrete example where the two differ.Show answer

The product of derivatives drops the terms where one factor is differentiated and the other is kept. Take f=g=xf = g = x. Then fg=x2fg = x^2 has derivative 2x2x, but f′g′=1⋅1=1f'g' = 1 \cdot 1 = 1. The correct product rule gives f′g+fg′=x+x=2xf'g + fg' = x + x = 2x, which matches.

QuestionA rectangle has width 4 metres, growing at 0.5 metres per second, and height 3 metres, shrinking at 1 metre per second. Is its area growing or shrinking, and at what rate?Show answer

Let A=whA = wh. Then A′=w′h+wh′=0.5×3+4×(−1)=1.5−4=−2.5A' = w'h + wh' = 0.5 \times 3 + 4 \times (-1) = 1.5 - 4 = -2.5. The area is shrinking at 2.5 square metres per second. The shrinking height outweighs the growing width, so this is a case where the naive guess (product of rates 0.5×(−1)=−0.50.5 \times (-1) = -0.5) gives the wrong magnitude.

Sources