The Product Rule of Differentiation

The product rule tells you how to differentiate a product of two functions: $(u\cdot v)' = u'\cdot v + u\cdot v'$. In words: derivative of the first times the second, plus the first times the derivative of the second.

📜 Product rule formula

If $f(x) = u(x)\cdot v(x)$ and both $u$ and $v$ are differentiable, then

$$ f'(x) = u'(x)\,v(x) + u(x)\,v'(x) $$

In Leibniz notation:

$$ \frac{d}{dx}\big(uv\big) = \frac{du}{dx}\,v + u\,\frac{dv}{dx} $$

💡 Memory aid: "d-first times second plus first times d-second". The order of the two terms does not matter, but both terms are always needed: the derivative of a product is not the product of the derivatives.

🪜 How to use the product rule in 3 steps

  1. Identify the two factors Write the function as $u(x)\cdot v(x)$, e.g. $x^2\sin x$ → $u = x^2$, $v = \sin x$.
  2. Differentiate each factor Use the basic rules, e.g. the power rule: $u' = 2x$, $v' = \cos x$.
  3. Insert and simplify $f' = u'v + uv' = 2x\sin x + x^2\cos x$. Factor out common terms if possible.

When do I need it? Whenever both factors contain the variable. If one factor is a constant, the simpler constant factor rule is enough: $(5x^3)' = 15x^2$.

✏️ Worked examples

Example 1: polynomial × polynomial – $(x^2+1)(x^3-2)$

  • $u = x^2+1$, $u' = 2x$; $v = x^3-2$, $v' = 3x^2$
  • $f' = 2x(x^3-2) + (x^2+1)\cdot 3x^2 = 2x^4 - 4x + 3x^4 + 3x^2$

$f'(x) = 5x^4 + 3x^2 - 4x$

Check: expanding first gives $x^5 + x^3 - 2x^2 - 2$ with derivative $5x^4 + 3x^2 - 4x$ ✓


Example 2: polynomial × sine – $x^2\sin x$

$f'(x) = 2x\sin x + x^2\cos x$


Example 3: exponential × polynomial – $x^3e^x$

$u = x^3$, $u'=3x^2$, $v = v' = e^x$:

$f'(x) = 3x^2e^x + x^3e^x = x^2e^x(x+3)$


Example 4: $x\ln x$

$f'(x) = 1\cdot\ln x + x\cdot\frac{1}{x} = \ln x + 1$


Example 5: $\sin x\cos x$

$u'=\cos x$, $v' = -\sin x$:

$f'(x) = \cos^2 x - \sin^2 x = \cos(2x)$


Example 6: product rule with chain rule – $x^2e^{3x}$

The second factor needs the chain rule: $(e^{3x})' = 3e^{3x}$.

$f'(x) = 2xe^{3x} + 3x^2e^{3x} = xe^{3x}(2+3x)$


Example 7: $\sqrt{x}\,(x^2-4)$

$u = x^{1/2}$, $u' = \frac{1}{2\sqrt x}$; $v = x^2-4$, $v' = 2x$:

$f'(x) = \dfrac{x^2-4}{2\sqrt{x}} + 2x\sqrt{x} = \dfrac{5x^2-4}{2\sqrt{x}}$

➕ Product rule for three or more factors

Differentiate one factor at a time and keep the others unchanged, then add everything up:

$$ (uvw)' = u'vw + uv'w + uvw' $$

Example: $(x\,e^x\sin x)' = e^x\sin x + xe^x\sin x + xe^x\cos x$.

🔍 Proof of the product rule

Start with the definition of the derivative and add and subtract $u(x+h)\,v(x)$:

$$ \frac{u(x+h)v(x+h) - u(x)v(x)}{h} = u(x+h)\,\frac{v(x+h)-v(x)}{h} + v(x)\,\frac{u(x+h)-u(x)}{h} $$

As $h\to 0$, $u(x+h)\to u(x)$ (differentiable functions are continuous) and the two difference quotients tend to $v'(x)$ and $u'(x)$. Hence $(uv)' = uv' + u'v$.

Geometrically: think of $u\cdot v$ as the area of a rectangle. When $x$ grows a little, the area grows by a strip $u'\,v$ on one side and $u\,v'$ on the other side; the tiny corner piece vanishes in the limit.

⚠️ Common mistakes

Multiplying the derivatives: $(x^2\sin x)' \neq 2x\cos x$. Always two terms: $2x\sin x + x^2\cos x$.

Using the product rule for constant factors: it works, but $(7x^4)' = 28x^3$ is faster with the constant factor rule.

Minus sign confusion: the product rule has a plus; the minus belongs to the quotient rule.

Forgetting the chain rule inside a factor: in $x\sin(2x)$ the derivative of $\sin(2x)$ is $2\cos(2x)$, so $f' = \sin(2x) + 2x\cos(2x)$.

🧮 Product rule calculator

The derivative calculator recognises products automatically, applies the product rule and shows $u$, $v$, $u'$ and $v'$ for every step. Enter your function with * between the factors (e.g. x^2*sin(x)) or open one of these examples:

❓ Frequently asked questions

What is the product rule?

The product rule is the formula for the derivative of a product of two functions: $(uv)' = u'v + uv'$.

When do you use the product rule?

When a function is the product of two (or more) factors that both depend on $x$, for example $x^2\sin x$ or $x e^x$. For a constant factor, like $3x^2$, the constant factor rule is enough.

What is the product rule for three functions?

$(uvw)' = u'vw + uv'w + uvw'$ – differentiate one factor at a time and add the results.

What is the difference between the product rule and the chain rule?

The product rule is for functions that are multiplied ($x\cdot\sin x$), the chain rule for functions that are nested ($\sin(x^2)$).

Can I use the product rule instead of the quotient rule?

Yes: write $\frac{u}{v} = u\cdot v^{-1}$ and use the product rule together with the chain rule. The result is the same as with the quotient rule.

What is the derivative of x times e^x?

$(xe^x)' = 1\cdot e^x + x\cdot e^x = e^x(1+x)$.