The derivatives of a real polynomial function $f(x,y)$ are divisible by a certain polynomial of $x$ and $y$. What can we know about $f\mkern1mu$? Given $f(x,y)$, a two real variable polynomial such that $\frac{\partial f(x,y)}{\partial x}$ and $\frac{\partial f(x,y)}{\partial y}$ are divisible by $x^2+y^2-1$. Prove that there exist a polynomial $g(x,y)$ and a constant $c$ such that:
$$f(x,y)= g(x,y){(x^2+y^2-1)}^2+c$$
That is the problem I'm currently trying to solve. I first tried to write de derivatives in the form $P(x,y)*
({x^2+y^2-1})$ with $P(x,y)$ being a polynomial. Then tried to write both $P$ and ${x^2+y^2-1}$ as derivatives of a function (one at a time) to perform integrarion by parts, but it led me nowhere.
Any ideas in how to solve it? If it's possible to just give me a hint in how to start and not the whole solution I'd appreciate it very much
 A: We may assume that $f(1,0)=0.$
Note that $$\frac{d}{d\theta}(f(\cos{\theta},\sin{\theta}))=-\sin{\theta}\frac{\partial f}{\partial x}(\cos{\theta},\sin{\theta})+\cos{\theta}\frac{\partial f}{\partial y}(\cos{\theta},\sin{\theta})=0,$$ by the properties of $f,$ so $f$ vanishes on the unit circle. So we can write $f(x,y)=f_1(x,y)(x^2+y^2-1)$. 
Now, $$\frac{d}{dr}_{|r=1} (f(r\cos{\theta},r\sin{\theta}))=\cos{\theta}\frac{\partial f}{\partial x}(r\cos{\theta},r\sin{\theta})+\sin{\theta}\frac{\partial f}{\partial y}(r\cos{\theta},r\sin{\theta})=0.$$
On the other hand, $f(r\cos{\theta},r\sin{\theta})=f_1(r\cos{\theta},r\sin{\theta})(r+1)(r-1)$, so the derivative wrt $r$ when $r=1$ is $2f_1(\cos{\theta},\sin{\theta})$, so $f_1$ vanishes also on the unit circle so is divisible by $x^2+y^2-1$, QED. 
A: First treat $y$ as a constant. Then, by polynomial division, we can write $f(x,y)$ as
$h(x)(x^2+y^2-1)^2+$ A cubic in $x$. 
For the derivative of the cubic to be a multiple of $x^2+y^2-1$, the cubic must be $$a(x^3+3(y^2-1)x)+b,$$ 
where $a$ and $b$  are constants (i.e. functions of $y$ only). Note that the coefficients of $h(x)$ are also functions of $y$.
The only condition which now needs to be satisfied is for the partial derivative of this cubic w.r.t. $y$ to be a multiple of $x^2+y^2-1$.This partial derivative is $$\frac{da}{dy}(x^3+3(y^2-1)x)+6axy+\frac{db}{dy}$$
and, by comparing coefficients of $x$ and $x^3$, we require $$\frac{da}{dy}(y^2-1)=-3a ,\frac{db}{dy}=0.$$ The differential equations have solutions $a=A(y^2-1)^{-\frac{3}{2}}$ and $b=B$, where $A$ and $B$ are (genuine) constants. So the only polynomial solution is obtained when $A=0 $ and therefore the 'cubic in $x$' is just the constant $B$. 
