# Leibniz's Rule/One Variable

## Theorem

Let $f$ and $g$ be real functions defined on the open interval $I$.

Let $n \in \Z_{>0}$ be a (strictly) positive integer.

Let $x \in I$ be a point in $I$ at which both $f$ and $g$ are $n$ times differentiable.

Then:

$\displaystyle \paren {\map f x \, \map g x}^{\paren n} = \sum_{k \mathop = 0}^n \binom n k \map {f^{\paren k} } x \, \map {g^{\paren {n - k} } } x$

where $\paren n$ denotes the order of the derivative.

## Proof

Proof by induction:

### Basis for the Induction

Let $n = 1$.

$\paren {\map f x \, \map g x}' = \paren {\map f x \, \map {g'} x} + \paren {\map {f'} x \, \map g x}$

Likewise:

$\displaystyle \sum_{k \mathop = 0}^1 \binom 1 k \map {f^{\paren k} } x \, \map {g^{\paren {1 - k} } } x = \binom 1 0 \map f x \, \map {g^{\paren {1 - 0} } } x + \binom 1 1 \map {f'} x \, \map {g^{\paren {1 - 1} } } x = \map f x \, \map {g'} x + \map {f'} x \, \map g x$

This is our basis for the induction.

### Induction Hypothesis

Let $n \in \N$ be fixed.

We assume the inductive hypothesis:

$\displaystyle \paren {\map f x \, \map g x}^{\paren n} = \sum_{k \mathop = 0}^n \binom n k \map {f^{\paren k} } x \, \map {g^{\paren {n - k} } } x$

We need to show that:

$\displaystyle \paren {\map f x \, \map g x}^{\paren {n + 1} } = \sum_{k \mathop = 0}^{n + 1} \binom {n + 1} k \map {f^{\paren k} } x \, \map {g^{\paren {n + 1 - k} } } x$

### Induction Step

By our inductive hypothesis:

 $\ds \paren {\map f x \, \map g x}^{\paren {n + 1} }$ $=$ $\ds \paren {\sum_{k \mathop = 0}^n \binom n k \map {f^{\paren k} } x \, \map {g^{\paren {n - k} } } x}'$ $\ds$ $=$ $\ds \sum_{k \mathop = 0}^n \binom n k \paren {\paren {\map {f^{\paren k} } x \map {g^{\paren {n - k} } } x}'}$ Applications of Linear Combination of Derivatives $\ds$ $=$ $\ds \sum_{k \mathop = 0}^n \binom n k \paren {\map {f^{\paren {k + 1} } } x \map {g^{\paren {n - k} } } x + \map {f^{\paren k} } x \, \map {g^{\paren {n + 1 - k} } } x}$ from the base case $\ds$ $=$ $\ds \sum_{k \mathop = 0}^n \binom n k \map {f^{\paren {k + 1} } } x \, \map {g^{\paren {n - k} } } x + \sum_{k \mathop = 0}^n \binom n k \map {f^{\paren k} } x \, \map {g^{\paren {n + 1 - k} } } x$ splitting the summation

Subsequently, we separate the $k = 0$ case from the second summation.

For the first summation, we separate the case $k = n$ and then shift the indices up by $1$.

These manipulations give us the following:

 $\ds \paren {\map f x \, \map g x}^{\paren {n + 1} }$ $=$ $\ds \sum_{k \mathop = 1}^n \binom n k \map {f^{\paren k} } x \map {g^{\paren {n + 1 - k} } } x + \sum_{k \mathop = 1}^n \binom n {k - 1} \map {f^{\paren k} } x \, \map {g^{\paren {n + 1 - k} } } x + \binom n 0 \map f x \map {g^{\paren {n + 1} } } x + \binom n n \map {f^{\paren {n + 1} } } x \, \map g x$

By Pascal's Rule, we finally obtain:

 $\ds \paren {\map f x \, \map g x}^{\paren {n + 1} }$ $=$ $\ds \sum_{k \mathop = 1}^n \binom {n + 1} k \map {f^{\paren k} } x \, \map {g^{\paren {n + 1 - k} } } x + \binom n 0 \map f x \, \map {g^{\paren {n + 1} } } x + \binom n n \map {f^{\paren {n + 1} } } x \map g x$ $\ds$ $=$ $\ds \sum_{k \mathop = 1}^n \binom {n + 1} k \map {f^{\paren k} } x \, \map {g^{\paren {n + 1 - k} } } x + \binom {n + 1} 0 \map f x \map {g^{\paren {n + 1} } } x + \binom {n + 1} {n + 1} \map {f^{\paren {n + 1} } } x \, \map g x$ $\ds$ $=$ $\ds \sum_{k \mathop = 0}^{n + 1} \binom {n + 1} k \map {f^{\paren k} } x \, \map {g^{\paren {n + 1 - k} } } x$

The result follows by the Principle of Mathematical Induction.

$\blacksquare$

## Also known as

Leibniz's Rule is also known as Leibniz's theorem or Leibniz theorem.

## Special Cases

### Second Derivative

Let $f$ and $g$ be real functions defined on the open interval $I$.

Let $x \in I$ be a point in $I$ at which both $f$ and $g$ are twice differentiable.

Then:

$\paren {\map f x \, \map g x}'' = \map f x \, \map {g''} x + 2 \map {f'} x \, \map {g'} x + \map {f''} x \, \map g x$

### Third Derivative

Let $f$ and $g$ be real functions defined on the open interval $I$.

Let $x \in I$ be a point in $I$ at which both $f$ and $g$ are thrice differentiable.

Then:

$\paren {\map f x \, \map g x}''' = \map f x \, \map {g'''} x + 3 \map {f'} x \, \map {g''} x + 3 \map {f''} x \, \map {g'} x + \map {f'''} x \, \map g x$

## Examples

### $8$th Derivative of $x^2 \sin x$

The $8$th derivative with respect to $x$ of $x^2 \sin x$ is given by:

$\dfrac {\d^8} {\d x^8} x^2 \sin x = x^2 \sin x - 16 x \cos x - 56 \sin x$

## Source of Name

This entry was named for Gottfried Wilhelm von Leibniz.