The product rule: if \( u \) and \( v \) are differentiable functions of \( x \),
$$\frac{d}{dx}\big(u\,v\big) = u'\,v + u\,v'$$
“Derivative of the first times the second, plus the first times the derivative of the second.”
You need it whenever two functions of \( x \) are multiplied together and you cannot easily simplify the product away: \( x^2\sin x \), \( xe^x \), \( x^3\ln x \) and so on. It is one of the three core combination rules, alongside the quotient rule and the chain rule, and it is the source of integration by parts.
Why you can’t just multiply derivatives
It is tempting to write \( (uv)' = u'v' \). Test it on \( x\cdot x = x^2 \): the true derivative is \( 2x \), but \( u'v' = 1\cdot1 = 1 \). The product rule gives \( 1\cdot x + x\cdot 1 = 2x \). Correct.
The failure is not a coincidence. When both factors change at once, the product changes for two separate reasons, and a correct rule has to account for both.
The intuition: a growing rectangle
Think of \( uv \) as the area of a rectangle with width \( u \) and height \( v \). Now nudge \( x \) a little, so the width grows by \( \Delta u \) and the height grows by \( \Delta v \).
The new area is the old rectangle plus three new pieces: a strip along the side with area \( v\,\Delta u \), a strip along the top with area \( u\,\Delta v \), and a tiny corner with area \( \Delta u\,\Delta v \). Divide by \( \Delta x \) and let it shrink. The two strips become \( u'v \) and \( uv' \), while the corner is a product of two small quantities and disappears in the limit. That leftover pair of strips is the whole product rule: each factor gets its turn to change while the other one holds still.
Proof
Add and subtract \( u(x+h)v(x) \) in the numerator of the difference quotient. This does not change its value, but it lets you split it into two familiar pieces:
$$\begin{aligned} &\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} \end{aligned}$$
As \( h \to 0 \), \( u(x+h) \to u(x) \) (differentiable functions are continuous), and the two fractions become \( v' \) and \( u' \). So \( (uv)' = uv' + vu' \).
A 4-step method
- Name the factors. Decide which piece is \( u \) and which is \( v \).
- Differentiate each one separately to get \( u' \) and \( v' \). Use the chain rule here if a factor is itself composite.
- Assemble \( u'v + uv' \).
- Simplify. Factor out anything common, which makes later steps like solving \( f'(x) = 0 \) much easier.
Worked examples
1. \( x^2\sin x \). \( u = x^2 \), \( v = \sin x \), so \( u' = 2x \) and \( v' = \cos x \):
$$2x\sin x + x^2\cos x$$
2. \( xe^x \). \( e^x + xe^x = e^x(1 + x) \). Factoring out \( e^x \) is the standard tidy form.
3. \( x^3\ln x \). \( 3x^2\ln x + x^3\cdot\frac1x = 3x^2\ln x + x^2 \). The \( x^3 \) and \( \frac1x \) combine, which is typical when a log is involved (see derivative of ln x).
4. \( e^x\cos x \). \( e^x\cos x - e^x\sin x = e^x(\cos x - \sin x) \). The minus sign comes from the derivative of cosine.
5. \( (x^2+1)(3x-2) \). \( 2x(3x-2) + 3(x^2+1) = 9x^2 - 4x + 3 \). You could also expand first and use the power rule; both routes must agree.
6. \( x\ln x - x \). The first term needs the product rule, the second does not:
$$\left(1\cdot\ln x + x\cdot\frac1x\right) - 1 = \ln x + 1 - 1 = \ln x$$
So \( x\ln x - x \) is an antiderivative of \( \ln x \), which is exactly the result in integral of ln x.
7. Critical points of \( x^2e^x \). Differentiate and factor:
$$\frac{d}{dx}x^2e^x = 2xe^x + x^2e^x = xe^x(x + 2)$$
Since \( e^x \) is never zero, the derivative vanishes only at \( x = 0 \) and \( x = -2 \). The function has a local maximum value of \( 4e^{-2} \approx 0.54 \) at \( x = -2 \) and a minimum of 0 at \( x = 0 \). Without factoring, those zeros would be much harder to see.
8. \( x^2\sin(3x) \) (product plus chain). Here \( v = \sin 3x \), so \( v' = 3\cos 3x \) by the chain rule:
$$2x\sin(3x) + 3x^2\cos(3x)$$
An applied example: revenue
Revenue is price times quantity, \( R = p\,q \), and in real markets both factors tend to change at once. Suppose a product sells for 20 dollars and the price is rising by 1 dollar per month, while monthly sales are 500 units and falling by 10 units per month. Is revenue going up or down?
Treat price and quantity as functions of time and apply the product rule:
$$R' = p'q + pq' = (1)(500) + (20)(-10) = 300$$
Revenue is rising by 300 dollars per month. The first term is the gain from charging more on every unit you still sell; the second is the loss from selling fewer units at the current price. The product rule weighs those two effects against each other, and here the price increase wins. If you had multiplied the two rates instead, you would get \( (1)(-10) = -10 \), which has the wrong sign and the wrong units.
Three factors
Apply the rule twice, or remember the pattern: differentiate one factor at a time.
$$(uvw)' = u'vw + uv'w + uvw'$$
Example: \( xe^x\sin x \) has derivative \( e^x\sin x + xe^x\sin x + xe^x\cos x \).
Second derivatives of a product
Differentiating \( u'v + uv' \) once more with the product rule gives
$$(uv)'' = u''v + 2u'v' + uv''$$
The middle term appears twice, much like the \( 2ab \) in \( (a+b)^2 \). For \( xe^x \), this gives \( 0 + 2e^x + xe^x = e^x(x + 2) \), which matches differentiating example 2 directly.
Product rule or simplify first?
If a product is easy to expand, expanding is often faster. Keep the product rule for genuinely different functions (polynomial times trig, exponential times log, and so on). For a fraction, you can use the quotient rule or rewrite it as a product with a negative power.
Common mistakes
- Multiplying the derivatives. \( u'v' \) is not the derivative of \( uv \), as the \( x\cdot x \) test shows.
- Dropping one of the two terms. Every factor must be differentiated exactly once.
- Forgetting the chain rule inside a factor, as in \( x^2\sin(3x) \), whose second term is \( x^2\cdot 3\cos(3x) \).
- Using the rule on a constant factor. For \( 5x^3 \), the product rule works but is overkill: the constant multiple rule gives \( 15x^2 \) immediately.
- Not factoring the result. Leaving \( 2xe^x + x^2e^x \) unfactored is correct but makes it harder to find where the derivative is zero.
Where it’s used
The product rule is how you prove the quotient rule and many other derivative formulas, and it drives implicit differentiation whenever a term like \( xy \) appears. Integrating both sides of it gives integration by parts. In physics, if both mass and velocity change, the rate of change of momentum \( mv \) is \( m'v + mv' \), a product rule in action.
Try it yourself
Step-by-step solver·Exact symbolic engine
Interactive Calculus Problem Solver
Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.
Input syntax
- Powers
x^2, rootssqrt(x),cbrt(x), absolute value|x| - Implicit multiplication works:
3x sin(2x) sin cos tan sec csc cot,asin acos atan,sinh cosh tanhe^xorexp(x);ln(x)andlog(x)are both the natural log- Constants
piande; bounds acceptinfand-inf
The derivative calculator labels every product rule step, which is useful for checking your own working.
Practice problems
Try these before checking the answers.
- \( \frac{d}{dx}\,x^4e^x \)
- \( \frac{d}{dx}\sin x\cos x \)
- \( \frac{d}{dx}\,\sqrt{x}\ln x \)
- \( \frac{d}{dx}\,x^2\cos x \)
- \( \frac{d}{dx}\,e^x\ln x \)
- \( \frac{d}{dx}\,x\tan x \)
- The second derivative of \( x^2e^x \)
Answers: (1) \( 4x^3e^x + x^4e^x \); (2) \( \cos^2x - \sin^2x = \cos 2x \); (3) \( \frac{\ln x}{2\sqrt x} + \frac{1}{\sqrt x} \); (4) \( 2x\cos x - x^2\sin x \); (5) \( e^x\ln x + \frac{e^x}{x} \); (6) \( \tan x + x\sec^2 x \); (7) \( e^x(x^2 + 4x + 2) \).
FAQ
Does order matter in the product rule?
No. Addition and multiplication commute, so \( u'v + uv' \) and \( uv' + u'v \) are the same.
How do I know when to use the product rule?
Use it when two expressions that both contain \( x \) are multiplied. If one factor is a plain constant, you only need the constant multiple rule.
Product rule or chain rule?
A product is two functions side by side, like \( x\sin x \). A composition is one function inside another, like \( \sin(x^2) \). Many problems need both: use the product rule for the overall shape, then the chain rule inside a factor.
Is there a product rule for three or more functions?
Yes. Differentiate one factor at a time, leave the others alone, and add all the results. With \( n \) factors you get \( n \) terms.
What is the integration version of the product rule?
Integration by parts: \( \int u\,dv = uv - \int v\,du \) comes directly from integrating the product rule.
Further reading
- Product and Quotient Rule (Paul’s Online Math Notes) — extra examples, including an applied rate problem.
- Differentiation Rules (OpenStax Calculus Volume 1, Section 3.3) — the textbook proof of the product rule with practice exercises.
- Product rule (Wikipedia) — alternative proofs, the general Leibniz rule for higher derivatives, and history.
Calculators for this topic
Keep learning
Implicit Differentiation: Step-by-Step Method with Examples
How to find dy/dx when y isn’t isolated. A 4-step implicit differentiation method with circle, x³+y³=6xy and trig examples, plus tangent lines.
Chain Rule Explained: Formula, Steps and 8 Examples
The chain rule differentiates composite functions: d/dx f(g(x)) = f'(g(x))·g'(x). Clear steps, 8 worked examples and the most common mistakes.

