I am trying to solve the following problem from the SISSA 2010 Test:
$\textbf{2.}~$ Let $f:\mathbb R^2\to \mathbb R$ be a $C^{\infty}$ function with the following property: if $(x,y) \in \mathbb R^2$ is such that $f(x,y)=0$ then
The gradient vector $\nabla f(x,y)$ is singular.
The Hessian matrix $Hf(x,y)$ is nonsingular.
Show that $f$ admits only isolated zeroes.
Let $Z=\{(x,y)\in \mathbb R^2:f(x,y)=0\}$ be the set of zeroes of $f$. We want to show that $Z$ is totally disconnected or that, equivalently, given a point $(x_0,y_0)\in Z(f)$ there exists a neighbourhood $U$ of $(x_0,y_0)$ such that $U \cap Z(f)=\{(x_0,y_0)\}$.
Let $(x_0,y_0)$ be such that $f(x_0,y_0)=0$. I understand that under these hypotheses, we can write the second order Taylor expansion for $f$, $$f(x,y)=f(x_0,y_0)+\nabla f(x_0,y_0)(x-x_0,y-y_0)+(x-x_0,y-y_0)\cdot Hf(x_0,y_0)(x-x_0,y-y_0)+o(||(x-x_0,y-y_0)||^2)$$ If $\nabla f(x_0,y_0)$ is singular, then it has rank zero, so $$f(x,y)=(x-x_0,y-y_0)\cdot Hf(x_0,y_0)(x-x_0,y-y_0)+o(||(x-x_0,y-y_0)||^2)$$ Basically, $f$ "looks" like a nondegenerate quadratic polinomial in a neighbourhood of $(x_0,y_0)$. I tried thinking about what happens around zeroes of two-variable quadratic polynomials, but I could not proceed any further.
How can I go on constructing the neighbourhood $U$ in which $f$ is non-zero except at $(x_0,y_0)$?