Finite-Dimensional Subspaces Invariant under Differentiation Let $X$ be the linear space of complex continuously-differentiable functions on $\mathbb{R}$. If $M$ is a non-trivial finite-dimensional subspace of $X$ which is invariant under differentiation, does $M$ has a basis of functions of the form $e^{\lambda x}x^{n}$?
This problem has an elegant solution, and I can't find that it's a duplicate. So I thought I'd post this question here for others to ponder.
 A: Yes, there is such a basis. Let $D$ be differentiation. If $D : M\rightarrow M$ where $M$ is a finite-dimensional subspace of continuously differentiable functions, then $D$ has a minimal polynomial $p(D)=(D-\lambda_{1})^{r_{1}}\cdots(D-\lambda_{n})^{r_{n}}$ where the $\lambda_{j}$ are distinct; this means that every $f \in M$ satisfies a differential equation
$$
                  p(D)=(D-\lambda_{1})^{r_{1}}\cdots (D-\lambda_{n})^{r_{n}}f = 0.
$$
So every $f \in M$ can be written as
$$
      f(x) = \sum_{j=1}^{n}p_{r_{j}}(x)e^{\lambda_{j}x},
$$
where $p_{r_{j}}$ is a polynomial whose degree does not exceed $r_{j}-1$. Applying $(D-\lambda)^{k}$ to such $f$ produces another element of $M$ because $M$ is invariant under $D$. And there must be an element $f_{k} \in M$ such that
$$
          g=(D-\lambda_{1})^{r_{k}-1}\prod_{j\ne k}(D-\lambda_{j})^{r_{j}}f_{k} \ne 0.
$$
Therefore, $g_{k}=\prod_{j\ne k}(D-\lambda_{j})^{r_{j}}f_{k}$ is in $M$ and satisfies
$$
       (D-\lambda_{k})^{r_{k}}g_{k}=0,\;\; (D-\lambda_{k})^{r_{k}-1}g_{k}\ne 0.
$$
This guarantees that there is an element of $M$ of the form $p_{k}(x)e^{\lambda_{k}x}$,
where $p_{k}$ is a monomial of order $k-1$ (i.e., highest order coefficient $1$.) Then
$$
     (D-\lambda_{k})^{l}(p_{k}(x)e^{\lambda_{k}x})=e^{\lambda_{k}x}D^{l}p_{k}\in M,
            \;\;\;\;0 \le l \le r_{k}-1,
$$
which is enough to guarantee that the following elements are in $M$:
$$
          x^{r_{k}-1}e^{\lambda_{k}x},x^{r_{k}-2}e^{\lambda_{k}x},\cdots,xe^{\lambda_{k}x},e^{\lambda_{k}x},
           \;\;\;\; 1 \le k \le n.
$$
The set $B$ of all such elements is a linearly-independent subset of $M$. As noted in the second equation of this post, every $f\in M$ can be written as a linear combination of the elements of $B$. So $B$ is a basis for $M$. So, knowing the minimal polynomial of $D$ on $M$ is enough to know a full basis for $M$.
