Product Rule
The product rule tells you how to differentiate two functions multiplied together. The derivative of f(x)g(x) is the derivative of the first times the second, plus the first times the derivative of the second: (fg)' = f'g + fg'. It is not simply f′ times g′.
Before this lesson: Power Rule, Equation of a Tangent Line and Multiplying Polynomials
Why you need the product rule
The derivative of a sum is the sum of the derivatives. It is tempting to think products work the same way, but they don’t. Try y = x \cdot x^2. Since y = x^3, the true derivative is 3x^2. Multiplying the two derivatives gives 1 \cdot 2x = 2x, which is wrong.
Think of f(x)g(x) as the area of a rectangle with width f and height g. When x changes a little, both sides change. The area grows by a strip along one side (the change in f times g) plus a strip along the other side (f times the change in g). The tiny corner piece is so small that it disappears in the limit. Those two strips are the two terms of the product rule.
The product rule formula
\frac{d}{dx}\left[f(x)\,g(x)\right] = f'(x)\,g(x) + f(x)\,g'(x)In words: “derivative of the first times the second, plus the first times the derivative of the second.” Because addition can be done in either order, f'g + fg' and fg' + f'g are the same answer.
- Name the two factors f(x) and g(x).
- Find f′(x) and g′(x).
- Substitute all four pieces into f'g + fg'.
- Simplify by distributing and combining like terms.
Product rule examples
Example 1: Two polynomials
Find the derivative of y = (x^2 + 3)(4x - 1).
f(x) = x^2 + 3, \; g(x) = 4x - 1
Name the two factors.
f'(x) = 2x, \; g'(x) = 4
Differentiate each factor with the power rule.
y' = 2x(4x - 1) + (x^2 + 3)(4)
Substitute into f′g + fg′.
y' = 8x^2 - 2x + 4x^2 + 12
Distribute in each term (see distributive property).
y' = 12x^2 - 2x + 12
Combine like terms (see combining like terms).
Answer: y' = 12x^2 - 2x + 12. Check: expanding first gives y = 4x^3 - x^2 + 12x - 3, and the power rule gives the same derivative.
Example 2: A root times a polynomial
Differentiate y = \sqrt{x}\,(x^3 - 5). Expanding is possible here, but the product rule is faster.
f(x) = x^{1/2}, \; g(x) = x^3 - 5Name the factors and write the root as a power (see rational exponents).
f'(x) = \frac{1}{2}x^{-1/2}, \; g'(x) = 3x^2Differentiate each factor.
y' = \frac{1}{2}x^{-1/2}(x^3 - 5) + x^{1/2}(3x^2)Substitute into f′g + fg′.
y' = \frac{1}{2}x^{5/2} - \frac{5}{2}x^{-1/2} + 3x^{5/2}Distribute. Add exponents when you multiply powers: −½ + 3 = 5/2 (see exponent rules).
y' = \frac{7}{2}x^{5/2} - \frac{5}{2}x^{-1/2}Combine like terms: ½ + 3 = 7/2.
y' = \frac{7x^{5/2}}{2} - \frac{5}{2\sqrt{x}}Rewrite the negative power as a root in the denominator.
Answer: y' = \frac{7}{2}x^{5/2} - \frac{5}{2\sqrt{x}}, for x \gt 0.
Example 3: Tangent line with the product rule
Find the equation of the tangent line to h(x) = (2x - 1)(x^2 + x + 1) at x = 1.
h(1) = (2 - 1)(1 + 1 + 1) = 3
Find the point. The tangent line passes through (1, 3).
h'(x) = 2(x^2 + x + 1) + (2x - 1)(2x + 1)
Product rule: f′ = 2 and g′ = 2x + 1.
h'(1) = 2(3) + (1)(3)
Substitute x = 1.
h'(1) = 6 + 3 = 9
Multiply, then add. The slope is 9.
y - 3 = 9(x - 1)
Use point-slope form (see point-slope form).
y - 3 = 9x - 9
Distribute 9.
y = 9x - 6
Add 3 to both sides.
Answer: the tangent line is y = 9x - 6.
Example 4: Using a table of values
You know only these values: f(2) = 3, f′(2) = −1, g(2) = 5 and g′(2) = 4. Find the derivative of p(x) = f(x)g(x) at x = 2.
p'(2) = f'(2)g(2) + f(2)g'(2)
Write the product rule at x = 2.
p'(2) = (-1)(5) + (3)(4)
Substitute the four values.
p'(2) = -5 + 12
Multiply each pair.
p'(2) = 7
Add.
Answer: p'(2) = 7. Notice that you never needed formulas for f or g. Problems like this are common on the AP Calculus exam.
Example 5: Word problem with revenue
A store’s revenue is price times units sold: R(t) = p(t)\,q(t), with t in months. Right now the price is $20 and rising by $0.50 per month, and sales are 300 units per month and falling by 10 units per month. Is revenue rising or falling, and how fast?
p = 20, \; p' = 0.5, \; q = 300, \; q' = -10
List the values. A falling quantity has a negative rate.
R' = p'q + pq'
Write the product rule for R = pq.
R' = (0.5)(300) + (20)(-10)
Substitute the four values.
R' = 150 - 200
Multiply each pair.
R' = -50
Subtract.
Answer: revenue is falling by about $50 per month right now. The price increase adds $150 per month, but the drop in sales costs $200 per month.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Multiplying the two derivatives | For x^2(x^3 + 1): “y' = 2x \cdot 3x^2 = 6x^3“ | Use f'g + fg': 2x(x^3 + 1) + x^2(3x^2) = 5x^4 + 2x. |
| Differentiating only one factor | “y' = 2x(x^3 + 1)“ | Both factors change, so there are two terms. |
| Dropping parentheses | 2x \cdot 4x - 1 for 2x(4x - 1) | Keep each factor in parentheses until you distribute. |
| Using the product rule on a constant multiple | For 5x^3: two terms with a derivative of 5 | It works, but it’s slower. Use the constant multiple rule: 15x^2. |
| Forgetting the sign of a decreasing rate | Writing q′ = 10 when sales fall by 10 | A quantity that is falling has a negative rate: q′ = −10. |
Related methods
Expanding first
When both factors are polynomials, you can multiply them out and use the power rule. Both methods give the same answer, as Example 1 shows. The product rule is the better choice when expanding is long, or when a factor is not a polynomial (later you’ll multiply by sin x, eˣ or ln x, where expanding is impossible).
Three or more factors
For three factors, differentiate one factor at a time and add the results: (fgh)' = f'gh + fg'h + fgh'. Each term has exactly one factor differentiated.
Why the product rule works
Start from the definition of the derivative and add and subtract f(x + h)g(x) in the numerator:
\frac{f(x+h)g(x+h) - f(x+h)g(x) + f(x+h)g(x) - f(x)g(x)}{h} = f(x+h)\frac{g(x+h) - g(x)}{h} + g(x)\frac{f(x+h) - f(x)}{h}As h → 0, f(x + h) → f(x) because a differentiable function is continuous, and the two fractions become g′(x) and f′(x). That leaves f(x)g'(x) + g(x)f'(x).
Practice problems
- Differentiate y = (x + 4)(x - 2).
- Differentiate y = (3x^2 - 1)(x + 5).
- Differentiate y = x^3(2x^2 + 7).
- Differentiate y = (x^2 - x)(x^2 + x).
- Find f′(4) for f(x) = \sqrt{x}\,(x + 6).
- If f(1) = 2, f′(1) = 3, g(1) = −4 and g′(1) = 5, find (fg)′(1).
- Find the tangent line to y = (x^2 + 1)(x - 3) at x = 2.
- Differentiate y = \frac{1}{x}(x^2 + 4) with the product rule.
- Find y′(1) for y = x(x + 1)(x + 2).
- A rectangle is 12 cm long and 5 cm wide. Its length is growing at 3 cm/s while its width is shrinking at 1 cm/s. How fast is its area changing?
Show answers
1.
y' = (1)(x - 2) + (x + 4)(1)
Product rule: both factors have derivative 1.
y' = x - 2 + x + 4
Remove the parentheses.
y' = 2x + 2
Combine like terms.
Answer: y' = 2x + 2
2.
y' = 6x(x + 5) + (3x^2 - 1)(1)
Product rule: f′ = 6x and g′ = 1.
y' = 6x^2 + 30x + 3x^2 - 1
Distribute.
y' = 9x^2 + 30x - 1
Combine like terms.
Answer: y' = 9x^2 + 30x - 1
3.
y' = 3x^2(2x^2 + 7) + x^3(4x)
Product rule: f′ = 3x² and g′ = 4x.
y' = 6x^4 + 21x^2 + 4x^4
Distribute.
y' = 10x^4 + 21x^2
Combine like terms.
Answer: y' = 10x^4 + 21x^2
4.
y' = (2x - 1)(x^2 + x) + (x^2 - x)(2x + 1)
Product rule.
y' = (2x^3 + x^2 - x) + (2x^3 - x^2 - x)
Multiply each pair of binomials and combine like terms inside each.
y' = 4x^3 - 2x
Combine like terms.
Answer: y' = 4x^3 - 2x
5.
f'(x) = \frac{1}{2\sqrt{x}}(x + 6) + \sqrt{x}(1)Product rule: the derivative of \sqrt{x} is \frac{1}{2\sqrt{x}}.
f'(4) = \frac{1}{2 \cdot 2}(10) + 2Substitute x = 4. Note \sqrt{4} = 2.
f'(4) = \frac{10}{4} + 2 = 2.5 + 2Simplify the fraction.
f'(4) = 4.5
Add.
Answer: f′(4) = 4.5
6.
(fg)'(1) = f'(1)g(1) + f(1)g'(1)
Product rule at x = 1.
(fg)'(1) = (3)(-4) + (2)(5)
Substitute the values.
(fg)'(1) = -12 + 10 = -2
Multiply, then add.
Answer: −2
7.
y(2) = (4 + 1)(2 - 3) = -5
Find the point (2, −5).
y' = 2x(x - 3) + (x^2 + 1)(1)
Product rule.
y'(2) = 4(-1) + 5 = 1
Substitute x = 2. The slope is 1.
y + 5 = 1(x - 2)
Point-slope form.
y = x - 7
Subtract 5 from both sides.
Answer: y = x - 7
8.
y = x^{-1}(x^2 + 4)Write 1/x as a power (see negative exponents).
y' = -x^{-2}(x^2 + 4) + x^{-1}(2x)Product rule: the derivative of x^{-1} is -x^{-2}.
y' = -1 - 4x^{-2} + 2Distribute and simplify each power.
y' = 1 - \frac{4}{x^2}Combine like terms and rewrite with a positive exponent.
Answer: y' = 1 - \frac{4}{x^2}
9.
y' = (1)(x + 1)(x + 2) + x(1)(x + 2) + x(x + 1)(1)
Three-factor product rule: differentiate one factor in each term.
y'(1) = (2)(3) + (1)(3) + (1)(2)
Substitute x = 1.
y'(1) = 6 + 3 + 2 = 11
Multiply, then add.
Answer: y′(1) = 11
10.
A' = L'W + LW'
Area is A = LW, so use the product rule.
A' = (3)(5) + (12)(-1)
Substitute L = 12, L′ = 3, W = 5 and W′ = −1.
A' = 15 - 12 = 3
Multiply, then subtract.
Answer: the area is growing at 3 cm²/s.
Product rule FAQ
What is the product rule formula?
\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x). Differentiate one factor at a time, keep the other, and add the two results.
Is the derivative of a product the product of the derivatives?
No. For x \cdot x^2 = x^3, the derivative is 3x^2, but the product of the derivatives is only 2x. You need both terms of the product rule.
When should I use the product rule instead of expanding?
Expanding works for short polynomial products. Use the product rule when expanding is long or impossible, such as a root times a polynomial, or later, x times sin x.
How do you use the product rule with three functions?
Add three terms, each with one factor differentiated: (fgh)' = f'gh + fg'h + fgh'.
Summary
- The product rule: (fg)' = f'g + fg'.
- The derivative of a product is not the product of the derivatives.
- Name the factors, differentiate each, substitute, then simplify.
- With a table of values, plug the four numbers straight into the rule.
- For three factors, add three terms, each with one factor differentiated.
Previous lesson: Position, Velocity and Acceleration
Next lesson: Quotient Rule
Back to the Calculus 1 Index