In calculus, the product rule (or Leibniz rule or Leibniz product rule) is a formula used to find the derivatives of products of two or more functions. For two functions, it may be stated in Lagrange's notation as ( u ⋅ v ) ′ = u ′ ⋅ v + u ⋅ v ′ {\displaystyle (u\cdot v)'=u'\cdot v+u\cdot v'} or in Leibniz's notation as d d x ( u ⋅ v ) = d u d x ⋅ v + u ⋅ d v d x . {\displaystyle {\frac {d}{dx}}(u\cdot v)={\frac {du}{dx}}\cdot v+u\cdot {\frac {dv}{dx}}.}
The rule may be extended or generalized to products of three or more functions, to a rule for higher-order derivatives of a product, and to other contexts.
Discovery Discovery of this rule is credited to Gottfried Leibniz, who demonstrated it using "infinitesimals" (a precursor to the modern differential). (However, J. M. Child, a translator of Leibniz's papers, argues that it is due to Isaac Barrow.) Here is Leibniz's argument: Let u and v be functions. Then d(uv) is the same thing as the difference between two successive uv's; let one of these be uv, and the other u+du times v+dv; then:
d ( u ⋅ v )
= ( u + d u ) ⋅ ( v + d v ) − u ⋅ v
= u ⋅ d v + v ⋅ d u + d u ⋅ d v . {\displaystyle {\begin{aligned}d(u\cdot v)&{}=(u+du)\cdot (v+dv)-u\cdot v\\&{}=u\cdot dv+v\cdot du+du\cdot dv.\end{aligned}}}
Since the term du·dv is "negligible" (compared to du and dv), Leibniz concluded that
d ( u ⋅ v ) = v ⋅ d u + u ⋅ d v {\displaystyle d(u\cdot v)=v\cdot du+u\cdot dv}
and this is indeed the differential form of the product rule. If we divide through by the differential dx, we obtain
d d x ( u ⋅ v ) = v ⋅ d u d x + u ⋅ d v d x {\displaystyle {\frac {d}{dx}}(u\cdot v)=v\cdot {\frac {du}{dx}}+u\cdot {\frac {dv}{dx}}}
which can also be written in Lagrange's notation as
( u ⋅ v ) ′ = v ⋅ u ′ + u ⋅ v ′ . {\displaystyle (u\cdot v)'=v\cdot u'+u\cdot v'.}
First proofs Both Leibniz and Newton gave proofs that are not rigorous by modern standards. Leibniz reasoned with "infinitely smaller quantities", interpreting products as areas of rectangles, while Newton reasoned with "flowing quantities".
Examples Suppose we want to differentiate f ( x ) = x 2 sin ( x ) . {\displaystyle f(x)=x^{2}{\text{sin}}(x).} By using the product rule, one gets the derivative f ′ ( x ) = 2 x ⋅ sin ( x ) + x 2 cos ( x ) {\displaystyle f'(x)=2x\cdot {\text{sin}}(x)+x^{2}{\text{cos}}(x)} (since the derivative of x 2 {\displaystyle x^{2}} is 2 x , {\displaystyle 2x,} and the derivative of the sine function is the cosine function). One special case of the product rule is the constant multiple rule, which states: if c is a number, and f ( x ) {\displaystyle f(x)} is a differentiable function, then c ⋅ f ( x ) {\displaystyle c\cdot f(x)} is also differentiable, and its derivative is ( c f ) ′ ( x ) = c ⋅ f ′ ( x ) . {\displaystyle (cf)'(x)=c\cdot f'(x).} This follows from the product rule since the derivative of any constant is zero. This, combined with the sum rule for derivatives, shows that differentiation is linear. The rule for integration by parts is derived from the product rule, as is (a weak version of) the quotient rule. (It is a "weak" version in that it does not prove that the quotient is differentiable but only says what its derivative is if it is differentiable.)
Proofs
Limit definition of derivative Let h(x) = f(x)g(x) and suppose that f and g are each differentiable at x. We want to prove that h is differentiable at x and that its derivative, h′(x), is given by f′(x)g(x) + f(x)g′(x). To do this, f ( x ) g ( x + Δ x ) − f ( x ) g ( x + Δ x ) {\displaystyle f(x)g(x+\Delta x)-f(x)g(x+\Delta x)} (which is zero, and thus does not change the value) is added to the numerator to permit its factoring, and then properties of limits are used.
h ′ ( x ) = lim Δ x → 0 h ( x + Δ x ) − h ( x ) Δ x = lim Δ x → 0 f ( x + Δ x ) g ( x + Δ x ) − f ( x ) g ( x ) Δ x = lim Δ x → 0 f ( x + Δ x ) g ( x + Δ x ) − f ( x ) g ( x + Δ x ) + f ( x ) g ( x + Δ x ) − f ( x ) g ( x ) Δ x = lim Δ x → 0 [ f ( x + Δ x ) − f ( x ) ] ⋅ g ( x + Δ x ) + f ( x ) ⋅ [ g ( x + Δ x ) − g ( x ) ] Δ x = lim Δ x → 0 f ( x + Δ x ) − f ( x ) Δ x ⋅ lim Δ x → 0 g ( x + Δ x ) + lim Δ x → 0 f ( x ) ⋅ lim Δ x → 0 g ( x + Δ x ) − g ( x ) Δ x = f ′ ( x ) g ( x ) + f ( x ) g ′ ( x ) . {\displaystyle {\begin{aligned}h'(x)&=\lim _{\Delta x\to 0}{\frac {h(x+\Delta x)-h(x)}{\Delta x}}\\[5pt]&=\lim _{\Delta x\to 0}{\frac {f(x+\Delta x)g(x+\Delta x)-f(x)g(x)}{\Delta x}}\\[5pt]&=\lim _{\Delta x\to 0}{\frac {f(x+\Delta x)g(x+\Delta x)-f(x)g(x+\Delta x)+f(x)g(x+\Delta x)-f(x)g(x)}{\Delta x}}\\[5pt]&=\lim _{\Delta x\to 0}{\frac {{\big [}f(x+\Delta x)-f(x){\big ]}\cdot g(x+\Delta x)+f(x)\cdot {\big [}g(x+\Delta x)-g(x){\big ]}}{\Delta x}}\\[5pt]&=\lim _{\Delta x\to 0}{\frac {f(x+\Delta x)-f(x)}{\Delta x}}\cdot \lim _{\Delta x\to 0}g(x+\Delta x)+\lim _{\Delta x\to 0}f(x)\cdot \lim _{\Delta x\to 0}{\frac {g(x+\Delta x)-g(x)}{\Delta x}}\\[5pt]&=f'(x)g(x)+f(x)g'(x).\end{aligned}}}
The fact that lim Δ x → 0 g ( x + Δ x ) = g ( x ) {\displaystyle \lim _{\Delta x\to 0}g(x+\Delta x)=g(x)} follows from the fact that differentiable functions are continuous.
Linear approximations By definition, if f , g : R → R {\displaystyle f,g:\mathbb {R} \to \mathbb {R} } are differentiable at x {\displaystyle x} , then we can write linear approximations:
f ( x + h ) = f ( x ) + f ′ ( x ) h + ε 1 ( h ) {\displaystyle f(x+h)=f(x)+f'(x)h+\varepsilon _{1}(h)} and g ( x + h ) = g ( x ) + g ′ ( x ) h + ε 2 ( h ) , {\displaystyle g(x+h)=g(x)+g'(x)h+\varepsilon _{2}(h),}
where the error terms are small with respect to h: that is, lim h → 0 ε 1 ( h ) h = lim h → 0 ε 2 ( h ) h = 0 , {\textstyle \lim _{h\to 0}{\frac {\varepsilon _{1}(h)}{h}}=\lim _{h\to 0}{\frac {\varepsilon _{2}(h)}{h}}=0,} also written ε 1 , ε 2 ∼ o ( h ) {\displaystyle \varepsilon _{1},\varepsilon _{2}\sim o(h)} . Then:
f ( x + h ) g ( x + h ) − f ( x ) g ( x ) = ( f ( x ) + f ′ ( x ) h + ε 1 ( h ) ) ( g ( x ) + g ′ ( x ) h + ε 2 ( h ) ) − f ( x ) g ( x ) = f ( x ) g ( x ) + f ′ ( x ) g ( x ) h + f ( x ) g ′ ( x ) h − f ( x ) g ( x ) + error terms = f ′ ( x ) g ( x ) h + f ( x ) g ′ ( x ) h + o ( h ) . {\displaystyle {\begin{aligned}f(x+h)g(x+h)-f(x)g(x)&=(f(x)+f'(x)h+\varepsilon _{1}(h))(g(x)+g'(x)h+\varepsilon _{2}(h))-f(x)g(x)\\[.5em]&=f(x)g(x)+f'(x)g(x)h+f(x)g'(x)h-f(x)g(x)+{\text{error terms}}\\[.5em]&=f'(x)g(x)h+f(x)g'(x)h+o(h).\end{aligned}}}
The "error terms" consist of items such as f ( x ) ε 2 ( h ) , f ′ ( x ) g ′ ( x ) h 2 {\displaystyle f(x)\varepsilon _{2}(h),f'(x)g'(x)h^{2}} and h f ′ ( x ) ε 1 ( h ) {\displaystyle hf'(x)\varepsilon _{1}(h)} which are easily seen to have magnitude o ( h ) . {\displaystyle o(h).} Dividing by h {\displaystyle h} and taking the limit h → 0 {\displaystyle h\to 0} gives the result.
Quarter squares This proof uses the chain rule and the quarter square function q ( x ) = 1 4 x 2 {\displaystyle q(x)={\tfrac {1}{4}}x^{2}} with derivative q ′ ( x ) = 1 2 x {\displaystyle q'(x)={\tfrac {1}{2}}x} . We have:
u v = q ( u + v ) − q ( u − v ) , {\displaystyle uv=q(u+v)-q(u-v),}
and differentiating both sides gives:
f ′ = q ′ ( u + v ) ( u ′ + v ′ ) − q ′ ( u − v ) ( u ′ − v ′ ) = ( 1 2 ( u + v ) ( u ′ + v ′ ) ) − ( 1 2 ( u − v ) ( u ′ − v ′ ) ) = 1 2 ( u u ′ + v u ′ + u v ′ + v v ′ ) − 1 2 ( u u ′ − v u ′ − u v ′ + v v ′ ) = v u ′ + u v ′ . {\displaystyle {\begin{aligned}f'&=q'(u+v)(u'+v')-q'(u-v)(u'-v')\\[4pt]&=\left({\tfrac {1}{2}}(u+v)(u'+v')\right)-\left({\tfrac {1}{2}}(u-v)(u'-v')\right)\\[4pt]&={\tfrac {1}{2}}(uu'+vu'+uv'+vv')-{\tfrac {1}{2}}(uu'-vu'-uv'+vv')\\[4pt]&=vu'+uv'.\end{aligned}}}
Multivariable chain rule The product rule can be considered a special case of the chain rule for several variables, applied to the multiplication function m ( u , v ) = u v {\displaystyle m(u,v)=uv} :
d ( u v ) d x = ∂ ( u v ) ∂ u d u d x + ∂ ( u v ) ∂ v d v d x = v d u d x + u d v d x . {\displaystyle {d(uv) \over dx}={\frac {\partial (uv)}{\partial u}}{\frac {du}{dx}}+{\frac {\partial (uv)}{\partial v}}{\frac {dv}{dx}}=v{\frac {du}{dx}}+u{\frac {dv}{dx}}.}
Non-standard analysis Let u and v be continuous functions in x, and let dx, du and dv be infinitesimals within the framework of non-standard analysis, specifically the hyperreal numbers. Using st to denote the standard part function that associates to a finite hyperreal number the real infinitely close to it, this gives
d ( u v ) d x = st ( ( u + d u ) ( v + d v ) − u v d x ) = st ( u v + u ⋅ d v + v ⋅ d u + d u ⋅ d v − u v d x ) = st ( u ⋅ d v + v ⋅ d u + d u ⋅ d v d x ) = st ( u d v d x + ( v + d v ) d u d x ) = u d v d x + v d u d x . {\displaystyle {\begin{aligned}{\frac {d(uv)}{dx}}&=\operatorname {st} \left({\frac {(u+du)(v+dv)-uv}{dx}}\right)\\&=\operatorname {st} \left({\frac {uv+u\cdot dv+v\cdot du+du\cdot dv-uv}{dx}}\right)\\&=\operatorname {st} \left({\frac {u\cdot dv+v\cdot du+du\cdot dv}{dx}}\right)\\&=\operatorname {st} \left(u{\frac {dv}{dx}}+(v+dv){\frac {du}{dx}}\right)\\&=u{\frac {dv}{dx}}+v{\frac {du}{dx}}.\end{aligned}}}
This was essentially Leibniz's proof exploiting the transcendental law of homogeneity (in place of the standard part above).
Smooth infinitesimal analysis In the context of Lawvere's approach to infinitesimals, let d x {\displaystyle dx} be a nilsquare infinitesimal. Then d u = u ′ d x {\displaystyle du=u'\ dx} and d v = v ′ d x {\displaystyle dv=v'\ dx} , so that
d ( u v ) = ( u + d u ) ( v + d v ) − u v = u v + u ⋅ d v + v ⋅ d u + d u ⋅ d v − u v = u ⋅ d v + v ⋅ d u + d u ⋅ d v = u ⋅ d v + v ⋅ d u {\displaystyle {\begin{aligned}d(uv)&=(u+du)(v+dv)-uv\\&=uv+u\cdot dv+v\cdot du+du\cdot dv-uv\\&=u\cdot dv+v\cdot du+du\cdot dv\\&=u\cdot dv+v\cdot du\end{aligned}}}
since d u d v = u ′ v ′ ( d x ) 2 = 0. {\displaystyle du\,dv=u'v'(dx)^{2}=0.} Dividing by d x {\displaystyle dx} then gives d ( u v ) d x = u d v d x
