Embedded Submanifold

This is a question from Lee : Introduction to Smooth manifolds. p.201

For each $a \in \mathbb{R}$, let $M_a$ be the subset of $\mathbb{R}^2$ defined by $$M_a = \{(x,y) : y^2 = x(x-1)(x-a)\}$$

For which values of $a$ is $M_a$ an embedded submanifold of $\mathbb{R}^2$? For which values can $M_a$ be given a topology and smooth structure making it into a immersed manifold?

I'm not sure how to get started. I know some things, but none of it seems to apply to this problem. For example, we know that that the graph of a smooth map $f:U \subset \mathbb{R}^{n} \rightarrow \mathbb{R}^{k}$ is an embedded submanifold of $\mathbb{R}^{n+k}$. So maybe we can write this as the graph of a smooth function? Even if that were the case, that only gives sufficiency, and this is asking for necessary and sufficient conditions.

-

You should consider the function $F(x,y)=y^2-x(x-1)(x-a)$ and see whether $0$ is its regular value (then $M_a$ is an embedded submanifold by the implicit function theorem). It is so unless $a=0$ or $a=1$. If $a=0$ then $(0,0)$ is an isolated point of $M_a$ and the rest is a smooth curve, so $M_0$ is neither embedded nor immersed curve. $M_1$ looks like $\alpha$: because of the double point it is not embedded, but it is the image of an immersion $\mathbb{R}\to\mathbb{R}^2$.
@AsdAsd: sure, that's why I treated the special cases ($a=0$ and $a=1$) – user8268 Oct 5 '12 at 20:08
@user8268 I got that the matrix of the differential is $[2ax-a-3x^2+2x,2y]$. I think you have to also consider $a=-1$ then, no? – Euler....IS_ALIVE Oct 7 '12 at 6:15
You don't, because you want the differential of $F$ to be surjective on $F^{-1}(0)$. This means that you want it to be of rank $1$, and because of the $2y$ term (image of $d/dy$ by the differential), it is enough to check for what values of $a$, $2ax - a - 3x^2 + 2x$ is non zero when $y$ is. Now, on $F^{-1}(0)$, $y$ is zero iff $x = 0$, $x = 1$, or $x = a$, which shows that the differential is non surjective iff $a = 0$ or $a = 1$. – sure Sep 29 at 8:51