§ 01What Is the Product Rule?
The product rule answers a simple but surprisingly tricky question: how do you differentiate two functions that are multiplied together?
In calculus, we often encounter functions like y = x³ · sin x or y = eˣ · ln x, two separate functions sitting side by side, multiplied. Instinct might suggest: just differentiate each one and multiply the results. That instinct is wrong, and understanding why it is wrong will help the correct formula stick.
Consider f(x) = x² and g(x) = x³. Their product is f · g = x⁵, whose derivative is 5x⁴. Now try multiplying the individual derivatives: f′ = 2x and g′ = 3x², so f′ · g′ = 2x · 3x² = 6x³. That is clearly not 5x⁴. The rule "multiply the derivatives" fails because multiplication interacts with limits in a more complex way than addition does.
The sum rule works term by term: d/dx[f + g] = f′ + g′. But the product rule is different, it produces a sum of two cross terms, not a single product.
In words: differentiate the first function and multiply by the second, then add the first function multiplied by the derivative of the second. This is sometimes remembered as "d-first times second, plus first times d-second."
§ 02Proof from First Principles
The product rule is not handed down from authority, it can be derived from the fundamental limit definition of the derivative. Here is the full argument.
We want to find the derivative of h(x) = u(x) · v(x). Using the limit definition:
Write the definition of h′(x) using the limit:
h′(x) = lim[h→0] [u(x+h)v(x+h) − u(x)v(x)] ÷ h We are applying the standard derivative definition h(x) = u(x)v(x), so h(x+Δx) = u(x+h)·v(x+h).Add and subtract the term u(x) · v(x+h) inside the numerator. This is the key algebraic trick, we are adding zero (since we add and subtract the same thing), but it breaks the expression into two useful pieces:
= lim[h→0] [u(x+h)v(x+h) − u(x)v(x+h) + u(x)v(x+h) − u(x)v(x)] ÷ h Check: the +u(x)v(x+h) and −u(x)v(x+h) cancel each other out, so the numerator is unchanged.Group the numerator into two separate fractions, the first involving changes in u, the second involving changes in v:
= lim[h→0] v(x+h) · [u(x+h) − u(x)] ÷ h + lim[h→0] u(x) · [v(x+h) − v(x)] ÷ hEvaluate each limit separately as h → 0:
[u(x+h) − u(x)] ÷ h → u′(x) (by definition of the derivative) [v(x+h) − v(x)] ÷ h → v′(x) (by definition of the derivative) v(x+h) → v(x) (since v is continuous, as h → 0 the argument converges) We need u and v to be differentiable — and differentiable functions are automatically continuous.Assemble the result:
h′(x) = v(x) · u′(x) + u(x) · v′(x) = u′v + uv′ ✓ This is the product rule. The proof shows exactly why there are two terms — one from the change in u, one from the change in v.This proof is worth understanding, not just memorising. The "add and subtract a middle term" trick is one of the most useful manoeuvres in mathematical analysis: you will see it again in many different proofs.
§ 03How to Apply the Product Rule — Step by Step
The product rule is mechanical once you establish a clear routine. Follow these four steps every time.
- Step 1: Identify the two functions being multiplied. Call them u and v.
- Step 2: Differentiate u to get u′. Differentiate v to get v′.
- Step 3: Apply the formula: dy/dx = u′v + uv′.
- Step 4: Simplify, factorise if possible, and check for common factors.
Step 1: u = x², v = sin x
Step 2: u′ = 2x, v′ = cos x
Step 3: dy/dx = u′v + uv′
= 2x · sin x + x² · cos x
Step 4: Factorise x:
= x(2 sin x + x cos x)
Notation Choices
You may see the product rule written in several equivalent ways. All of the following mean exactly the same thing:
- dy/dx = u′v + uv′ (most common in British A-level and university courses)
- (uv)′ = u′v + uv′ (prime notation, more compact)
- d/dx[f·g] = f′g + fg′ (function notation)
- d(uv)/dx = v·du/dx + u·dv/dx (Leibniz notation in full)
Get comfortable with all of them, since textbooks and lecturers vary in which form they prefer.
The Triple Product Extension
When three functions are multiplied together, say y = u · v · w, the product rule extends naturally. You can either group (uv) as a single unit and apply the two-function rule, or use the direct generalisation:
dy/dx = u′vw + uv′w + uvw′
The pattern is clear: each term differentiates exactly one factor while leaving the other two untouched. There are three such terms because there are three factors, each getting "its turn" to be differentiated.
§ 04Common Mistakes
Most errors with the product rule fall into three categories. Recognise them now so you do not repeat them in an exam.
Why it's wrong: This differentiates each function and multiplies the results. But as the counterexample with x² and x³ showed, this does not give the correct derivative of their product.
Correct: d/dx[x² · sin x] = 2x · sin x + x² · cos x ✓
The product rule always produces a sum of two terms, not a single product.
Why it's wrong: sin(x²) is a composite function — x² is inside the sine function. It is not a product. The product rule applies when two functions are being multiplied. When one function is nested inside another, you need the chain rule instead.
How to tell the difference: If you can write it as f(x) · g(x) — two separate functions side by side — it is a product. If there is a function inside another function, it is a composition.
Why it's wrong: The formula requires both combinations: u′v AND uv′. Leaving out one term gives an incomplete answer.
Correct: d/dx[x³ · eˣ] = 3x² · eˣ + x³ · eˣ = x²eˣ(3 + x) ✓
Why it's wrong: When one of your factors is itself a composite function — like (2x+1)³ — you must use the chain rule to find its derivative. Here, v′ = 3(2x+1)² · 2 = 6(2x+1)².
Rule of thumb: Before writing down v′, always ask yourself — is v a simple function, or is there something inside something? If inside, chain rule applies.
§ 05Standard Derivatives You Need to Know
The product rule only moves you forward if you already know the derivatives of the individual functions. These are the ones that appear most often.
d/dx[eˣ] = eˣ
d/dx[aˣ] = aˣ ln a (a is a positive constant)
d/dx[ln x] = 1/x
d/dx[sin x] = cos x
d/dx[cos x] = −sin x (note the minus sign)
d/dx[tan x] = sec²x
d/dx[sec x] = sec x tan x
d/dx[cosec x] = −cosec x cot x
d/dx[cot x] = −cosec²x
If you are unsure about the derivative of a trig function, visit the Trig Derivatives page for the full derivations. If you need the chain rule applied to composite versions of these (like sin(3x) or e^(x²)), see the Chain Rule page.
§ 06Worked Exercises — 12 Problems
Work through each problem yourself before revealing the solution. Every step is explained in plain English: nothing is skipped.
Group A — Polynomial × Trigonometric (Exercises 1 – 3)
- Recognise the structure: two different functions multiplied together. This calls for the product rule. The two factors are x⁴ (a polynomial) and sin x (a trigonometric function). Neither can be simplified into the other, so there is no shortcut.
- Label the two factors as u and v: u = x⁴ v = sin x
- Differentiate u using the power rule, bring down the exponent 4, reduce the power by 1: u′ = 4x³
- Differentiate v, the derivative of sin x is cos x (a standard result): v′ = cos x
- Apply the product rule formula dy/dx = u′v + uv′. Substitute the four values: dy/dx = 4x³ · sin x + x⁴ · cos x
- Check whether any factorisation is possible. Both terms share a factor of x³: dy/dx = x³(4 sin x + x cos x) Answer: dy/dx = x³(4 sin x + x cos x)
- Two functions multiplied → product rule. Label them: u = 3x² − 1 v = cos x
- Differentiate u term by term. The constant −1 has derivative 0: u′ = d/dx[3x²] + d/dx[−1] = 6x + 0 = 6x
- Differentiate v, the derivative of cos x is −sin x. The minus sign is important and must not be dropped: v′ = −sin x Many students write v′ = sin x here. That is wrong. The derivative of cosine is negative sine.
- Apply the product rule: f′(x) = u′v + uv′. Substitute in: f′(x) = 6x · cos x + (3x² − 1) · (−sin x)
- Distribute the negative sign from the second term: f′(x) = 6x cos x − (3x² − 1) sin x You can leave the second term in brackets like this, or expand: 6x cos x − 3x² sin x + sin x. Both forms are correct.
- There is no further factorisation that simplifies things. The final answer is: Answer: f′(x) = 6x cos x − (3x² − 1) sin x
- Two functions multiplied → product rule. Label them: u = x + 2 v = tan x
- Differentiate u. The derivative of x is 1 and the derivative of 2 (a constant) is 0: u′ = 1
- Differentiate v. The derivative of tan x is sec²x, a standard result from the quotient rule applied to sin x / cos x: v′ = sec²x If you haven't memorised d/dx[tan x] = sec²x yet, it is derived on the Trig Derivatives page.
- Apply the product rule: dy/dx = u′v + uv′: dy/dx = 1 · tan x + (x + 2) · sec²x
- Simplify: the first term needs no changes since 1 · tan x = tan x: dy/dx = tan x + (x + 2) sec²x Answer: dy/dx = tan x + (x + 2) sec²x
Group B — Polynomial × Exponential (Exercises 4 – 6)
- Two functions multiplied → product rule. Label: u = x² − 3x v = eˣ
- Differentiate u term by term: u′ = d/dx[x²] + d/dx[−3x] = 2x − 3
- Differentiate v. The exponential function eˣ is its own derivative: this is one of the most remarkable facts in calculus: v′ = eˣ
- Apply the product rule: dy/dx = u′v + uv′: dy/dx = (2x − 3) · eˣ + (x² − 3x) · eˣ
- Both terms share a common factor of eˣ. Factorise it out: dy/dx = eˣ[(2x − 3) + (x² − 3x)]
- Collect like terms inside the bracket: 2x − 3 + x² − 3x = x² − x − 3: dy/dx = eˣ(x² − x − 3) Answer: dy/dx = eˣ(x² − x − 3)
- Two functions multiplied → product rule. Label: u = 2x + 5 v = eˣ
- Differentiate u. The derivative of 2x is 2; the derivative of 5 (constant) is 0: u′ = 2
- Differentiate v. Again, eˣ is its own derivative: v′ = eˣ
- Apply the product rule: dy/dx = u′v + uv′: dy/dx = 2 · eˣ + (2x + 5) · eˣ
- Factorise the common factor eˣ: dy/dx = eˣ[2 + (2x + 5)]
- Simplify inside the bracket: 2 + 2x + 5 = 2x + 7: dy/dx = eˣ(2x + 7) Observe the pattern: for y = (ax + b)eˣ, the derivative is always eˣ(ax + b + a). The bracket shifts up by a, which is the coefficient of x. This is a useful pattern to recognise when checking your work. Answer: dy/dx = eˣ(2x + 7)
- Two functions multiplied → product rule. Label: u = x² v = 2ˣ
- Differentiate u using the power rule: u′ = 2x
- Differentiate v. This is a general exponential function aˣ with base a = 2. Its derivative uses the formula d/dx[aˣ] = aˣ ln a: v′ = 2ˣ · ln 2 The ln 2 factor arises because when the base is not e, differentiating pulls down a natural logarithm of the base. When the base is e, ln e = 1 and that factor disappears, which is why d/dx[eˣ] = eˣ · 1 = eˣ.
- Apply the product rule: dy/dx = u′v + uv′: dy/dx = 2x · 2ˣ + x² · 2ˣ ln 2
- Factorise the common factor of x · 2ˣ: dy/dx = x · 2ˣ (2 + x ln 2) Answer: dy/dx = x · 2ˣ(2 + x ln 2)
Group C — Polynomial × Logarithm (Exercises 7 – 8)
- Two functions multiplied → product rule. Label: u = x³ v = ln x
- Differentiate u with the power rule: u′ = 3x²
- Differentiate v. The derivative of the natural logarithm is 1/x: one of the most important standard results: v′ = 1/x This result comes from inverting d/dx[eˣ] = eˣ. If y = ln x then x = eʸ, differentiating implicitly gives 1 = eʸ · dy/dx, so dy/dx = 1/eʸ = 1/x.
- Apply the product rule: dy/dx = u′v + uv′: dy/dx = 3x² · ln x + x³ · (1/x)
- Simplify the second term: x³ · (1/x) = x³/x = x²: dy/dx = 3x² ln x + x²
- Factorise x² from both terms: dy/dx = x²(3 ln x + 1) Answer: dy/dx = x²(3 ln x + 1)
- Rewrite √x as a fractional exponent to make differentiation straightforward: y = x^(1/2) · ln x
- Two functions multiplied → product rule. Label: u = x^(1/2) v = ln x
- Differentiate u using the power rule: bring down 1/2, subtract 1 from the exponent: u′ = (1/2) · x^(1/2 − 1) = (1/2) · x^(−1/2) = 1 ÷ (2√x)
- Differentiate v: v′ = 1/x
- Apply the product rule: dy/dx = u′v + uv′: dy/dx = [1 ÷ (2√x)] · ln x + x^(1/2) · (1/x)
- Simplify the second term: x^(1/2) · (1/x) = x^(1/2) · x^(−1) = x^(−1/2) = 1/√x: dy/dx = ln x ÷ (2√x) + 1/√x
- Both terms have a denominator of 2√x if we write 1/√x as 2/(2√x). Place both over the common denominator: dy/dx = ln x ÷ (2√x) + 2 ÷ (2√x) dy/dx = (ln x + 2) ÷ (2√x) Answer: dy/dx = (ln x + 2) ÷ (2√x)
Group D — Product Rule with Chain Rule (Exercises 9 – 12)
- Outer structure: two functions multiplied → product rule. Label: u = x³ v = (4x − 1)⁵
- Differentiate u with the power rule (straightforward): u′ = 3x²
- Differentiate v: this requires the chain rule, because (4x − 1) is a function sitting inside a power of 5. First identify the inner and outer functions: Outer function: something⁵ Inner function: 4x − 1
- Apply chain rule to v: differentiate outer (bring down 5, reduce power), then multiply by inner derivative: Outer derivative: 5(4x − 1)⁴ Inner derivative: d/dx[4x − 1] = 4 v′ = 5(4x − 1)⁴ · 4 = 20(4x − 1)⁴
- Now apply the product rule: dy/dx = u′v + uv′: dy/dx = 3x² · (4x − 1)⁵ + x³ · 20(4x − 1)⁴
- Look for common factors. Both terms contain x² and (4x − 1)⁴: dy/dx = x²(4x − 1)⁴ [3(4x − 1) + 20x]
- Expand inside the bracket: 3(4x − 1) + 20x = 12x − 3 + 20x = 32x − 3: dy/dx = x²(4x − 1)⁴(32x − 3) Answer: dy/dx = x²(4x − 1)⁴(32x − 3)
- Outer structure: two functions multiplied → product rule. Label: u = x² v = sin(3x)
- Differentiate u: u′ = 2x
- Differentiate v: sin(3x) is a composite function: 3x sits inside the sine. The chain rule is needed here. Outer function: sin(something) (derivative is cos(something). Inner function: 3x) derivative is 3.
- Apply chain rule: differentiate the outer (keeping the inside unchanged), then multiply by the inner derivative: v′ = cos(3x) · 3 = 3 cos(3x)
- Now apply the product rule: dy/dx = u′v + uv′: dy/dx = 2x · sin(3x) + x² · 3 cos(3x)
- Reorder the second term conventionally (coefficient before variable): dy/dx = 2x sin(3x) + 3x² cos(3x)
- Factorise the common factor of x: dy/dx = x[2 sin(3x) + 3x cos(3x)] Answer: dy/dx = x[2 sin(3x) + 3x cos(3x)]
- Two functions multiplied → product rule. Label: u = x + 1 v = e^(x²)
- Differentiate u. The derivative of x is 1 and the derivative of 1 (constant) is 0: u′ = 1
- Differentiate v: this requires the chain rule. The inner function is x² sitting inside the exponential e^(something): Outer function: e^(something), derivative is e^(something) (exponential is its own derivative). Inner function: x², derivative is 2x.
- Apply chain rule: outer derivative × inner derivative: v′ = e^(x²) · 2x = 2x e^(x²)
- Now apply the product rule: dy/dx = u′v + uv′: dy/dx = 1 · e^(x²) + (x + 1) · 2x e^(x²)
- Factorise the common factor e^(x²): dy/dx = e^(x²)[1 + 2x(x + 1)]
- Expand inside the bracket: 1 + 2x(x + 1) = 1 + 2x² + 2x: dy/dx = e^(x²)(2x² + 2x + 1) Answer: dy/dx = e^(x²)(2x² + 2x + 1)
- Three functions are all multiplied together. We use the triple product rule: dy/dx = u′vw + uv′w + uvw′. Label: u = x v = eˣ w = sin x Alternatively you could group (x · eˣ) as a single unit and apply the two-function product rule twice. Both methods give the same answer. We will use the direct triple product rule here.
- Differentiate each factor individually: u′ = d/dx[x] = 1 v′ = d/dx[eˣ] = eˣ w′ = d/dx[sin x] = cos x
- Write out all three terms of the triple product rule, each differentiating exactly one factor: Term 1: u′vw, differentiate u, keep v and w unchanged. u′vw = 1 · eˣ · sin x = eˣ sin x Term 2: uv′w: keep u, differentiate v, keep w unchanged. uv′w = x · eˣ · sin x = xeˣ sin x Term 3: uvw′: keep u and v, differentiate w. uvw′ = x · eˣ · cos x = xeˣ cos x
- Add all three terms: dy/dx = eˣ sin x + xeˣ sin x + xeˣ cos x
- Factorise eˣ from all three terms: dy/dx = eˣ(sin x + x sin x + x cos x)
- Factorise further, the last two terms inside the bracket share a factor of x: dy/dx = eˣ[sin x + x(sin x + cos x)] Answer: dy/dx = eˣ[sin x + x(sin x + cos x)]
§ 0710-Question Quiz
Test your understanding. Select your answer and hit Submit Quiz to see your score with feedback on every question.
Product Rule — Test Yourself
What does the product rule state for y = u · v?
Find d/dx[x² · eˣ].
Find d/dx[x · ln x].
Why can you NOT compute d/dx[f · g] simply as f′ · g′?
Find d/dx[sin x · cos x].
For y = u · v · w, the triple product rule gives dy/dx = ?
Find d/dx[x³ · (2x + 1)²] at x = 0.
Which step in differentiating y = x · sin(x²) requires the chain rule?
Find d/dx[eˣ · sin x].
Which of these is the fully factorised form of d/dx[x² · eˣ]?