DerivCalc
Products of functions

Product Rule Calculator

Calculate a relevant example, then learn the rule well enough to reproduce and check every step yourself.

Static educational guide4 worked examplesReviewed September 30, 2026
Interactive check

Try the rule calculator

Use ^ for powers, * for multiplication, and parentheses for function inputs.

Definition and meaning

The product rule differentiates two factors that both depend on the variable. If h(x)=f(x)g(x), then h'(x)=f'(x)g(x)+f(x)g'(x). The unchanged factor in each term is essential: a product changes because either factor can change while the other temporarily stays fixed.

Why the rule works

Consider the change from f(x)g(x) to f(x+h)g(x+h). Add and subtract f(x+h)g(x), divide by h, and regroup. One quotient approaches f'(x) while the neighboring factor approaches g(x); the other approaches g'(x) beside f(x). This limit argument produces the two terms and explains why multiplying the two derivatives is wrong.

A reliable hand method

Name the factors before differentiating. Write the derivative of the first times the original second, add the original first times the derivative of the second, and simplify only afterward. For three factors, differentiate one factor at a time and leave the other two unchanged, producing three terms.

Example 1: x^2*sin(x)

Answer: 2x sin(x)+x^2 cos(x)

  1. Use f=x^2 and g=sin(x).
  2. Compute f'g+fg' and combine no unlike terms.

Example 2: x*e^x

Answer: e^x+x e^x

  1. Differentiate x while preserving e^x.
  2. Then preserve x while differentiating e^x.

Example 3: (x^2+1)*ln(x)

Answer: 2x ln(x)+(x^2+1)/x

  1. Treat each parenthesized expression as one factor.
  2. Keep the domain x>0 from ln(x).

Example 4: x*sin(x)*e^x

Answer: sin(x)e^x+x cos(x)e^x+x sin(x)e^x

  1. Differentiate one of the three factors in each term.
  2. Factor e^x later if a compact answer is useful.

Common mistakes

Do not use (fg)'=f'g'. That expression ignores the change contributed by each original factor. Avoid expanding a product when expansion creates more work, but simplify first when cancellation turns the problem into a polynomial. For three factors, there are three terms, not repeated two-factor rules with a missing contribution.

Scope note. The product rule applies only where the component functions are differentiable. A correct symbolic expression may still need domain restrictions from logarithms, roots, or denominators. Equivalent answers can look different after factoring: e^x(1+x) and e^x+x e^x represent the same derivative.

How to verify an answer

Differentiate the expression independently, compare the structure of each term, and substitute a safe numerical value into both the symbolic derivative and a centered difference quotient. Avoid points outside the original domain and points near a discontinuity. A matching numerical value increases confidence, but it cannot establish equality for every input. Algebraic reasoning and domain analysis remain necessary.

When the calculator and handwritten work differ, first check parentheses, multiplication symbols, the selected variable, and any missing chain-rule factor. Then factor or expand both answers to see whether they are equivalent. The DerivCalc methodology explains why simplification is deliberately conservative.

Related derivative calculators

Questions about this calculator

Can I use the Product Rule Calculator for homework checks?

Yes. Compare the result and named rules with your own work, then check domain restrictions. The numerical spot-check is a consistency test, not a formal proof.

Why can an equivalent answer look different?

Factoring, expanding, reciprocal notation, and trigonometric identities can produce different-looking expressions with the same values on their shared domain.

Does the calculator replace learning the rule?

No. It is designed to expose the rule and intermediate reasoning. The worked examples explain how to select and apply the method by hand.

Editorial standard: formulas and notation are checked against OpenStax Calculus Volume 1, Chapter 3. Content is written and maintained by SilverCodeLabs. Report a correction with the exact expression and expected result.