Product rule

From HandWiki
Revision as of 23:08, 6 February 2024 by AIposter (talk | contribs) (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Formula for the derivative of a product
Geometric illustration of a proof of the product rule

In calculus, the product rule (or Leibniz rule[1] 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 [math]\displaystyle{ (u \cdot v)' = u ' \cdot v + u \cdot v' }[/math] or in Leibniz's notation as [math]\displaystyle{ \frac{d}{dx} (u\cdot v) = \frac{du}{dx} \cdot v + u \cdot \frac{dv}{dx}. }[/math]

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 differentials.[2] (However, J. M. Child, a translator of Leibniz's papers,[3] argues that it is due to Isaac Barrow.) Here is Leibniz's argument: Let u(x) and v(x) be two differentiable functions of x. Then the differential of uv is

[math]\displaystyle{ \begin{align} d(u\cdot v) & {} = (u + du)\cdot (v + dv) - u\cdot v \\ & {} = u\cdot dv + v\cdot du + du\cdot dv. \end{align} }[/math]

Since the term du·dv is "negligible" (compared to du and dv), Leibniz concluded that

[math]\displaystyle{ d(u\cdot v) = v\cdot du + u\cdot dv }[/math]

and this is indeed the differential form of the product rule. If we divide through by the differential dx, we obtain

[math]\displaystyle{ \frac{d}{dx} (u\cdot v) = v \cdot \frac{du}{dx} + u \cdot \frac{dv}{dx} }[/math]

which can also be written in Lagrange's notation as

[math]\displaystyle{ (u\cdot v)' = v\cdot u' + u\cdot v'. }[/math]

Examples

  • Suppose we want to differentiate [math]\displaystyle{ f(x)=x^2\text {sin}(x). }[/math] By using the product rule, one gets the derivative [math]\displaystyle{ f'(x)=2x\cdot \text {sin}(x)+x^2\text {cos} (x) }[/math] (since the derivative of [math]\displaystyle{ x^2 }[/math] is [math]\displaystyle{ 2x, }[/math] 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 [math]\displaystyle{ f(x) }[/math] is a differentiable function, then [math]\displaystyle{ c\cdot f(x) }[/math] is also differentiable, and its derivative is [math]\displaystyle{ (cf)'(x)=c \cdot f'(x). }[/math] 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, [math]\displaystyle{ f(x)g(x+\Delta x)-f(x)g(x+\Delta x) }[/math] (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.

[math]\displaystyle{ \begin{align} 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 \underbrace{\lim_{\Delta x\to 0} g(x+\Delta x)}_\text{See the note below.} + \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{align} }[/math]

The fact that [math]\displaystyle{ \lim_{\Delta x\to0} g(x+\Delta x) = g(x) }[/math] follows from the fact that differentiable functions are continuous.

Linear approximations

By definition, if [math]\displaystyle{ f, g: \mathbb{R} \to \mathbb{R} }[/math] are differentiable at [math]\displaystyle{ x }[/math], then we can write linear approximations: [math]\displaystyle{ f(x+h) = f(x) + f'(x)h + \varepsilon_1(h) }[/math] and [math]\displaystyle{ g(x+h) = g(x) + g'(x)h + \varepsilon_2(h), }[/math] where the error terms are small with respect to h: that is, [math]\displaystyle{ \lim_{h \to 0} \frac{\varepsilon_1(h)}{h} = \lim_{h \to 0} \frac{\varepsilon_2(h)}{h} = 0, }[/math] also written [math]\displaystyle{ \varepsilon_1, \varepsilon_2 \sim o(h) }[/math]. Then: [math]\displaystyle{ \begin{align} 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{align} }[/math] The "error terms" consist of items such as [math]\displaystyle{ f(x)\varepsilon_2(h), f'(x)g'(x)h^2 }[/math] and [math]\displaystyle{ hf'(x)\varepsilon_1(h) }[/math] which are easily seen to have magnitude [math]\displaystyle{ o(h). }[/math] Dividing by [math]\displaystyle{ h }[/math] and taking the limit [math]\displaystyle{ h\to 0 }[/math] gives the result.

Quarter squares

This proof uses the chain rule and the quarter square function [math]\displaystyle{ q(x)=\tfrac14x^2 }[/math] with derivative [math]\displaystyle{ q'(x) = \tfrac12 x }[/math]. We have:

[math]\displaystyle{ uv=q(u+v)-q(u-v), }[/math]

and differentiating both sides gives:

[math]\displaystyle{ \begin{align} f' &= q'(u+v)(u'+v') - q'(u-v)(u'-v') \\[4pt] &= \left(\tfrac12(u+v)(u'+v')\right) - \left(\tfrac12(u-v)(u'-v')\right) \\[4pt] &= \tfrac12(uu' + vu' + uv' + vv') - \tfrac12(uu' - vu' - uv' + vv') \\[4pt] &= vu'+uv' . \end{align} }[/math]

Multivariable chain rule

The product rule can be considered a special case of the chain rule for several variables, applied to the multiplication function [math]\displaystyle{ m(u,v)=uv }[/math]:

[math]\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}. }[/math]

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

[math]\displaystyle{ \begin{align} \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{align} }[/math]

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 [math]\displaystyle{ dx }[/math] be a nilsquare infinitesimal. Then [math]\displaystyle{ du = u'\ dx }[/math] and [math]\displaystyle{ dv = v'\ dx }[/math], so that

[math]\displaystyle{ \begin{align} 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{align} }[/math]

since [math]\displaystyle{ du \, dv = u' v' (dx)^2 = 0. }[/math] Dividing by [math]\displaystyle{ dx }[/math] then gives [math]\displaystyle{ \frac{d(uv)}{dx} = u \frac{dv}{dx} + v \frac{du}{dx} }[/math] or [math]\displaystyle{ (uv)' = u \cdot v' + v \cdot u' }[/math].

Logarithmic differentiation

Let [math]\displaystyle{ h(x) = f(x) g(x) }[/math]. Taking the absolute value of each function and the natural log of both sides of the equation,

[math]\displaystyle{ \ln|h(x)| = \ln|f(x) g(x)| }[/math]

Applying properties of the absolute value and logarithms,

[math]\displaystyle{ \ln|h(x)| = \ln|f(x)| + \ln|g(x)| }[/math]

Taking the logarithmic derivative of both sides and then solving for [math]\displaystyle{ h'(x) }[/math]:

[math]\displaystyle{ \frac{h'(x)}{h(x)} = \frac{f'(x)}{f(x)} + \frac{g'(x)}{g(x)} }[/math]

Solving for [math]\displaystyle{ h'(x) }[/math] and substituting back [math]\displaystyle{ f(x) g(x) }[/math] for [math]\displaystyle{ h(x) }[/math] gives:

[math]\displaystyle{ \begin{align} h'(x) &= h(x)\left(\frac{f'(x)}{f(x)} + \frac{g'(x)}{g(x)}\right) \\ &= f(x) g(x)\left(\frac{f'(x)}{f(x)} + \frac{g'(x)}{g(x)}\right) \\ &= f'(x) g(x) + f(x) g'(x). \end{align} }[/math]

Note: Taking the absolute value of the functions is necessary for the logarithmic differentiation of functions that may have negative values, as logarithms are only real-valued for positive arguments. This works because [math]\displaystyle{ \tfrac{d}{dx}(\ln |u|) = \tfrac{u'}{u} }[/math], which justifies taking the absolute value of the functions for logarithmic differentiation.

Generalizations

Product of more than two factors

The product rule can be generalized to products of more than two factors. For example, for three factors we have

[math]\displaystyle{ \frac{d(uvw)}{dx} = \frac{du}{dx}vw + u\frac{dv}{dx}w + uv\frac{dw}{dx}. }[/math]

For a collection of functions [math]\displaystyle{ f_1, \dots, f_k }[/math], we have

[math]\displaystyle{ \frac{d}{dx} \left [ \prod_{i=1}^k f_i(x) \right ] = \sum_{i=1}^k \left(\left(\frac{d}{dx} f_i(x) \right) \prod_{j=1,j\ne i}^k f_j(x) \right) = \left( \prod_{i=1}^k f_i(x) \right) \left( \sum_{i=1}^k \frac{f'_i(x)}{f_i(x)} \right). }[/math]

The logarithmic derivative provides a simpler expression of the last form, as well as a direct proof that does not involve any recursion. The logarithmic derivative of a function f, denoted here Logder(f), is the derivative of the logarithm of the function. It follows that

[math]\displaystyle{ \operatorname{Logder}(f)=\frac {f'}f. }[/math]

Using that the logarithm of a product is the sum of the logarithms of the factors, the sum rule for derivatives gives immediately

[math]\displaystyle{ \operatorname{Logder}(f_1\cdots f_k)= \sum_{i=1}^k\operatorname{Logder}(f_i). }[/math]

The last above expression of the derivative of a product is obtained by multiplying both members of this equation by the product of the [math]\displaystyle{ f_i. }[/math]

Higher derivatives

Main page: General Leibniz rule

It can also be generalized to the general Leibniz rule for the nth derivative of a product of two factors, by symbolically expanding according to the binomial theorem:

[math]\displaystyle{ d^n(uv) = \sum_{k=0}^n {n \choose k} \cdot d^{(n-k)}(u)\cdot d^{(k)}(v). }[/math]

Applied at a specific point x, the above formula gives:

[math]\displaystyle{ (uv)^{(n)}(x) = \sum_{k=0}^n {n \choose k} \cdot u^{(n-k)}(x)\cdot v^{(k)}(x). }[/math]

Furthermore, for the nth derivative of an arbitrary number of factors, one has a similar formula with multinomial coefficients:

[math]\displaystyle{ \left(\prod_{i=1}^kf_i\right)^{\!\!(n)}=\sum_{j_1+j_2+\cdots+j_k=n}{n\choose j_1,j_2,\ldots,j_k}\prod_{i=1}^kf_i^{(j_i)}. }[/math]

Higher partial derivatives

For partial derivatives, we have[4]

[math]\displaystyle{ {\partial^n \over \partial x_1\,\cdots\,\partial x_n} (uv) = \sum_S {\partial^{|S|} u \over \prod_{i\in S} \partial x_i} \cdot {\partial^{n-|S|} v \over \prod_{i\not\in S} \partial x_i} }[/math]

where the index S runs through all 2n subsets of {1, ..., n}, and ‹See Tfd›|S| is the cardinality of S. For example, when n = 3,

[math]\displaystyle{ \begin{align} & {\partial^3 \over \partial x_1\,\partial x_2\,\partial x_3} (uv) \\[6pt] = {} & u \cdot{\partial^3 v \over \partial x_1\,\partial x_2\,\partial x_3} + {\partial u \over \partial x_1}\cdot{\partial^2 v \over \partial x_2\,\partial x_3} + {\partial u \over \partial x_2}\cdot{\partial^2 v \over \partial x_1\,\partial x_3} + {\partial u \over \partial x_3}\cdot{\partial^2 v \over \partial x_1\,\partial x_2} \\[6pt] & + {\partial^2 u \over \partial x_1\,\partial x_2}\cdot{\partial v \over \partial x_3} + {\partial^2 u \over \partial x_1\,\partial x_3}\cdot{\partial v \over \partial x_2} + {\partial^2 u \over \partial x_2\,\partial x_3}\cdot{\partial v \over \partial x_1} + {\partial^3 u \over \partial x_1\,\partial x_2\,\partial x_3}\cdot v. \end{align} }[/math]

Banach space

Suppose X, Y, and Z are Banach spaces (which includes Euclidean space) and B : X × YZ is a continuous bilinear operator. Then B is differentiable, and its derivative at the point (x,y) in X × Y is the linear map D(x,y)B : X × YZ given by

[math]\displaystyle{ (D_\left( x,y \right)\,B)\left( u,v \right) = B\left( u,y \right) + B\left( x,v \right)\qquad\forall (u,v)\in X \times Y. }[/math]

This result can be extended[5] to more general topological vector spaces.

In vector calculus

The product rule extends to various product operations of vector functions on [math]\displaystyle{ \mathbb{R}^n }[/math]:[6]

  • For scalar multiplication: [math]\displaystyle{ (f \cdot \mathbf g)' = f'\cdot \mathbf g + f \cdot \mathbf g' }[/math]
  • For dot product: [math]\displaystyle{ (\mathbf f \cdot \mathbf g)' = \mathbf f' \cdot \mathbf g + \mathbf f \cdot \mathbf g' }[/math]
  • For cross product of vector functions on [math]\displaystyle{ \mathbb{R}^3 }[/math]: [math]\displaystyle{ (\mathbf f \times \mathbf g)' = \mathbf f' \times \mathbf g + \mathbf f \times \mathbf g' }[/math]

There are also analogues for other analogs of the derivative: if f and g are scalar fields then there is a product rule with the gradient:

[math]\displaystyle{ \nabla (f \cdot g) = \nabla f \cdot g + f \cdot \nabla g }[/math]

Such a rule will hold for any continuous bilinear product operation. Let B : X × YZ be a continuous bilinear map between vector spaces, and let f and g be differentiable functions into X and Y, respectively. The only properties of multiplication used in the proof using the limit definition of derivative is that multiplication is continuous and bilinear. So for any continuous bilinear operation, [math]\displaystyle{ H(f, g)' = H(f', g) + H(f, g'). }[/math] This is also a special case of the product rule for bilinear maps in Banach space.

Derivations in abstract algebra and differential geometry

In abstract algebra, the product rule is the defining property of a derivation. In this terminology, the product rule states that the derivative operator is a derivation on functions.

In differential geometry, a tangent vector to a manifold M at a point p may be defined abstractly as an operator on real-valued functions which behaves like a directional derivative at p: that is, a linear functional v which is a derivation,

[math]\displaystyle{ v(fg) = v(f)\,g(p) + f(p) \, v(g). }[/math]

Generalizing (and dualizing) the formulas of vector calculus to an n-dimensional manifold M, one may take differential forms of degrees k and l, denoted [math]\displaystyle{ \alpha\in \Omega^k(M), \beta\in \Omega^\ell(M) }[/math], with the wedge or exterior product operation [math]\displaystyle{ \alpha\wedge\beta\in \Omega^{k+\ell}(M) }[/math], as well as the exterior derivative [math]\displaystyle{ d:\Omega^m(M)\to\Omega^{m+1}(M) }[/math]. Then one has the graded Leibniz rule:

[math]\displaystyle{ d(\alpha\wedge\beta)= d\alpha \wedge \beta + (-1)^{k} \alpha\wedge d\beta. }[/math]

Applications

Among the applications of the product rule is a proof that

[math]\displaystyle{ {d \over dx} x^n = nx^{n-1} }[/math]

when n is a positive integer (this rule is true even if n is not positive or is not an integer, but the proof of that must rely on other methods). The proof is by mathematical induction on the exponent n. If n = 0 then xn is constant and nxn − 1 = 0. The rule holds in that case because the derivative of a constant function is 0. If the rule holds for any particular exponent n, then for the next value, n + 1, we have

[math]\displaystyle{ \begin{align} {d \over dx}x^{n+1} &{}= {d \over dx}\left( x^n\cdot x\right) \\[12pt] &{}= x{d \over dx} x^n + x^n{d \over dx}x \qquad\mbox{(the product rule is used here)} \\[12pt] &{}= x\left(nx^{n-1}\right) + x^n\cdot 1\qquad\mbox{(the induction hypothesis is used here)} \\[12pt] &{}= (n + 1)x^n. \end{align} }[/math]

Therefore, if the proposition is true for n, it is true also for n + 1, and therefore for all natural n.

See also

References

  1. "Leibniz rule – Encyclopedia of Mathematics". https://encyclopediaofmath.org/wiki/Leibniz_rule. 
  2. Michelle Cirillo (August 2007). "Humanizing Calculus". The Mathematics Teacher 101 (1): 23–27. doi:10.5951/MT.101.1.0023. http://www.nctm.org/publications/article.aspx?id=19302. 
  3. Leibniz, G. W. (2005), The Early Mathematical Manuscripts of Leibniz, Dover, p. 28, footnote 58, ISBN 978-0-486-44596-0, http://dynref.engr.illinois.edu/rvc_Child_1920.pdf 
  4. Micheal Hardy (January 2006). "Combinatorics of Partial Derivatives". The Electronic Journal of Combinatorics 13. Bibcode2006math......1149H. https://www.emis.de//journals/EJC/Volume_13/PDF/v13i1r1.pdf. 
  5. Kreigl, Andreas; Michor, Peter (1997). The Convenient Setting of Global Analysis. American Mathematical Society. p. 59. ISBN 0-8218-0780-3. https://www.mat.univie.ac.at/~michor/apbookh-ams.pdf. 
  6. Stewart, James (2016), Calculus (8 ed.), Cengage , Section 13.2.