Factoring a multivariate polynomial.

Let $$P(x_1,\ldots,x_n)\in \mathbb{C}[x_1,\ldots,x_n]$$ a polynomial in complex $$n$$-variables. There is a method to find out if this polynomial can be written as $$P(x_1,\ldots,x_n)=m(x_1)\ldots m(x_n)$$ with $$m(x)$$ a polynomial in one variable?

• Observing $P(x,y)=x^2+y^2=(x+iy)(x-iy)$, we found out that the claim is not valid always. Jan 20 at 13:58

The polynomial has the seprated form $$P(x_1,\dots,x_n) = p_1(x_1)\cdots p_n(x_n),$$ if and only if the PDE $$P^{n-1}\frac{\partial^n}{\partial x_1 \cdots \partial x_n} P = \frac{\partial P}{\partial x_1} \cdots \frac{\partial P}{\partial x_n}$$ holds. Conditional on that fact, you may also check whether the polynomial is invariant under all permutations in $$S_n$$.