I asked a similar question on math stack exchange but didn't get an answer so I will try to ask it here. Any help/suggestion is most than welcome! Let $D$ be a linear differential operator with polynomial coefficients on $\mathbb{R}^n$. Thus
$$\displaystyle D=\sum_{\lvert \alpha\rvert\leqslant k} P_\alpha(x) \frac{\partial^{\lvert \alpha\rvert}}{\partial x^\alpha}$$
where the $P_\alpha$'s are polynomial functions on $\mathbb{R}^n$. Consider $D$ as an endomorphism of the space of Schwartz functions $\mathcal{S}(\mathbb{R}^n)$. My question is now the following:
Is the image of $D$ a closed subspace of $\mathcal{S}(\mathbb{R}^n)$ (for its natural Frechet topology)? Is there any good reason for that? Even an answer in the particular case $n=1$ would be greatly appreciated!