Differential operator and kernel Let $P$ a polynomial of two variables, say over the field of real numbers. We define $\partial P$ as $P(\partial_x,\partial_y)$. 
In this question, it has been shown that if $P_0(x,y)=x^2+y^2$ and $\ker \partial P_O\subset \ker\partial P$ then we can find a polynomial $Q$ such that $P_0Q=P$. Now the questions are 


*

*What are the polynomials $P_0$ such that if $\ker \partial P_O\subset \ker\partial P$ then one can find a polynomial $Q$ such that $P_0Q=P$?

*What about a more general case like for example $n$ variables, $n\in\mathbb Z_{\geq 3}$?


For the first question, it works also for constant polynomials, and $P_0(x,y)=x$, $P_0(x,y)=y$. 
 A: Let's do this in $n$ variables, and over $\mathbb C$.
The polynomials $P$ such that $\ker \partial P_0 \subset \ker \partial P$ form an ideal $J$ in ${\mathbb C}[z_1,\ldots,z_n]$ which contains $P_0$.  The question is whether this ideal is generated by $P_0$.
For $f(z_1,\ldots,z_n) = \exp(\sum_j a_j z_j)$, where $a_j \in \mathbb C$, we have
$(\partial P_0) f = P_0(a_1,\ldots,a_n) f$, so $f \in \ker \partial P_0$ iff $P_0(a_1,\ldots,a_n) = 0$.  Let $V_0 = \{(a_1,\ldots,a_n) \in {\mathbb C}^n: P_0(a_1,\ldots,a_n)=0\}$, and let $J(V_0)$ be the ideal of ${\mathbb C}[z_1,\ldots,z_n]$ consisting of polynomials $P$ that are $0$ on $V_0$.  This contains $J$.   By Hilbert's Nullstellensatz, $J_0$ is actually the radical
of the ideal generated by $P_0$.  This will be the ideal generated by $P_0$ if $P_0$ is the product of distinct irreducible polynomials. And then $J$ is generated by $P_0$.
EDIT: If $P_0$ has a factor that is the $k$'th power of a polynomial, the situation is less clear to me.  I think you have to also consider functions $f$ that are products of a polynomial and an exponential.  
EDIT:  In fact the statement is true for all polynomials $P_0$.
Suppose $\ker \partial P_0 \subset \ker \partial P$.  Let $P_0 = Q^m R$ where $Q$ is irreducible and 
$\gcd(Q,R) = 1$.  I want to show that $P$ is divisible by $Q^m$.  In fact let $P = Q^k S$ where $\gcd(Q,S) = 1$, so I need to show $k \ge m$.
Take $a = (a_1, \ldots, a_n) \in {\mathbb C}^n$ such that $Q(a_1,\ldots,a_n) = 0$ while $R(a_1,\ldots,a_n) \ne 0$ and $S(a_1,\ldots,a_n) \ne 0$.  Note that for any polynomial $p$, $\partial p (g \ e^{a \cdot z}) = e^{a \cdot z} \partial(\tau_a p)(g)$ where $a \cdot z = a_1 z_1 + \ldots + a_n z_n$ and $(\tau_a p)(x_1,\ldots,x_n) = p(x_1 + a_1, \ldots, x_n + a_n)$.  $\tau_a$ is an automorphism of the ring ${\mathbb C}[x_1,\ldots,x_n]$, and $\ker \partial P_0 \subset \ker \partial P$ iff $\ker \partial (\tau_a P_0) \subset \ker \partial (\tau_a P)$.  Thus without loss of generality we can assume $a = (0,\ldots, 0)$.
Now consider the linear subspace $X_d$ of polynomials in ${\mathbb C}[x_1,\ldots,x_n]$ of degree $\le d$ (for the rest of this paragraph, all operators are considered as acting on this space, which is invariant under all constant-coefficient differential operators).  Take $d$ large enough that $\partial Q^m$ is not $0$.  Since $Q(0,\ldots,0) = 0$, if $g$ has degree $d \ge 0$ then $\partial Q(g)$
has degree less than $d$, and $\partial Q^{d+1}(g) = 0$.  Thus $\partial Q$ is nilpotent.  On the other hand, $\partial S$ is of the form $c I + N$, where $c = S(0,\ldots,0) \ne 0$ and $N$ is nilpotent, and therefore $\ker \partial S = \{0\}$.  So we have $\ker \partial Q^m \subset \ker \partial Q^k$.
Now take $g$ such that $\partial Q^{m-1}(g) \ne 0$, and let $j$ be the least nonnegative integer such that $\partial Q^{m+j}(g) = 0$ (it exists since $Q$ is nilpotent).
Thus $\partial Q^{j}(g)$ is in $\ker \partial Q^m$ but not in $\ker \partial Q^{m-1}$, so $k \ge m$ as required. 
