# General Leibniz rule for triple products

I have a question regarding the General Leibniz rule which is the rule for the $n^{th}$ derivative of a product and reads: $$(f g)^{(n)}=\sum_{k=0}^{n} {n \choose k} \,f^{(k)} g^{(n-k)}.$$ However, what about if there is a triple product instead of just a product. (i.e. $(f \cdot g \cdot h)^{(n)}$)? Is there a comprahensive formula for such a derivative? I have yet to find one, but perhaps someone knows it.

## 3 Answers

Yes, it is. Just change binomial coefficient to trinomial coefficient. Namely $$(f\cdot g\cdot h)^{(n)}=\sum_{k_1+k_2+k_3=n}{n\choose {k_1,k_2,k_3}}f^{(k_1)}g^{(k_2)}h^{(k_3)}$$ The proof is quite straightforward from Leibniz rule. \begin{align}(fgh)^{(n)}&=\sum_{k=0}^n\frac{n!}{k!(n-k)!}f^{(k)}(gh)^{(n-k)}\\&=\sum_{k=0}^n\frac{n!}{k!(n-k)!}f^{(k)}\sum_{l=0}^{n-k}\frac{(n-k)!}{(n-k-l)!l!}g^{(l)}h^{(n-k-l)}\\&=\sum_{k+l\leq n}^n\frac{n!}{k!l!(n-k-l)!}f^{(k)}g^{(l)}h^{(n-k-l)}\end{align} As you can see, this can be generalized to product of any $m$ functions via multinomial coefficient by induction.

• Since the OP is obviously new to this, it might be nice to describe, or at least provide a link to a definition of, a trinomial (multinomial) coefficient.
– robjohn
Commented Dec 23, 2013 at 15:10
• Okay, you appended your answer before I finished mine.
– robjohn
Commented Dec 23, 2013 at 15:21
• @robjohn Hah. Sorry for that :P Commented Dec 23, 2013 at 15:24
• @robjohn Can we use the guess that $\sum\limits_{k_1+k_2+k_3=k}$ is equivalent to $\sum\limits_{k_1=0}^k \sum\limits_{k_2=0}^k\sum\limits_{k_3=0}^k$ ? Commented Oct 4, 2022 at 23:48
• @TymaGaidash: those are definitely not equivalent. The second includes a lot of triples $(k_1,k_2,k_3)$ that the first does not.
– robjohn
Commented Oct 5, 2022 at 9:05

In general $$\bigg(\prod_{j=1}^m f_j\bigg)^{\!(n)}=\sum_{\substack{k_1,\ldots,k_m\ge 0\\ k_1+\cdots+k_m=n}} \frac{n!}{k_1!\cdots k_m!} f_1^{(k_1)}\cdots f_m^{(k_m)}.$$

Using the standard Leibniz rule for products twice: \begin{align} ((f\cdot g)\cdot h)^{(n)} &=\sum_{k=0}^n\binom{n}{k}(f\cdot g)^{(k)}h^{(n-k)}\\ &=\sum_{k=0}^n\binom{n}{k}\sum_{j=0}^k\binom{k}{j}f^{(j)}g^{(k-j)}h^{(n-k)}\\ &=\sum_{k=0}^n\sum_{j=0}^k\frac{n!}{j!(k-j)!(n-k)!}f^{(j)}g^{(k-j)}h^{(n-k)}\\ &=\sum_{j=0}^n\sum_{k=j}^n\frac{n!}{j!(k-j)!(n-k)!}f^{(j)}g^{(k-j)}h^{(n-k)}\\ &=\sum_{j=0}^n\sum_{k=0}^{n-j}\frac{n!}{j!k!(n-k-j)!}f^{(j)}g^{(k)}h^{(n-k-j)}\\ &=\sum_{\substack{i+j+k=n\\i,j,k\ge0}}\frac{n!}{i!j!k!}f^{(j)}g^{(k)}h^{(i)} \end{align}

• This was added to Shuchang's answer before I finished writing.
– robjohn
Commented Dec 23, 2013 at 15:23