Zero points of a smooth function on $\mathbb{R}$

Assume $$f(x)$$ is a smooth function on $$\mathbb{R}$$ and $$f$$ does not vanish on any interval. In other words, $$f$$ can have zero points but we cannot find any interval $$(a, b)$$ such that $$f(x)=0$$ for all $$x \in (a, b)$$. Denote by $$\mathcal{Z} = \{x \in \mathbb{R}, f(x) = 0\}$$ the zero point set of $$f$$. Assume $$\mathcal{Z}$$ is non-empty.

Question: Is it possible that every point in $$\mathcal{Z}$$ is an accumulation point of $$\mathcal{Z}$$?

Here $$x$$ is an accumulation point of $$\mathcal{Z}$$ means there exists a sequence $$\{x_n\}$$ such that $$x_n \in \mathcal{Z}$$, $$x_n \neq x$$ and $$\lim_{n\to \infty}x_n = x$$ under the usual Euclidean topology.

• mathoverflow.net/questions/196167/… Aug 16, 2021 at 5:56
• It has been known for almost a century that any closed set in a manifild is the zero set of an infinitely smooth function (Whitney). Aug 16, 2021 at 6:20
• Another account: mathoverflow.net/a/24037/1946 Aug 16, 2021 at 6:22
• @bathalf15320 I find your comment unnecessarily dismissive. Are you claiming to know everything that was known a century ago? This xkcd comic seems relevant: xkcd.com/1053. Aug 16, 2021 at 17:32

We can make a smooth function whose zero set is the Cantor set. Simply place a smooth function on each middle third segment as you build the Cantor set, so that on each of these segments, the function arches from 0 up to a height that vanishes quickly as the segments become small, and then back down to 0, but smooth, and with all derivatives vanishing on the endpoints.

The zero set of this function will be the Cantor set itself, which is a closed nowhere dense set in which every point is an accumulation point. The function is smooth on each middle-third segment, and it is smooth at the points of the Cantor set, since the heights of the pieces on the segments approaching it vanish quickly enough.

In fact, this method can show that every closed set in the reals is the zero set of a smooth function. One places a little smooth bump into each open interval of the complement, and by making the heights sufficiently low as the intervals become small, you can get smoothness at the limits of these bumps.

Since my comment was received negatively, I would like to promote it to an answer in the hope of removing misunderstandings. The question of extending smooth functions on subsets, firstly of euclidean space, later of differentiable manifolds, has been long been centre-stage in differentiable topology and has been investigated over the decades by some of its most prominent experts. In particular, Hassler Whitney showed that you can extend a differentiable function on a closed subset of euclidean space to one on the whole space, whereby one has to deal with the subtle question of what it means for a function on a closed set to be differentiable. One can apply this result to the case of the zero function to deduce the fact that any closed subset of euclidean space is the zero set of a smooth function (the generalisation to a differentiable manifold is then accomplished using partitions of unity). Well almost—you need to refine the argument to show that you can get non-trivial extensions, i.e., ones which are non-zero elsewhere. There is a plethora of literature on this subject, much too extensive for me to cite here but you can get a good start by googling "Whitney extension theorem".