When is a singular point of a variety smooth?

If $X$ is a nonsingular algebraic (or analytic) variety over $\mathbb C$ or $\mathbb R$ then it is certainly $C^\infty$ over the reals.
The converse is false for a silly reason : in the real or complex affine plane with coordinates $x,y$ the variety $x^2=0$ is singular since it is not reduced, but set-theoretically it is the $y$-axis, a $C^\infty$ submanifold of the plane.
So let me concentrate on reduced varieties.

Over the reals you have the disturbing phenomenon that the plane curve $C$ defined by $y^3+2x^2y-x^4=0$ is algebraically singular at the origin, but your favourite computer graphics system won't show you that, because the curve is actually $C^\infty$.
Worse: it is the graph of a real analytic function! (I learned this example in Milnor's Singular Points of Complex Hypersurfaces)

I think this pathology is impossible over $\mathbb C$ but I cannot find a reference. So let me ask the official question:

Can a reduced algebraic (or analytic) variety which has a singularity at a point be $C^\infty$ at that point?

(Information on the more complicated real case welcome, of course)

Edit Francesco's answer shows that indeed a singular complex variety cannot be smooth.
This is quite interesting, because many books will give you the Jacobian criterion for a map $\mathbb C^n\to \mathbb C^k$ to define a submanifold but none (to my knowledge) adds that this Jacobian criterion also allows to prove nonsmoothness (modulo some technicalities), which is paradoxically a more delicate question.

Second Edit (June 29th,2012)) Here is a proof more geometric than Milnor's that the curve $X$ defined by $y^3+2x^2y-x^4=0$ is an analytic submanifold of $\mathbb R^2$.
The curve $X$ is actually rational: it is the image of $\mathbb R$ under $\phi (t)=(t^3+2t,t(t^3+2))$.
The analytic morphism $\phi$ is injective, proper and immersive, hence an embedding into $\mathbb R^2$ with closed image $X$. [It boils down to the fact that the polynomial $t^3+2t$ has positive derivative $3t^2+2$ and is thus strictly increasing!]

-
+1 for your example: Pictures cannot always be trusted .. –  Martin Brandenburg May 30 '12 at 17:16
This question and the answers are fantastic. MO at its very best. –  Olivier Jun 1 '12 at 6:05

NB: This answer is directed to the questions about the real case, not the complex case, which was already treated by Francesco.

In some sense, the reason you are running into these 'problems' is that you are working with the ring of real polynomials rather than the ring of real-valued analytic functions, which is also a UFD. For example, it is not hard to show that there is a (unique) real-valued, real-analytic function $f$ defined in a neighborhood of $0$ and satisfying $f(0)=\frac12$ such that $$y^3 + 2x^2y-x^4 = \bigl(y - x^2f(x^2)\bigr)\bigl(y^2 + x^2f(x^2) y + x^2/f(x^2)\bigr),$$ so $y^3 + 2x^2y-x^4$ is reducible in the ring of real-valued, real analytic functions defined on a neighborhood of the origin. The curve $y = x^2f(x^2)$ is smooth (in fact, real-analytic, of course), but the $y$-discriminant of the quadratic factor is $x^4f(x^2)^2-4x^2/f(x^2) = -8x^2 + \cdots$, so the only real point of $y^2 + x^2f(x^2) y + x^2/f(x^2)=0$ near the origin is the origin itself. (The quadratic factor is irreducible in the ring of real-valued analytic functions defined on a neighborhood of the origin.)

Thus, a more easily approached question is: Suppose that the origin is a singular zero of an irreducible element $f$ in the ring of real-valued analytic functions defined on a neighborhood of the origin. Can the zero locus of $f$ be a nonsingular real-analytic hypersurface near the origin?

The answer to this question is 'no' because near a nonsingular point of such a hypersurface, there will always be a real-analytic function $g$ that vanishes on it whose differential at that point is nonvanishing. However, this will imply that $g$ is a factor of $f$, which is assumed to be irreducible.

Added Remark: The case of a curve is not hard, using some standard facts about resolution of curve singularities: If $f(x,y)$ is a nonzero, real-valued analytic function defined on a neighborhood of the origin in $\mathbb{R}^2$ that is irreducible in this ring and satisfies $f_x(0,0)=f_y(0,0)=0$, then the locus $f(x,y)=0$ cannot be a smoothly embedded curve in a neighborhood of the origin. A sketch of a proof is as follows: If the origin is not isolated, then $f(z,w)$ is a $\mathbb{C}$-valued analytic function defined on a neighborhood of the origin in $\mathbb{C}^2$ that is also irreducible in this larger ring, and hence there is a neighborhood of the origin in $\mathbb{C}^2$ such that, in this neighborhood, the locus $f(z,w)=0$ can be parametrized by an embedded disc in $\mathbb{C}$ in the form $(z,w) = (a(\tau),b(\tau))$ where $a$ and $b$ are analytic functions of $\tau$ for $|\tau| < 1$ with $a(0)=b(0)=0$. We can assume that neither $a$ nor $b$ is constant, and so we can reparametrize so that $a(\tau) = \tau^k$ for some $k>1$. In particular, the real locus will be parametrized by some curves of the form $\tau = \omega t$ where $t$ is real and $\omega^k = \pm 1$. By replacing $t$ by $t/\omega$, we can assume that $(a(t),b(t))$ is real for all small real $t$, and that this parametrizes a 'branch' of the real locus that passes through the origin. In particular, the coefficients of $b$ are real, so our curve is parametrized in the form $$(x,y) = \bigl(\ t^k,\ b_l t^l + b_{l+1} t^{l+1} + \cdots\ \bigr)$$ where, because of the embeddedness property of the disk, the greatest common divisor of $k$ and those $l$ for which $b_l\not=0$ must be $1$. By a (real) rotation, we can assume that $l>k$, so the curve is expressed in the form $$y = b_l\ x^{l/k} + b_{l+1}\ x^{(l+1)/k} + \cdots$$ where at least one of the exponents in this series is not an integer. It follows that the function on the right hand side of this equation cannot be smooth at $x=0$, even though, since $l>k$, it is $C^1$.

One conclusion of all this is that, if $g$ is a real-valued smooth function on a neighborhood of $0\in \mathbb{R}$ such that $g(0)=0$ and such that there exists a nontrivial real-analytic $f$ defined on a neighborhood of $(0,0)$ such that $f\bigl(x,g(x)\bigr)\equiv0$ for $x$ in the domain of $g$, then $g$ must actually be real-analtyic in a neighborhood of $0$. (Note, however, that there do exist such 'real-analytically constrained' $g$ that are $C^k$ but not $C^{k+1}$ at $x=0$.)

Now, an easy argument shows that this $1$-variable fact implies the corresponding $n$-variable fact: If $g$ is a real-valued smooth function on a neighborhood of $0\in \mathbb{R}^n$ such that $g(0)=0$ and such that there exists a nontrivial real-analytic $f$ defined on a neighborhood of $(0,0)\in\mathbb{R}^n\times\mathbb{R}$ such that $f\bigl(x,g(x)\bigr)\equiv0$ for $x$ in the domain of $g$, then $g$ must actually be real-analytic in a neighborhood of $0\in\mathbb{R}^n$. (Basically, the hypotheses and the $1$-variable result imply that $g\circ x$ is real-analytic for any real-analytic germ of a curve $x:(\mathbb{R},0)\to(\mathbb{R}^n,0)$, and this easily implies that $g$ itself is real-analytic in a neighborhood of $0\in\mathbb{R}^n$.

Thus, we have the answer to the question Suppose that the origin is a singular zero of an irreducible element $f$ in the ring of real-valued analytic functions defined on a neighborhood of the origin. Can the zero locus of $f$ be a nonsingular smooth hypersurface near the origin?

The answer is 'no', because smooth would imply real-analytic, and we have already seen that this cannot happen.

-
Thank you for this very interesting answer, Robert. I hadn't thought of checking whether $y^3 + 2x^2y-x^4$ is irreducible in the local real analytic ring. But is it possible that your analytically irreducible, analytically singular germ $f$ nevertheless has a zero locus which is the germ of a $C^\infty$ manifold ? –  Georges Elencwajg May 30 '12 at 18:38
@George: I sidestepped that by asking whether the hypersurface could be 'nonsingular real-analytic'. I believe, though, that the answer, even for 'smooth' is still 'no'. I haven't tried to write down a proof, but, at least in the $n=2$ case (i.e., an equation $f(x,y)=0$), I think I see how to write down an argument that proves this, but let me get a chance to check the details. Over the complex numbers, there is no doubt, but there is something to check in the real case. –  Robert Bryant May 30 '12 at 19:10
@George: I have now added information that answers the question in the smooth case that you wanted. –  Robert Bryant May 31 '12 at 21:12
Dear Robert, could I be so bold as to suggest you publish this ? Considering that none of the numerous users gave a reference, I would conjecture that your explanations are not in the literature . And since my question was so naïve and basic, I am pretty sure that many mathematicians will be interested in its answer. Whatever your decision, let me assure you of my admiration for your analysis and my gratefulness for the time you took to write such a definitive answer . –  Georges Elencwajg Jun 1 '12 at 11:17

The answer is in fact no.

A complex variety $X$ can never be a differentiable manifold (not even of class $C^1$) throughout a neighborhood of a singular point.

You can find a proof in Milnor's book "Singular Points of Complex Hypersurfaces", Annals of Mathematics Studies 61, remark at page 13.

Notice that $X$ can be a topological manifold (i.e., a manifold of class $C^0$) in a neighborhood of a singular point. For instance, the cuspidal plane cubic $y^2z=x^3$ is homeomorphic to $\mathbb{P}^1$.

-
I feel silly because Milnor's is book where I learned about the real algebraic counterexample and probably also where I learned about the result you mention. But I had forgotten about that part , hence my phrase " I think this pathology is impossible over $\mathbb C$ but I cannot find a reference". Anyway, thanks a lot, Francesco! (I'm still interested in results about the real case. Any idea?) –  Georges Elencwajg May 30 '12 at 13:01
Dear Gerorges, you are welcome. The real case seems more delicate. I do not have any idea now, I should think about it. –  Francesco Polizzi May 30 '12 at 13:42
For the real case, I believe it is necessary and sufficient that the singularit have a single real-sloped tangent vector, and the rest complex. Thus, for plane curves with singularities at 0, the minimal degree of monomials should be an odd number, and the polynomial generated by minimal-degree monomials should have a single real root in $\mathbb P^1$. –  Will Sawin May 30 '12 at 17:55
@Will: I don't understand your criteria or your conclusion. For example, $y^3 - x^5=0$ seems to satisfy your criteria, but this curve is not smooth at the origin; it is $C^1$, but not $C^2$. More generally, considering $y^3 - x^{3n\pm 1}$ some $n>1$, the real locus can be made to be $C^k$ but not $C^{k+1}$ for any $k$. –  Robert Bryant May 31 '12 at 0:29