Faà di Bruno's formula is an identity in mathematics generalizing the chain rule to higher derivatives. It is named after Francesco Faà di Bruno (1855, 1857), although he was not the first to state or prove the formula. In 1800, more than 50 years before Faà di Bruno, the French mathematician Louis François Antoine Arbogast had stated the formula in a calculus textbook, which is considered to be the first published reference on the subject. Perhaps the most well-known form of Faà di Bruno's formula says that
where the sum is over all n {\displaystyle n} -tuples of nonnegative integers ( m 1 , … , m n ) {\displaystyle (m_{1},\ldots ,m_{n})} satisfying the constraint 1 ⋅ m 1 + 2 ⋅ m 2 + ⋯ + n ⋅ m n = n . {\displaystyle 1\cdot m_{1}+2\cdot m_{2}+\cdots +n\cdot m_{n}=n.} Sometimes, to give it a memorable pattern, it is written in a way in which the coefficients that have the combinatorial interpretation discussed below are less explicit:
Combining the terms with the same value of m 1 + m 2 + ⋯ + m n = k {\displaystyle m_{1}+m_{2}+\cdots +m_{n}=k}
and noticing that m j {\displaystyle m_{j}} has to be zero for j > n − k + 1 {\displaystyle j>n-k+1} leads to a somewhat simpler formula expressed in terms of partial (or incomplete) exponential Bell polynomials
B n , k ( x 1 , … , x n − k + 1 ) {\displaystyle B_{n,k}(x_{1},\ldots ,x_{n-k+1})} :
This formula works for all n ≥ 0 {\displaystyle n\geq 0} , however for n > 0 {\displaystyle n>0} the polynomials B n , 0 {\displaystyle B_{n,0}} are zero and thus summation in the formula can start with k = 1 {\displaystyle k=1} .
Combinatorial form The formula has a "combinatorial" form:
d n d x n f ( g ( x ) ) = ( f ∘ g ) ( n ) ( x ) = ∑ π ∈ Π f ( | π | ) ( g ( x ) ) ⋅ ∏ B ∈ π g ( | B | ) ( x ) {\displaystyle {d^{n} \over dx^{n}}f(g(x))=(f\circ g)^{(n)}(x)=\sum _{\pi \in \Pi }f^{(\left|\pi \right|)}(g(x))\cdot \prod _{B\in \pi }g^{(\left|B\right|)}(x)}
where
π {\displaystyle \pi } runs through the set Π {\displaystyle \Pi } of all partitions of the set { 1 , … , n } {\displaystyle \{1,\ldots ,n\}} , " B ∈ π {\displaystyle B\in \pi } " means the variable B {\displaystyle B} runs through the list of all of the "blocks" of the partition π {\displaystyle \pi } , and
| A | {\displaystyle |A|} denotes the cardinality of the set A {\displaystyle A} (so that | π | {\displaystyle |\pi |} is the number of blocks in the partition π {\displaystyle \pi } and | B | {\displaystyle |B|} is the size of the block B {\displaystyle B} ).
Example The following is a concrete explanation of the combinatorial form for the n = 4 {\displaystyle n=4} case.
( f ∘ g ) ⁗ ( x ) =
f ⁗ ( g ( x ) ) g ′ ( x ) 4 + 6 f ‴ ( g ( x ) ) g ″ ( x ) g ′ ( x ) 2
+ 3 f ″ ( g ( x ) ) g ″ ( x ) 2 + 4 f ″ ( g ( x ) ) g ‴ ( x ) g ′ ( x )
+ f ′ ( g ( x ) ) g ⁗ ( x ) . {\displaystyle {\begin{aligned}(f\circ g)''''(x)={}&f''''(g(x))g'(x)^{4}+6f'''(g(x))g''(x)g'(x)^{2}\\[8pt]&{}+\;3f''(g(x))g''(x)^{2}+4f''(g(x))g'''(x)g'(x)\\[8pt]&{}+\;f'(g(x))g''''(x).\end{aligned}}}
The pattern is:
g ′ ( x ) 4 ↔ 1 + 1 + 1 + 1 ↔ f ⁗ ( g ( x ) ) ↔ 1 g ″ ( x ) g ′ ( x ) 2 ↔ 2 + 1 + 1 ↔ f ‴ ( g ( x ) ) ↔ 6 g ″ ( x ) 2 ↔ 2 + 2 ↔ f ″ ( g ( x ) ) ↔ 3 g ‴ ( x ) g ′ ( x ) ↔ 3 + 1 ↔ f ″ ( g ( x ) ) ↔ 4 g ⁗ ( x ) ↔ 4 ↔ f ′ ( g ( x ) ) ↔ 1 {\displaystyle {\begin{array}{cccccc}g'(x)^{4}&&\leftrightarrow &&1+1+1+1&&\leftrightarrow &&f''''(g(x))&&\leftrightarrow &&1\\[12pt]g''(x)g'(x)^{2}&&\leftrightarrow &&2+1+1&&\leftrightarrow &&f'''(g(x))&&\leftrightarrow &&6\\[12pt]g''(x)^{2}&&\leftrightarrow &&2+2&&\leftrightarrow &&f''(g(x))&&\leftrightarrow &&3\\[12pt]g'''(x)g'(x)&&\leftrightarrow &&3+1&&\leftrightarrow &&f''(g(x))&&\leftrightarrow &&4\\[12pt]g''''(x)&&\leftrightarrow &&4&&\leftrightarrow &&f'(g(x))&&\leftrightarrow &&1\end{array}}}
The factor g ″ ( x ) g ′ ( x ) 2 {\displaystyle g''(x)g'(x)^{2}} corresponds to the partition 2 + 1 + 1 of the integer 4, in the obvious way. The factor f ‴ ( g ( x ) ) {\displaystyle f'''(g(x))} that goes with it corresponds to the fact that there are three summands in that partition. The coefficient 6 that goes with those factors corresponds to the fact that there are exactly six partitions of a set of four members that break it into one part of size 2 and two parts of size 1. Similarly, the factor g ″ ( x ) 2 {\displaystyle g''(x)^{2}} in the third line corresponds to the partition 2 + 2 of the integer 4, (4, because we are finding the fourth derivative), while f ″ ( g ( x ) ) {\displaystyle f''(g(x))} corresponds to the fact that there are two summands (2 + 2) in that partition. The coefficient 3 corresponds to the fact that there are 1 2 ( 4 2 ) = 3 {\displaystyle {\tfrac {1}{2}}{\tbinom {4}{2}}=3} ways of partitioning 4 objects into groups of 2. The same concept applies to the others. A memorizable scheme is as follows:
D 1 ( f ∘
g ) 1 ! = ( f ( 1 ) ∘
g ) g ( 1 ) 1 ! 1 ! D 2 ( f ∘ g ) 2 ! = ( f ( 1 ) ∘
g ) g ( 2 ) 2 ! 1 !
+ ( f ( 2 ) ∘
g ) g ( 1 ) 1 ! g ( 1 ) 1 ! 2 ! D 3 ( f ∘ g ) 3 ! = ( f ( 1 ) ∘
g ) g ( 3 ) 3 ! 1 !
+ ( f ( 2 ) ∘
g ) g ( 1 ) 1 ! 1 ! g ( 2 ) 2 ! 1 !
+ ( f ( 3 ) ∘
g ) g ( 1 ) 1 ! g ( 1 ) 1 ! g ( 1 ) 1 ! 3 ! D 4 ( f ∘ g ) 4 ! = ( f ( 1 ) ∘
g ) g ( 4 ) 4 ! 1 !
+ ( f ( 2 ) ∘
g ) ( g ( 1 ) 1 ! 1 ! g ( 3 ) 3 ! 1 ! + g ( 2 ) 2 ! g ( 2 ) 2 ! 2 ! )
+ ( f ( 3 ) ∘
g ) g ( 1 ) 1 ! g ( 1 ) 1 ! 2 ! g ( 2 ) 2 ! 1 !
+ ( f ( 4 ) ∘
g ) g ( 1 ) 1 ! g ( 1 ) 1 ! g ( 1 ) 1 ! g ( 1 ) 1 ! 4 ! {\displaystyle {\begin{aligned}&{\frac {D^{1}(f\circ {}g)}{1!}}&=\left(f^{(1)}\circ {}g\right){\frac {\frac {g^{(1)}}{1!}}{1!}}\\[8pt]&{\frac {D^{2}(f\circ g)}{2!}}&=\left(f^{(1)}\circ {}g\right){\frac {\frac {g^{(2)}}{2!}}{1!}}&{}+\left(f^{(2)}\circ {}g\right){\frac {{\frac {g^{(1)}}{1!}}{\frac {g^{(1)}}{1!}}}{2!}}\\[8pt]&{\frac {D^{3}(f\circ g)}{3!}}&=\left(f^{(1)}\circ {}g\right){\frac {\frac {g^{(3)}}{3!}}{1!}}&{}+\left(f^{(2)}\circ {}g\right){\frac {\frac {g^{(1)}}{1!}}{1!}}{\frac {\frac {g^{(2)}}{2!}}{1!}}&{}+\left(f^{(3)}\circ {}g\right){\frac {{\frac {g^{(1)}}{1!}}{\frac {g^{(1)}}{1!}}{\frac {g^{(1)}}{1!}}}{3!}}\\[8pt]&{\frac {D^{4}(f\circ g)}{4!}}&=\left(f^{(1)}\circ {}g\right){\frac {\frac {g^{(4)}}{4!}}{1!}}&{}+\left(f^{(2)}\circ {}g\right)\left({\frac {\frac {g^{(1)}}{1!}}{1!}}{\frac {\frac {g^{(3)}}{3!}}{1!}}+{\frac {{\frac {g^{(2)}}{2!}}{\frac {g^{(2)}}{2!}}}{2!}}\right)&{}+\left(f^{(3)}\circ {}g\right){\frac {{\frac {g^{(1)}}{1!}}{\frac {g^{(1)}}{1!}}}{2!}}{\frac {\frac {g^{(2)}}{2!}}{1!}}&{}+\left(f^{(4)}\circ {}g\right){\frac {{\frac {g^{(1)}}{1!}}{\frac {g^{(1)}}{1!}}{\frac {g^{(1)}}{1!}}{\frac {g^{(1)}}{1!}}}{4!}}\end{aligned}}}
Variations
Multivariate version Let y = g ( x 1 , … , x n ) {\displaystyle y=g(x_{1},\dots ,x_{n})} . Then the following identity holds regardless of whether the n {\displaystyle n} variables are all distinct, or all identical, or partitioned into several distinguishable classes of indistinguishable variables (if it seems opaque, see the very concrete example below):
∂ n ∂ x 1 ⋯ ∂ x n f ( y ) = ∑ π ∈ Π f ( | π | ) ( y ) ⋅ ∏ B ∈ π ∂ | B | y ∏ j ∈ B ∂ x j {\displaystyle {\partial ^{n} \over \partial x_{1}\cdots \partial x_{n}}f(y)=\sum _{\pi \in \Pi }f^{(\left|\pi \right|)}(y)\cdot \prod _{B\in \pi }{\partial ^{\left|B\right|}y \over \prod _{j\in B}\partial x_{j}}}
where (as above)
π {\displaystyle \pi } runs through the set Π {\displaystyle \Pi } of all partitions of the set { 1 , … , n } {\displaystyle \{1,\ldots ,n\}} , " B ∈ π {\displaystyle B\in \pi } " means the variable B {\displaystyle B} runs through the list of all of the "blocks" of the partition π {\displaystyle \pi } , and
| A | {\displaystyle |A|} denotes the cardinality of the set A {\displaystyle A} (so that | π | {\displaystyle |\pi |} is the number of blocks in the partition π {\displaystyle \pi } and
| B | {\displaystyle |B|} is the size of the block B {\displaystyle B} ). More general versions hold for cases wher
