I'm trying to prove that the gravitational force $\vec{F} = -G \frac{Mm}{r^2} \hat{r}$ is a conservative force, but if I write it explicitly $$\vec{F}=-K[1/(x^2 + y^2) \hat{x} + 1/(x^2 + y^2) \hat{y}]$$
we can see that $$\frac{\partial(1/(x^2 + y^2))}{\partial y} \not=\frac{\partial(1/(x^2 + y^2))}{\partial x}$$
so how can gravitational force can be a conservative force while it doesn't satisfy the necessary condition for being a conservative force ?
The unit vector $\hat r$ is $$\frac1{\sqrt{x^2+y^2}}(x{\bf i}+y{\bf j})\ ,$$ so $${\bf G}=-K\Bigl(x(x^2+y^2)^{-3/2}{\bf i}+y(x^2+y^2)^{-3/2}{\bf j}\Bigr)\ .$$ We have $$\frac{\partial}{\partial y}x(x^2+y^2)^{-3/2} =-3xy(x^2+y^2)^{-5/2} =\frac{\partial}{\partial x}y(x^2+y^2)^{-3/2}\ .$$