Unit 2: Differentiation: Definition and Fundamental Properties
The Product Rule
Differentiate a product of two or more functions, given by formulas or by tables of values, and see from a growing rectangle why the rule has two terms.
Topic 2.8 · 6 min read
The derivative of a sum is the sum of the derivatives (topic 2.6), so it is tempting to guess that the derivative of a product is the product of the derivatives. Test the guess on x⋅x=x2: each factor has derivative 1, so the guess says the derivative is 1⋅1=1, but the derivative of x2 is 2x. The correct rule has two terms, f′g+fg′, and the reason is visible in the area of a rectangle.
Why a product's derivative has two terms
Picture f(x)g(x) as the area of a rectangle with width f(x) and height g(x). Now let x increase by a small amount Δx. The width grows by Δf and the height by Δg, and the rectangle gains three new pieces.
The change in area is
Δ(fg)=gΔf+fΔg+ΔfΔg.
Divide by Δx to get an average rate of change:
ΔxΔ(fg)=gΔxΔf+fΔxΔg+Δf⋅ΔxΔg.
As Δx→0, the first two fractions become f′ and g′. In the last term, ΔxΔg approaches g′, but it is multiplied by Δf, which shrinks to 0. The corner is small in both directions, so it disappears in the limit, and what remains is gf′+fg′. Each term is one factor's change while the other factor is held at its current value.
The same argument works with the limit definition. Adding and subtracting f(x+h)g(x) in the numerator splits it into one piece where only g changes and one where only f changes:
As h→0 the fractions approach g′(x) and f′(x). The factor f(x+h) approaches f(x) because a function that is differentiable at x is continuous there (topic 2.4). That continuity is the formal reason the corner term vanishes.
Because the two terms are added, their order doesn't matter, and you can write fg′+f′g just as well. The rule agrees with what you already know. With a constant k as one factor, it gives dxd[kf(x)]=0⋅f(x)+kf′(x)=kf′(x), the constant multiple rule. With x⋅x it gives 1⋅x+x⋅1=2x.
Using the rule
The product rule is needed whenever two factors both depend on x and you can't simply multiply them out: x3lnx, exsinx, x2cosx. Label the factors, find each derivative, then assemble. For y=x3lnx with x>0, the factors are x3 (derivative 3x2) and lnx (derivative x1), so
dxdy=3x2lnx+x3⋅x1=3x2lnx+x2=x2(3lnx+1).
Factoring at the end isn't required for a derivative, but it is what you want when the next step is solving dxdy=0. Here, since x2>0, the derivative is 0 exactly when lnx=−31, that is, at x=e−1/3.
A product of two polynomials can be expanded instead, and both routes give the same derivative. If you do use the product rule on polynomials, simplify carefully; expanding first is often less work.
Products of three factors
For fgk, treat fg as one factor and apply the rule twice:
[(fg)k]′=(fg)′k+(fg)k′=f′gk+fg′k+fgk′.
The pattern: one term for each factor, in which that factor alone is differentiated. For y=xexsinx,
dxdy=exsinx+xexsinx+xexcosx.
Products from tables and graphs
When f and g are given only by values, the product rule needs four numbers, all at the same input: f(a), f′(a), g(a) and g′(a). If f(2)=3, f′(2)=−1, g(2)=4 and g′(2)=5, then the derivative of f(x)g(x) at x=2 is (−1)(4)+(3)(5)=11. Notice that the function values matter as much as the derivatives: each derivative is weighted by the other factor's current value.
Worked examples
Worked exampleExample 1: formulas, and a check by expanding
Find dxdy.
(a) y=exsinx
(b) y=(2x2−1)(x3+4x)
Show solution
(a) The factors are ex and sinx, with derivatives ex and cosx (topic 2.7):
dxdy=exsinx+excosx=ex(sinx+cosx).
(b) With the product rule, the factor derivatives are 4x and 3x2+4:
Expanding first gives y=2x5+7x3−4x, whose derivative is 10x4+21x2−4, the same answer.
Worked exampleExample 2: horizontal tangent lines
Let f(x)=(x2−3)ex. Find all x where the graph of f has a horizontal tangent line.
Show solution
By the product rule,
f′(x)=2xex+(x2−3)ex=ex(x2+2x−3)=ex(x+3)(x−1).
Factoring out ex is the key move: ex>0 for every x, so f′(x)=0 only when (x+3)(x−1)=0. The horizontal tangent lines are at x=−3 and x=1.
Worked exampleExample 3: products from a table (no calculator)
The functions f and g are differentiable. The table gives selected values.
x13f(x)25f′(x)−13g(x)−31g′(x)4−2
(a) Let h(x)=f(x)g(x). Find h′(1).
(b) Let p(x)=x2f(x). Find p′(3).
(c) Let q(x)=[g(x)]2. Find q′(3).
Show solution
Write each derivative in general before substituting, so every lookup is visible.
(a) h′(x)=f′(x)g(x)+f(x)g′(x), so
h′(1)=(−1)(−3)+(2)(4)=3+8=11.
(b) The factors are x2 and f(x), so p′(x)=2xf(x)+x2f′(x) and
p′(3)=2(3)(5)+9(3)=30+27=57.
(c) Write q(x)=g(x)⋅g(x). The product rule gives q′(x)=g′(x)g(x)+g(x)g′(x)=2g(x)g′(x), so
q′(3)=2(1)(−2)=−4.
The chain rule (topic 3.1) gives the same formula for the square of a function; the product rule gets there with what you have now.
Worked exampleExample 4: an exam-style free-response question (no calculator)
The function g is differentiable for all x, with g(0)=3 and g′(0)=−2. Let h(x)=(2+sinx)g(x) and k(x)=xexg(x).
(a) Is h increasing or decreasing at x=0? Give a reason for your answer.
(b) Write an equation for the line tangent to the graph of h at x=0.
(c) Find k′(0).
Show solution
(a) By the product rule, h′(x)=cosx⋅g(x)+(2+sinx)g′(x). At x=0,
h′(0)=(1)(3)+(2)(−2)=−1.
Since h′(0)=−1<0, h is decreasing at x=0. The reason must point to the sign of h′(0); a value of h alone says nothing about direction.
(b) The point is h(0)=(2+0)(3)=6 and the slope is h′(0)=−1, so the tangent line is y=6−x.
(c) k has three factors, x, ex and g(x), so it has three terms, each differentiating one factor:
k′(x)=1⋅exg(x)+xexg(x)+xexg′(x).
At x=0 the factor x makes the last two terms 0, and
k′(0)=1⋅1⋅3+0+0=3.
You never needed g′(0) for (c), because it is multiplied by x=0.
Where students lose points
On the exam
Product-rule questions on the exam can combine the rule with values from a table or graph, or with a follow-up such as a tangent line or a decision about whether a function is increasing. In a free-response answer, writing the general derivative (for example, h′(x)=f′(x)g(x)+f(x)g′(x)) before substituting shows the method. An unsimplified numeric answer such as (−1)(−3)+(2)(4) is acceptable on no-calculator parts.
Check yourself
Question 1
If y=x2cosx, then dxdy=
A
2xcosx+x2sinx
B
−2xsinx
C
2xcosx−x2sinx
D
2x−sinx
Show answer
C
The product rule gives 2x⋅cosx+x2⋅(−sinx). Choice A has the wrong sign on the derivative of cosine, and choice B multiplies the two derivatives.
Question 2
The function f is differentiable with f(4)=3 and f′(4)=−2. Let h(x)=xf(x). Find h′(4).
Show answer
h′(4)=−413
h′(x)=2x1f(x)+xf′(x), so h′(4)=41(3)+2(−2)=43−4=−413.
Question 3
Differentiable functions f and g have f(1)=0, f′(1)=5 and g(1)=7, but g′(1) is unknown. Can you find the derivative of f(x)g(x) at x=1? If so, what is it?
Show answer
Yes. It is 35.
The product rule gives f′(1)g(1)+f(1)g′(1)=5(7)+0⋅g′(1)=35. The unknown g′(1) is multiplied by f(1)=0, so its value doesn't matter.
Question 4
What is the slope of the graph of y=xlnx at x=e?
A
e1
B
1
C
2
D
e
Show answer
C
dxdy=1⋅lnx+x⋅x1=lnx+1, which is 1+1=2 at x=e. Choice A multiplies the derivatives 1 and e1, and choice B keeps only the second term.