Freaky Polynomial: $P_n(x)=\left(x\frac{d}{dx}\right)^n f(x)$

Here is a supplementary to user @bonsoon's comment as to why the Stirling numbers of the second kind pop up. This begins with the identity

$$ x^n = \sum_{k=0}^{n} \left\{ {n \atop k} \right\} (x)_k, $$

where

  • $\left\{{n \atop k}\right\}$ is the Stirling number of the second kind, which counts the number of ways of partitioning the set $\{1,\cdots,n\}$ into $k$ parts, and

  • $(x)_k = x(x-1)\cdots(x-k+1)$ is the falling factorial.

(See the Wikipedia article, for instance.) Now if we introduce two operators $D = \frac{d}{dx}$ and $L = x\frac{d}{dx}$, then they satisfy $ L^n(x^a) = a^n x^a $ and $ D^n(x^a) = (a)_n x^{a-n} $, and so,

$$ L^n(x^a) = a^n x^a = \sum_{k=0}^{n} \left\{ {n \atop k} \right\} (a)_k x^a = \sum_{k=0}^{n} \left\{ {n \atop k} \right\} x^k D^k (x^a). $$

Since both $L$ and $D$ are linear, the same identity holds for any polynomial $f(x)$ in place of $x^a$, yielding

$$ L^n f = \sum_{k=0}^{n} \left\{ {n \atop k} \right\} x^k D^k f. $$

Of course, this extends to any $C^n$-function $f$ by polynomial approximation.


For integers $n,k$ with $n\ge 0$, let ${n\brace k}$ denote the Stirling numbers of the second kind, which count the number of partitions of a set of size $n$ into $k$ nonempty, non-distinct parts. These satisfy the following recurrence, which can be taken as their definition: $$ {n\brace k}={n-1 \brace k-1}+k{n-1\brace k},\\ {0\brace 0}=1,{0\brace k}=0\text{ for }k\neq 0 $$

Now, let $D$ be the differential operator, and let $X$ be the operator which takes in a function $f$ and returns $xf$. As a special case of the product rule, we have the operator identity $$ DX=XD+1 $$ where $1$ is the identity, $1f=f$. Indeed, applying both sides to some function $f$, you get $D(xf)=x(Df)+f$. More generally, $$ DX^k=X^kD+kX^{k-1} $$ You can now prove by induction that $$ (XD)^n=\sum_k {n \brace k}X^kD^k $$ where the sum ranges over all integral $k$ (but is effectively finite since ${n \brace k}$ is zero for $k$ outside $[0,n]$) as follows:

\begin{align} (XD)^n &=(XD)(XD)^{n-1} \\&=(XD)\sum_k {n-1 \brace k}X^k D^k \\&=\sum_k {n-1\brace k}XDX^kD^k \\&=\sum_k {n-1\brace k}X(X^kD+kX^{k-1})D^k \\&=\sum_k {n-1 \brace k}(X^{k+1}D^{k+1}+kX^kD^k) \\&=\sum_k \Big(k{n-1\brace k}+{n-1\brace k-1}\Big)X^kD^k \\&=\sum_k {n\brace k}X^kD^k \end{align}