39

More generally, can the zero set $V(f)$ of a continuous function $f : \mathbb{R} \to \mathbb{R}$ be nowhere dense and uncountable? What if $f$ is smooth?

Some days ago I discovered that in this proof I am working on, I have implicitly assumed that $V(f)$ has to be countable if it is nowhere dense - hence this question.

pinaki
  • 5,064

8 Answers8

201

The continuous function is very easy to construct: it's the distance to the closed set.

35

It is a standard result that each closed subset of $\mathbb{R}^n$ is a zero set of some smooth function on $\mathbb{R}^n$. One proves this using smooth bump functions and partitions of unity.

Robin Chapman
  • 20,698
  • I admit I have never worked through the proof of this result. So I wonder, why partitions of unity? It seems to me that the local result is no easier than the global result. – Harald Hanche-Olsen May 09 '10 at 19:06
  • 1
    It's true on any (paracompact) smooth manifold - you certainly need partitions of unity for that. – Robin Chapman May 09 '10 at 19:10
  • Yes, that makes sense. – Harald Hanche-Olsen May 09 '10 at 19:21
  • One can avoid using the partition of unity for that, just summation of "1-bump" functions with suitable coefficients.. – Petya May 10 '10 at 03:22
  • Petya, I'm sure you're correct, but it's a bit more fiddly to ensure the uniform convergence of the sum of the derivatives of the bump functions without a convenient global coordinate system. – Robin Chapman May 10 '10 at 09:07
  • If there is a good covering (locally finite and such that balls of smaller radii also form a covering) by a countable system of closed (coordinate) balls, then for any sequence of smooth function $f_i$ on a manifold there is a sequence $a_i$ of positive numbers such that $\sum a_i f_i$ converges uniformly with any its derivatives in any ball from the covering. Right? – Petya May 10 '10 at 20:17
  • If you have smooth compactly supported functions $f_i$ on a locally finite collection of open sets then $\sum a_i f_i$ converges to a smooth function for any $a_i$. :-) To get nice locally finite covers we need to exploit the circle of ideas around paracompactness/partitions of unity. – Robin Chapman May 11 '10 at 06:00
  • Robin, I do not assume that functions $f_i$ are compactly supported and supports could have nontrivial countable intersection, so $\sum a_if_i$ is not defined for any $a_i$! – Petya May 11 '10 at 18:14
  • I construct function $f_i$ as follows: consider a locally finite collection $N_i$ of open balls such that the corresponding half-radii collection contains the given closed set $C$ as a subset. Let $U_i$ be a union of balls from $N_i$. I want that intersection of $U_i$ equals $C$. For each ball from $N_i$ I fix a smooth function equals to zero on a half-radii ball and 1 outside the ball. Product of such functions is well-defined ($N_i$ are locally finite) and it is $f_i$ by definition. After that a suitable sum $\sum a_if_i$ solve the initial problem, its zero level set is $C$. – Petya May 11 '10 at 18:16
  • Can't this be proved for closed subsets $C$ of the real line (and maybe for metric spaces generally) just by saying $f(x) = \inf{ d(x,y) : y \in C }$? – Michael Hardy Nov 29 '10 at 02:06
  • ...where $d(x,y)$ is the distance from $x$ to $y$, so in case they're real numbers is just $|x - y|$. – Michael Hardy Nov 29 '10 at 02:07
  • .....Now I see: someone else already said this? So why are some people using more complicated proofs than that? – Michael Hardy Nov 29 '10 at 02:11
  • @MichaelHardy: the claim of this answer (as well as the accepted answer) is that you can in fact choose a smooth function, which is part of the original question. – R. van Dobben de Bruyn Mar 29 '20 at 22:48
34

Here's a semi-explicit construction for a smooth function f that is zero precisely on the classical Cantor set. By this set I mean the one that is obtained from $I_0 = [0,1]$ by repeatedly removing the middle third of any ensuing interval. So let's denote by $I_n$ the $n$-th set in this process.

Now let's make a smooth function $f_n$ on $[0,1]$ such that its zero set is exactly $I_n$. Starting with $f_0 = 0$ we obtain $f_{n+1}$ from $f_n$ as follows:

Set $f_{n+1} = f_n$ on $I_{n+1}$ and on an interval that is removed from $I_n$ make $f_{n+1}$ equal to a bump function that is 0 only at the boundary of the interval. We can choose the bump function to be of height $2^{-2^n}$.

This choice of heights of the bump functions will ensure that the derivatives of $f$ all converge uniformly to their pointwise limits. Hence the limit function $f_n$ is again smooth. By construction its zero set is exactly the Cantor set.

  • 1
    If you work through the details, I suspect you may find you need the bumps at step $n$ to have heights decreasing faster than $2^{-n}$. The reason is that the bump has to fit into an interval of length $3^{-n}$, and the resulting squeeze makes the derivatives big (relatively speaking). – Harald Hanche-Olsen May 09 '10 at 19:03
  • @Harald: Thanks you're absolutely right. I meant to say 2^{-2^n}. That should work. – Roland van der Veen May 09 '10 at 19:21
  • 2
    Each bump in the bump function has width 1/3^n. If the height is h(n), then the largest value of the kth derivative of of the stage n bumps will be 3^{kn}h(n) times the largest value of the kth derivative of the original bump function. If you want these to converge uniformly, the exact condition you need is that 3^{kn}h(n) converges to 0.

    So the necessary and sufficient condition on h to make the construction work is that for all a>0, h(n) is eventually less than a^n. So yes, 2^{-2^n} will work.

    – skeptical scientist May 16 '11 at 18:24
19

In a normal topological space, the zero-sets of continuous functions are precisely the closed $G_{\delta}$ sets. Hence in any metric space all closed sets are, including the Cantor set.

8

I can't resist trying my hand at sketching a proof of the general result given in Robin Chapman's answer. Let $F\subset\mathbb{R}^n$ be any closed set. Let $E_0=\{x\colon\operatorname{dist}(x,F)\ge1\}$, and for $k=1,2,\ldots$ let $E_k=\{x\colon2^{-k}\le\operatorname{dist}(x,F)\le2^{1-k}\}$. Let $\omega$ be a standard mollifier, and put $$f=\sum_{k=0}^\infty \alpha_k\chi_{E_k}*\omega_k,\qquad\omega_k(y)=2^{nk}\omega(2^ky),$$ where $\alpha_k>0$ decays fast enough so all derivatives converge uniformly ($\alpha_k=2^{-k^2}$ ought to be sufficient).

Harald Hanche-Olsen
  • 9,146
  • 3
  • 36
  • 49
8

Here's an answer from probability: a Brownian motion $B_t$ is a random, continuous function whose zero set is closed, nowhere dense, and has no isolated points. That is, $\{t : B_t = 0 \}$ is almost-surely a topological Cantor set (see, for example, Section 8 of Lalley's lecture notes).

Tom LaGatta
  • 8,372
5

To mention a further point not covered in existing answers: while any closed subset of $\mathbb{R}$ can be the zero set of a smooth function, the zero set of an analytic function either consists entirely of isolated points, or is all of $\mathbb{R}$. To see this we note that if the zero set of an analytic function $f$ contains an accumulation point, then by taking a power series expansion of $f$ at the accumulation point we may extend $f$ locally to a small complex disc around that point, and apply the Identity Theorem from complex analysis to show that $f$ is everywhere zero within that disc. In particular the zero set contains an open neighbourhood in $\mathbb{R}$ of the accumulation point, and using connectedness we can repeat this argument to show that the zero set must be all of $\mathbb{R}$.

http://en.wikipedia.org/wiki/Identity_theorem

Ian Morris
  • 6,176
4

André Henriques answer for a closed set $C$ can easily be improved to $C^\infty$ by considering $e^{1/(\alpha-x)+1/(x-\beta)}$ if $x\not\in C$ where $\alpha$ is the supremum of all elements $< x$ in $C$ (and $\alpha=-\infty$ if $C$ contains no elements which are $< x$) and where similarly $\beta$ is the infimum of all elements $> x$ in $C$ (respectively $\beta=\infty$ if $C$ contains no elements $> x$).

Roland Bacher
  • 17,432