Find all $c\in \mathbb{R}$ such that $f^{-1}(c)$ is a submanifold(Solution verification) Consider the following problem from my course notes on manifolds:

Question:Define $f: \mathbb{R}^2 \to \mathbb{R}$  by $f(x,y)= x^3 -6xy+y^2$. Find all values $c\in \mathbb{R}$ such that $f^{-1}(c)\in M$ is an embedded submanifold of $\mathbb{R}^2$.

So, $f$ is an onto map (just take $y=0$ , $x^3 $ is onto) and $f^{-1}(c) = ${$(x,y): f(x,y)=c$}. $\mathbb{R}^3$ is a manifold and there always exists a chart $(U,\phi)$ , $\phi$ is homeo. So, I think that using onto property of $f$ I think for all $c\in \mathbb{R}$ , $f^{-1}(c)$ is a submanifold as $\phi( U \cap f^{-1} (c)) $ will always be in  $\mathbb{R}^3$ and hence satisfying definition of submanifold.
Am I right?
 A: FedericoFallucca's answer shows that for $c \in \Bbb R \setminus \{0,-108\}$, $f^{-1}(c)$ is a submanifold of $\Bbb R^2$ with codimension $1$. But it does not prove that $f^{-1}(0)$ neither $f^{-1}(108)$ is or isn't a submanifold: it just shows that for these values, the Regular value Theorem does not apply.
The consideration about the critical values $0$ and $-108$ is more intricate.
Idea to show that $f^{-1}(0)$ isn't a submanifold.
Note that the two paths
\begin{align}
\gamma_1(t) &= (t, 3t + \sqrt{9t^2-t^3})\\
\gamma_2(t) &= ( t, 3t - \sqrt{9t^2-t^3})
\end{align}
defined on a suitable open interval $(-\varepsilon,0]$ are of class $\mathcal{C}^1$. With a bit of calculus, we find that $\gamma_1'(0) = (1,0)$ while $\gamma_2'(0) = (1,6)$. Therefore, if $f^{-1}(0)$ were a submanifold, its tangent space at $(0,0)$ would be two dimensional: so would be the dimension of $f^{-1}(0)$ in a neighbourhood of the origin. Hence, $f^{-1}(0)$ should contain a neighbourhood of $(0,0)$, which is plain wrong.
Here is a discussion about $f^{-1}(-108)$.
It depends on the definition of submanifold you consider. Note that $f^{-1}(-108)$ has two connected components: one is a smooth curve contained in the half plane $x<0$, the other is the point $\{(6,18)\}$. Hence, each of the connected component are submanifolds with respective dimension $1$ and $0$. If you allow submanifolds to have several components with different dimensions, then it is indeed a submanifold.
In conclusion:

*

*If one allow submanifolds to have several connected components with different dimensions, then the answer is $c \in \Bbb R \setminus \{0\}$.

*If not, the answer is $\Bbb R \setminus \{0,-108\}$.

Comment: why does $f$ behave that differently regarding the critical values $0$ and $-108$? The answer is that $(0,0)$ is a saddle point while $(6,18)$ is a local minimum, unique in a neighbourhood.
A: You can use the implicit function theorem to say that $f^{-1}(c)$ has a manifold structure if $c$ is a regular value for $f$, I.e. for each $x\in f^{-1}(c)$ the gradient $\nabla f(x)\neq 0$.
Now you have that $\nabla f=(3x^2-6y, -6x+2y)$ that is zero only for $(0,0)$ and $(6, 18)$. Thus only $c=0$ and $c=6^3-6^3 3 +6^2 9=-6^32+6^29=6^2(-12+9)=-108$ are critical values for $f$ and so $\mathbb{R}\setminus \{0,-108\}$ is contained in the set of $c$ such that $f^{-1}(c)$ has a manifold structure.
A: This is not an answer to the post, just some consideration that I think interesting.
As already shown in previous answers, if $c$ is a regular value then, $f^{-1}(c)$ is a submanifold. The converse is not true, indeed $f^{-1}(0)$ could be a submanifold also if $0$ was not a regular value, take for example the curve $f(x,y)=0$ where $f(x,y)=x^2$. I think checking when $f^{-1}(c)$ is a submanifold even if $c$ is not regular is not trivial.
My first intuition was that locally around $(0,0)$ your function should behave like its first non zero taylor part: in our case $x^3-6xy+y^2=0$ should behave like $-6xy+y^2=0$, this set consist of the lines $y=0$ and $y=6x$ (it is indeed the case for this example).From this you could argue that the original set $f(x,y)=0$ is not a submanifold because it is not locally euclidean in $0$.
This intuition turns out to be wrong in general: take for example the set $x^2+y^4=0$, which is a point,  is different from the set $x^2=0$, which is a line.
However in our case I think we can conclude $f(x,y)=0$ is not a submanifold using only the fact that its first non zero part of its taylor expansion is $-6xy+y^2$. It would be interesting to know what can be said from the first non zero part of the taylor expansion (maybe even only in the algebraic case), and have some criteria to distinguish case when $f(x,y)=0$ is a submanifold even if $0$ is not regular.
This is a bit off-topic but I thought it was interesting.
A: So to prove the statement we remember the following relevant result.

Theorem
Let $A$ be open in $\Bbb R^n$ and let $f:A\rightarrow\Bbb R$ a function of class $C^r$. So let $M$ be the set of points $x$ for which $f(x)=0$. Suppose $M$ is non-empty and $Df(x)$ has rank $1$ at each point of $M$. Then $M$ is a $(n-1)$-manifold without boundary of class $C^r$.
Proof. See paragraph 24 of the text Analysis on Manifolds by James Munkres.

So for any $c\in\Bbb R$ let be now $f:\Bbb R^2\rightarrow\Bbb R$ the function
$$
f(x,y):=x^3-6xy+y^2-c
$$
for any $x,y\in\Bbb R$. So observing that
$$
Df(x,y)=(3x^2-6y,-6x+2y)\neq 0
$$
for any $x,y\in\Bbb R^2$ such that
$$
\begin{cases}6y\neq 3x^2\\2y\neq6x\end{cases}
$$
we conclude that the restriction $\phi$ of $f$ to the open set
$$
A:=\{(x,y)\in\Bbb R^2:2y\neq 3x^2\wedge 2y\neq 6x\}=\Bbb R^2\setminus\big\{(0,0),(6,18)\big\}
$$
satisfies the hypothesis of the above theorem so that we conclude that the zero set of $\phi$ is a smooth $1$-manifold $\mathcal M$ without boundary in $\Bbb R^2$. So finally given the inclusion map $\iota:\Bbb R^2\rightarrow\Bbb R^3$ defined as
$$
\iota(x,y):=(x,y,0)
$$
then it is not hard to show that if $\iota[\mathcal M]$ is a smooth $1$-manifold without boundary in $\Bbb R^3$: indeed if $\alpha: I\rightarrow\Bbb R^2$ is a coordinate patch for $\mathcal M$ then it is not hard to show that $\iota\circ\alpha:I\rightarrow\Bbb R^2$, where $I$ is an open interval of the real line $\Bbb R$, is a coordinate patch for $\iota[\mathcal M]$.
Now if $c$ is not equal to $f(0,0)$ or to $f(6,18)$ then trivially $(0,0)$ and $(6,18)$ are not a elements of the zero set of $f$ so that we can effectively conclude, in this case, that the zero set of $f$ is a smooth $1$-manifold without $\mathcal M$ in $\Bbb R^2$ and so, by the arguments I gave, $\iota[\mathcal M]$ is effectively a smooth $1$-manifold without boundary in $\Bbb R^3$. Finally one can conclude that the zero set of $f$ for $c=f(0,0),f(6,18)$ is not a $1$-manifold without boundary in $\Bbb R^2$ observing that at the $(0,0)$ when $c=f(0,0)$ or at $(6,18)$ when $c=f(6,18)$ is not a unique tangent line to the curve defined through the equation
$$
1.\,\,\,f(x,y)-c=0
$$
so that it is not defined a tangent space. Indeed the latter equation is a ordinary polynomial equation whose degree with respect $y$ is two so that we can solve it using ordinary algebraic techniques which allow to conclude that
$$
y=\frac{-6x\pm\sqrt{36 x^2+4(c-x^3)}}2=-3x\pm\sqrt{9x^2+(c-x^3)}
$$
Now let be $\Delta:\Bbb R\rightarrow\Bbb R$ the discriminant function defined by the equation
$$
\Delta(x):=9x^2+(c-x^3)
$$
for any $x\in\Bbb R$ and thus we observe that if $c=0$ then $\Delta$ is not negative for $x$ less or equal than $9$ so that the equation $1$ define in this case a connected curve given by the union of the curves
$$
\gamma_1(t):=\big(t,-3t+\sqrt{9t^2-t^3}\big)\,\,\,\text{and}\,\,\,\gamma_2(t):=\big(t,-3t-\sqrt{9t^2-t^3}\big)
$$
for $t\in(-\infty,9]$; whereas if $c=f(6,18)$ then $\Delta$ is not negative (to solve this equation you can use the Cardano formula) for $x$ less or equal than $-3$ or for $x$ equal to $6$ so that in this case in the point $(6,18)$ is an isolated point for the curve defined by the equation $1$. Now for $c=f(0,0)$ the curves $\gamma_1$ and $\gamma_2$ "pass through" the origin for $t=0$ so that observing that
$$
\gamma_1'(0)\neq\gamma_2'(0)
$$
we conclude that for $c=0$ the zero set of $f$ is not a manifolds because the above "inequality" shows that at the origin is not defined a tangent space. Finally for $c=f(6,18)$ the zero set of $f$ is not a manifolds because a manifolds, as here showed, cannot have isolated points.
