The Mathematical Ninja, some time ago, pointed out a curiosity about Pascal’s Triangle and the Maclaurin ((Discovered by Taylor)) (or Taylor ((Discovered by Euler)) ) series of a product:

$\diffn{n}{(uv)}{x} = uv^{(n)} + n u’v^{(n-1)} + \frac{n(n-1)}{2} u’’ v^{(n-2)} + …$, where $v^{(n)}$ means the $n$th derivative of $v$ - which looks a lot like Pascal’s Triangle.

Naturally I thought that was A Pretty Neat Trick, and showed it to a student, who promptly asked: why?

### Oh, bugger.

I had no idea why. I did what I usually do when I don’t know why something works: I asked Barney. Barney hasn’t responded yet, so I presume he doesn’t know, either. Neither did the Googles. It was time for the last resort: work it out myself.

I’ve now figured it out, although it needed some heavy artillery; I hope it provides an insight into how a mathematical brain works.

### The Taylor Series

I’m going to use a less fiddly version of the Taylor Series than you usually see in FP whatever. I’m going to assert without proof that for any sensible ((i.e., one where all the derivatives exist)) function $u$ or $v$, for $x$ close enough to $x_0$:

$u(x) = u(x_0) + hu’(x_0) + \frac 12 h^2 u’‘(x_0) + … + \frac{1}{i!} h^i u^{(i)}(x_0) + …$, where the superscript $(i)$ means the $r$th derivative, and $h := (x - x_0)$.

I could also write, more neatly:

$v(x) = \sum_{j=0}^{\infty} \frac{h^j}{j!} v^{(j)}(x_0)$. (To me, that’s beautifully compact).

### The big gnus

I’ve also got, for $f(x) = u(x)v(x)$, $f(x) = \sum_{k=0}^{\infty} \frac{h^k}{k!} f^{(k)}(x_0)$. ((It’s not strictly necessary to use different letters for the count variable, but it’s helpful for clarity shortly.))

So, taking a deep breath, I’ve got:

$\sum_{k=0}^{\infty} \frac{h^k}{k!} f^{(k)}(x_0) = \left(\sum_{i=0}^{\infty} \frac{h^i}{i!} u^{(i)}(x_0)\right)\left(\sum_{j=0}^{\infty} \frac{h^j}{j!} v^{(j)}(x_0)\right)$. Take a moment to marvel. I’m now going to match coefficients.

### Cover me; I’m going in.

For any $k$ I happen to pick on the left, I’ll need to get all of the $h^k$ terms that come out of the infinite product on the right. Happily, there’s a simple way to find them: it’s every pair of terms where the powers of $h$ sum to $k$ - for instance, if I have $k=3$, I’ll need the $h^0$ term from the $u$ expansion multiplied by the $h^3$ term from $v$, plus the $h^1$ and $h^2$ terms, plus the $h^2$ and $h$ terms, plus the $h^3$ and $h^0$ terms - there are no other ways to make $h^3$ from those sums.

So, what do those terms look like?

On the left, I’ve got $\frac{h^k}{k!} f^{(k)}(x_0)$. On the right, I’ve got $\sum_{r=0}^{k} \frac{h^r}{r!}u^{(r)}(x_0) \times \frac{h^{(k-r)}}{(k-r)!} v^{(k-r)}(x_0)$.

That simplifies to $\frac{h^k}{r!(k-r)!} u^{(r)}v^{(k-r)}$.

Dividing both sides by $h^k$ and multiplying by $k!$ gives:

$f^{(k)}(x_0) = \frac{k!}{r!(k-r)!} u^{(r)}(x_0)v^{(k-r)}(x_0)$ - and that factorial gubbins at the beginning is just ${}^{k}C_r$ - which is the Pascal’s triangle coefficient we were looking for!

### An aside

This makes me wonder about semiderivatives - if Pascal’s triangle can be extended to negative and fractional powers, and Pascal’s triangle is implicated in the product rule, can you use these rules to figure out (say) $\diffn{\frac {1}{2}}{y}{x}$? I figure it’ll need some gamma function magic, but I just figured out that $\diffn{\frac {1}{2}}{x^2}{x} \simeq 1.505x^{\frac{3}{2}}$. What that means, on the other hand, is an open question to me.