# General Leibniz rule

In calculus, the general Leibniz rule,[1] named after Gottfried Wilhelm Leibniz, generalizes the product rule (which is also known as "Leibniz's rule"). It states that if ${\displaystyle f}$ and ${\displaystyle g}$ are ${\displaystyle n}$-times differentiable functions, then the product ${\displaystyle fg}$ is also ${\displaystyle n}$-times differentiable and its ${\displaystyle n}$th derivative is given by

${\displaystyle (fg)^{(n)}(x)=\sum _{k=0}^{n}{n \choose k}f^{(n-k)}(x)g^{(k)}(x)}$

where ${\displaystyle {n \choose k}={n! \over k!(n-k)!}}$ is the binomial coefficient and ${\displaystyle f^{(0)}(x)=f(x)}$.

This can be proved by using the product rule and mathematical induction (see proof below).

## Second derivative

In case ${\displaystyle n=2}$:

${\displaystyle (fg)''(x)=\sum \limits _{k=0}^{2}{{2 \choose k}f^{(2-k)}(x)g^{(k)}(x)}=f''(x)g(x)+2f'(x)g'(x)+f(x)g''(x).}$

The binomial coefficients can be deduced thanks to the Pascal's triangle.

## More than two factors

The formula can be generalized to the product of m differentiable functions f1,...,fm.

${\displaystyle \left(f_{1}f_{2}\cdots f_{m}\right)^{(n)}=\sum _{k_{1}+k_{2}+\cdots +k_{m}=n}{n \choose k_{1},k_{2},\ldots ,k_{m}}\prod _{1\leq t\leq m}f_{t}^{(k_{t})}\,,}$

where the sum extends over all m-tuples (k1,...,km) of non-negative integers with ${\displaystyle \sum _{t=1}^{m}k_{t}=n}$ and

${\displaystyle {n \choose k_{1},k_{2},\ldots ,k_{m}}={\frac {n!}{k_{1}!\,k_{2}!\cdots k_{m}!}}}$

are the multinomial coefficients. This is akin to the multinomial formula from algebra.

## Multivariable calculus

With the multi-index notation for partial derivatives of functions of several variables, the Leibniz rule states more generally:

${\displaystyle \partial ^{\alpha }(fg)=\sum _{\{\beta \,:\,\beta \leq \alpha \}}{\alpha \choose \beta }(\partial ^{\beta }f)(\partial ^{\alpha -\beta }g).}$

This formula can be used to derive a formula that computes the symbol of the composition of differential operators. In fact, let P and Q be differential operators (with coefficients that are differentiable sufficiently many times) and ${\displaystyle R=P\circ Q}$. Since R is also a differential operator, the symbol of R is given by:

${\displaystyle R(x,\xi )=e^{-{\langle x,\xi \rangle }}R(e^{\langle x,\xi \rangle }).}$

A direct computation now gives:

${\displaystyle R(x,\xi )=\sum _{\alpha }{1 \over \alpha !}\left({\partial \over \partial \xi }\right)^{\alpha }P(x,\xi )\left({\partial \over \partial x}\right)^{\alpha }Q(x,\xi ).}$

This formula is usually known as the Leibniz formula. It is used to define the composition in the space of symbols, thereby inducing the ring structure.