Unit 2 · Topic 2.8 Beta

The Product Rule

4 min read · freeNot practiced

The sum rule says the derivative of a sum is the sum of the derivatives. It is tempting to guess that the derivative of a product is the product of the derivatives. It is not, and that guess is one of the most common errors in the whole course. This page shows why, gives the correct rule, and practices it on formulas, tables and graphs.

Why the guess fails

Try the simplest product: x⋅x=x2x \cdot x = x^2. Its derivative is 2x2x. The product of the derivatives is 1⋅1=11 \cdot 1 = 1. Those are different, so "multiply the derivatives" cannot be the rule. Something else must be going on.

A picture: a growing rectangle

Think of f(x)g(x)f(x)g(x) as the area of a rectangle with width ff and height gg. When xx increases a little, the width grows by Δf\Delta f and the height by Δg\Delta g.

A rectangle with width f and height g has area f times g. When x changes a little, the width grows by delta f and the height by delta g. The new area adds a strip g delta f on the right, a strip f delta g along the bottom, and a tiny corner delta f delta g. Dividing by delta x and letting delta x go to 0 makes the corner vanish, which gives (fg) prime = f prime g + f g prime.
Figure 1. The new area is the old area plus two strips and a tiny corner. LevlPrep original diagram.

The area gains three pieces: a strip gΔfg\,\Delta f along one side, a strip fΔgf\,\Delta g along the other, and a small corner ΔfΔg\Delta f\,\Delta g:

Δ(fg)=gΔf+fΔg+ΔfΔg.\Delta(fg) = g\,\Delta f + f\,\Delta g + \Delta f\,\Delta g.

Divide by Δx\Delta x and let Δx→0\Delta x \to 0. The first two pieces become gf′g\,f' and fg′f\,g'. The corner becomes ΔfΔx⋅Δg→f′⋅0=0\frac{\Delta f}{\Delta x} \cdot \Delta g \to f' \cdot 0 = 0: it is a small change times another small change, and it vanishes. What is left is the rule.

The product rule

If ff and gg are differentiable at xx,

ddx(f(x)g(x))=f′(x)g(x)+f(x)g′(x).\frac{d}{dx}\left( f(x)g(x) \right) = f'(x)g(x) + f(x)g'(x).

Say it as a sentence: the derivative of the first times the second, plus the first times the derivative of the second. Each factor takes a turn being differentiated while the other stays as it is. The order of the two terms does not matter, because they are added.

Check it on x⋅xx \cdot x: 1⋅x+x⋅1=2x1 \cdot x + x \cdot 1 = 2x. It agrees with the power rule.

Worked example 1. Differentiate y=x2sin⁡xy = x^2 \sin x.

First x2x^2, derivative 2x2x. Second sin⁡x\sin x, derivative cos⁡x\cos x.

y′y'=(2x)(sin⁡x)= (2x)(\sin x)+(x2)(cos⁡x)+ (x^2)(\cos x)=2xsin⁡x= 2x\sin x+x2cos⁡x+ x^2\cos x.

The wrong answer 2xcos⁡x2x\cos x multiplies the two derivatives; it is missing both of the real terms.

Worked example 2. Differentiate y=xexy = xe^x and write the tangent line at x=0x = 0.

y′y'=(1)(ex)= (1)(e^x)+(x)(ex)+ (x)(e^x)=ex(1+x)= e^x(1 + x).

At x=0x = 0: y=0y = 0 and y′=1y' = 1, so the tangent line is y=xy = x.

When not to use it

If one factor is a constant, the product rule still works, but the constant multiple rule is faster: (5x3)′=15x2(5x^3)' = 15x^2. And if a product simplifies easily, simplify first: x2⋅x5=x7x^2 \cdot x^5 = x^7, so the derivative is 7x67x^6. The product rule is for products that do not collapse, like x2sin⁡xx^2 \sin x or xln⁡x\sqrt{x}\,\ln x.

Products from a table or a graph

The rule works at a single input, which is how the exam usually asks it:

(fg)′(a)=f′(a)g(a)+f(a)g′(a).(fg)'(a) = f'(a)g(a) + f(a)g'(a).

It uses four numbers: two values and two derivatives. Reading the wrong column is the usual slip.

Worked example 3. A table gives f(1)=−1f(1) = -1, f′(1)=2f'(1) = 2, g(1)=3g(1) = 3, g′(1)=4g'(1) = 4. Find h′(1)h'(1) for h(x)=f(x)g(x)h(x) = f(x)g(x).

h′(1)h'(1)=f′(1)g(1)= f'(1)g(1)+f(1)g′(1)+ f(1)g'(1)=(2)(3)= (2)(3)+(−1)(4)+ (-1)(4)=6−4= 6 - 4=2= 2.

Not f′(1)g′(1)=8f'(1)g'(1) = 8, and not h(1)=−3h(1) = -3.

With a graph made of line segments, read each value from the graph and each derivative as the slope of the segment. At a corner of either graph, check the slope from each side; if the product's one-sided slopes differ, the product has no derivative there.

Three factors

For three factors, differentiate one at a time and add the three results:

(fgk)′=f′gk+fg′k+fgk′.(fgk)' = f'gk + fg'k + fgk'.

Worked example 4. Differentiate y=xexsin⁡xy = xe^x\sin x.

Differentiate xx: (1)exsin⁡x(1)e^x\sin x. Differentiate exe^x: x(ex)sin⁡xx(e^x)\sin x. Differentiate sin⁡x\sin x: xex(cos⁡x)xe^x(\cos x).

y′y'=exsin⁡x= e^x\sin x+xexsin⁡x+ xe^x\sin x+xexcos⁡x+ xe^x\cos x. Three factors, three terms; a missing term is the most common error with three factors.

Summary of the traps

WrongRight
(fg)′=f′g′(fg)' = f'g'(fg)′=f′g+fg′(fg)' = f'g + fg'
one term only, f′gf'gboth terms, added
two terms for three factorsthree terms
h(a)h(a) given as h′(a)h'(a)values and derivatives in their places

The next topic handles the other operation that the basic rules cannot: division.

Spot a mistake on this page?