Suppose you've got two degrees of freedom $x$ and $y$ and a function of the form \begin{align} F(x,y) = p_1(x) p_2(y) + p_3(x) p_4(y) + \ldots + p_n(x) p_{n+1}(y), \end{align} where the $p_i$ are polynomials (of arbitrary degree).
My question is: under which circumstances can $F(x,y)$ be written in the form \begin{align} F(x,y) = Q(x) R(y) \end{align} with $Q$ and $R$ being polynomials, too. Is there any general statement one can make ? Is it possible at all ? I have googled but I couldn't find anything but I am sure that people have thought about it. I don't know where to start looking though.