The product rule tells you how to differentiate two expressions that are multiplied together. If ff and gg are both differentiable at xx, then

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x).\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x).

This is the derivative rule for products such as x2sin(x)x^2\sin(x) and xexx e^x. Differentiate the first factor once, then the second factor once, and add the results.

Product rule formula

Start with

y=f(x)g(x)y = f(x)g(x)

If both functions are differentiable, then

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x)\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x)

In words: differentiate the first and keep the second, then keep the first and differentiate the second. The rule depends on both factors changing with xx.

Why the product rule has two terms

When two changing quantities are multiplied, the product can change in two ways. The first factor can change while the second stays fixed for that moment, or the second factor can change while the first stays fixed.

That is why the derivative has two terms instead of one.

Worked example: x2sin(x)x^2\sin(x)

Find the derivative of

y=x2sin(x)y = x^2 \sin(x)

This is a product of two functions:

f(x)=x2andg(x)=sin(x)f(x) = x^2 \quad \text{and} \quad g(x) = \sin(x)

Differentiate each factor:

f(x)=2xandg(x)=cos(x)f'(x) = 2x \quad \text{and} \quad g'(x) = \cos(x)

Apply the product rule:

dydx=f(x)g(x)+f(x)g(x)\frac{dy}{dx} = f'(x)g(x) + f(x)g'(x) dydx=2xsin(x)+x2cos(x)\frac{dy}{dx} = 2x\sin(x) + x^2\cos(x)

So

ddx(x2sin(x))=2xsin(x)+x2cos(x).\frac{d}{dx}\left(x^2\sin(x)\right) = 2x\sin(x) + x^2\cos(x).

A common wrong answer is 2xcos(x)2x\cos(x). That comes from differentiating both factors and multiplying the results, which is not the product rule.

Common product rule mistakes

  1. Writing f(x)g(x)f'(x)g'(x). In general, that is not the derivative of f(x)g(x)f(x)g(x).
  2. Forgetting one term and writing only f(x)g(x)f'(x)g(x) or only f(x)g(x)f(x)g'(x).
  3. Confusing the product rule with the chain rule. x2sin(x)x^2\sin(x) is a product, but sin(x2)\sin(x^2) is a composition.
  4. Dropping parentheses when one factor is a longer expression, such as (x2+1)ex(x^2+1)e^x.

When to use the product rule

Use the product rule when a function is written as one differentiable factor times another differentiable factor, and both depend on xx. Common cases include:

  1. A polynomial times a trig function, such as x3cos(x)x^3\cos(x)
  2. A polynomial times an exponential, such as xexx e^x
  3. A logarithmic product, such as xln(x)x\ln(x)
  4. A product where one factor also needs the chain rule, such as xsin(x2)x\sin(x^2)

If one factor is a constant, the rule reduces to the constant multiple rule.

A quick check after differentiating

Before simplification, a product rule answer usually has two added terms. If you see only one term right away, check whether you dropped part of the derivative.

Try your own version

Differentiate y=x3exy = x^3 e^x and check whether your result has two terms. Then try a nearby comparison: for y=ex3y = e^{x^3}, notice that the structure changed, so the chain rule is the better tool there.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →