Dove's LibraryDove's Library

2.8 - The Product Rule

Introduction

When you need the derivative of two functions multiplied together, you use the product rule.

The Formula

If y=f(x)⋅g(x)y = f(x) \cdot g(x), where both ff and gg are functions of xx:
ddx[f⋅g]=f′⋅g+f⋅g′\frac{d}{dx}[f \cdot g] = f' \cdot g + f \cdot g'
In words:
  • Take the derivative of the first function
  • Multiply by the second function unchanged
  • Add the first function unchanged
  • Multiplied by the derivative of the second
Memory aid: “first times derivative of second, plus derivative of first times second.”

Alternative Notations

Different textbooks use different letters:
ddx[u⋅v]=u′v+uv′orddx[a⋅b]=a′b+ab′\frac{d}{dx}[u \cdot v] = u'v + uv' \qquad \text{or} \qquad \frac{d}{dx}[a \cdot b] = a'b + ab'
They all mean the same thing. Use whichever your teacher prefers.

Basic Examples

Example 1: Polynomial Times Trig Function

Find the derivative of f(x)=5x2⋅cos⁡xf(x) = 5x^2 \cdot \cos x.
Identify the two pieces:
  • First: f=5x2f = 5x^2, so f′=10xf' = 10x
  • Second: g=cos⁡xg = \cos x, so g′=−sin⁡xg' = -\sin x
Apply the rule:
f′(x)=(10x)(cos⁡x)+(5x2)(−sin⁡x)=10xcos⁡x−5x2sin⁡xf'(x) = (10x)(\cos x) + (5x^2)(-\sin x) = 10x\cos x - 5x^2\sin x

Example 2: Exponential Times Radical

Differentiate g(x)=3ex⋅xg(x) = 3e^x \cdot \sqrt{x}.
  • First: 3ex3e^x, derivative 3ex3e^x
  • Second: x\sqrt{x}, derivative 12x\frac{1}{2\sqrt{x}}
g′(x)=(3ex)(x)+(3ex)(12x)=3exx+3ex2xg'(x) = (3e^x)(\sqrt{x}) + (3e^x)\left(\frac{1}{2\sqrt{x}}\right) = 3e^x\sqrt{x} + \frac{3e^x}{2\sqrt{x}}
Can you simplify? Yes, factor out 3ex3e^x:
g′(x)=3ex(x+12x)g'(x) = 3e^x\left(\sqrt{x} + \frac{1}{2\sqrt{x}}\right)
Get a common denominator inside:
=3ex(2x2x+12x)=3ex(2x+12x)= 3e^x\left(\frac{2x}{2\sqrt{x}} + \frac{1}{2\sqrt{x}}\right) = 3e^x\left(\frac{2x + 1}{2\sqrt{x}}\right)
All of these forms are fine:
  • 3exx+3ex2x3e^x\sqrt{x} + \frac{3e^x}{2\sqrt{x}} (expanded)
  • 3ex(x+12x)3e^x\left(\sqrt{x} + \frac{1}{2\sqrt{x}}\right) (factored)
  • 3ex(2x+1)2x\frac{3e^x(2x + 1)}{2\sqrt{x}} (combined)

When NOT to Use the Product Rule

Don’t use it for constant multiples. Take h(x)=7sin⁡xh(x) = 7\sin x. That’s a constant times a function, not a product of two variable functions.
h′(x)=7cos⁡xh'(x) = 7\cos x
Just use the constant multiple rule.
Do use it for h(x)=x⋅sin⁡xh(x) = x \cdot \sin x, where both factors contain the variable:
h′(x)=(1)(sin⁡x)+(x)(cos⁡x)=sin⁡x+xcos⁡xh'(x) = (1)(\sin x) + (x)(\cos x) = \sin x + x\cos x
Rule of thumb: only use the product rule when both factors contain variables.

More Complex Examples

Example 3: Rational Function Times Polynomial

Find the derivative of h(x)=(1x+2)(3x2−4)h(x) = \left(\dfrac{1}{x} + 2\right)(3x^2 - 4).
  • First: f=1x+2f = \frac{1}{x} + 2, so f′=−1x2f' = -\frac{1}{x^2}
  • Second: g=3x2−4g = 3x^2 - 4, so g′=6xg' = 6x
h′(x)=(−1x2)(3x2−4)+(1x+2)(6x)h'(x) = \left(-\frac{1}{x^2}\right)(3x^2 - 4) + \left(\frac{1}{x} + 2\right)(6x)
Distribute the first term:
=−3+4x2+(1x+2)(6x)= -3 + \frac{4}{x^2} + \left(\frac{1}{x} + 2\right)(6x)
Distribute the second:
=−3+4x2+6+12x= -3 + \frac{4}{x^2} + 6 + 12x
Combine like terms:
h′(x)=12x+3+4x2h'(x) = 12x + 3 + \frac{4}{x^2}

Example 4: Two Trig Functions

Differentiate f(x)=sin⁡x⋅cos⁡xf(x) = \sin x \cdot \cos x.
  • First: sin⁡x\sin x, derivative cos⁡x\cos x
  • Second: cos⁡x\cos x, derivative −sin⁡x-\sin x
f′(x)=(cos⁡x)(cos⁡x)+(sin⁡x)(−sin⁡x)=cos⁡2x−sin⁡2xf'(x) = (\cos x)(\cos x) + (\sin x)(-\sin x) = \cos^2 x - \sin^2 x
You could also write this as cos⁡(2x)\cos(2x) using a trig identity, but you don’t have to.

Using Tables with the Product Rule

Sometimes you get function values in a table instead of actual formulas.

Example 5: Table-Based Problem

Find h′(3)h'(3) where h(x)=2f(x)⋅g(x)h(x) = 2f(x) \cdot g(x).
xx
f(x)f(x)
f′(x)f'(x)
g(x)g(x)
g′(x)g'(x)
3
5
-3
2
4
Step 1: Set up the product rule. The 2 is a constant multiple, so it factors out front.
h′(x)=2[f′(x)⋅g(x)+f(x)⋅g′(x)]h'(x) = 2[f'(x) \cdot g(x) + f(x) \cdot g'(x)]
Step 2: Evaluate at x=3x = 3 and substitute from the table.
h′(3)=2[(−3)(2)+(5)(4)]=2[−6+20]=2[14]=28h'(3) = 2[(-3)(2) + (5)(4)] = 2[-6 + 20] = 2[14] = 28

Example 6: Another Table Problem

Using the same table, find k′(3)k'(3) where k(x)=12[4−g(x)]⋅f(x)k(x) = \frac{1}{2}[4 - g(x)] \cdot f(x).
xx
f(x)f(x)
f′(x)f'(x)
g(x)g(x)
g′(x)g'(x)
3
5
-3
2
4
Step 1: Identify what’s being multiplied.
  • First: 4−g(x)4 - g(x), derivative −g′(x)-g'(x)
  • Second: f(x)f(x), derivative f′(x)f'(x)
Step 2: Apply the product rule with the 12\frac{1}{2} pulled out.
k′(x)=12[(−g′(x))⋅f(x)+(4−g(x))⋅f′(x)]k'(x) = \frac{1}{2}[(-g'(x)) \cdot f(x) + (4 - g(x)) \cdot f'(x)]
Step 3: Evaluate at x=3x = 3.
k′(3)=12[(−4)(5)+(4−2)(−3)]=12[−20−6]=12[−26]=−13k'(3) = \frac{1}{2}[(-4)(5) + (4 - 2)(-3)] = \frac{1}{2}[-20 - 6] = \frac{1}{2}[-26] = -13

Multiple Forms of the Same Answer

Different algebra can give you equivalent answers that look totally different. For g(x)=ex⋅xg(x) = e^x \cdot \sqrt{x}:
g′(x)=exx+ex2x=ex(x+12x)=ex(2x+1)2xg'(x) = e^x\sqrt{x} + \frac{e^x}{2\sqrt{x}} = e^x\left(\sqrt{x} + \frac{1}{2\sqrt{x}}\right) = \frac{e^x(2x + 1)}{2\sqrt{x}}
All correct. On free response, any of them should get full credit. On multiple choice, you may have to manipulate yours to match an option.

Common Mistakes

Mistake 1: Forgetting to add both terms.
Wrong: ddx[x2sin⁡x]=2xcos⁡x\frac{d}{dx}[x^2 \sin x] = 2x \cos x
Right: ddx[x2sin⁡x]=2xsin⁡x+x2cos⁡x\frac{d}{dx}[x^2 \sin x] = 2x \sin x + x^2 \cos x
You need both terms.
Mistake 2: Using the product rule on constants.
Wrong (well, unnecessary): for f(x)=5x3f(x) = 5x^3, writing f′(x)=0⋅x3+5⋅3x2=15x2f'(x) = 0 \cdot x^3 + 5 \cdot 3x^2 = 15x^2
Right: just use the constant multiple rule and get f′(x)=15x2f'(x) = 15x^2.
Mistake 3: Mixing up which function is first.
Order doesn’t actually change the final answer since addition is commutative, but staying consistent helps you avoid errors, especially once you get to the quotient rule.

Practice Problems

Problem 1. Find the derivative: f(x)=x3⋅exf(x) = x^3 \cdot e^x
f′(x)=3x2ex+x3ex=ex(3x2+x3)f'(x) = 3x^2 e^x + x^3 e^x = e^x(3x^2 + x^3)
Problem 2. Differentiate: g(x)=(2x+1)(sin⁡x)g(x) = (2x + 1)(\sin x)
g′(x)=2sin⁡x+(2x+1)cos⁡xg'(x) = 2\sin x + (2x + 1)\cos x
Problem 3. Find h′(x)h'(x) for h(x)=xln⁡xh(x) = x \ln x
h′(x)=(1)(ln⁡x)+(x)(1x)=ln⁡x+1h'(x) = (1)(\ln x) + (x)\left(\frac{1}{x}\right) = \ln x + 1
Problem 4. Find p′(2)p'(2) where p(x)=f(x)⋅g(x)p(x) = f(x) \cdot g(x):
xx
f(x)f(x)
f′(x)f'(x)
g(x)g(x)
g′(x)g'(x)
2
3
4
-1
5
p′(2)=(4)(−1)+(3)(5)=−4+15=11p'(2) = (4)(-1) + (3)(5) = -4 + 15 = 11

Key Takeaways

  • Product rule: ddx[f⋅g]=f′⋅g+f⋅g′\frac{d}{dx}[f \cdot g] = f' \cdot g + f \cdot g'
  • Use it when both factors contain variables
  • Don’t use it for constant multiples
  • Both terms have to be there, it’s a sum
  • Order doesn’t affect the final answer
  • Multiple simplified forms can all be correct
  • On multiple choice you may need to manipulate your answer to match
  • With tables, read the correct row carefully
  • Factor out constants at the start to make life easier

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.