10

Possible Duplicate:
A nontrivial everywhere continuous function with uncountably many roots?

Does there exist a continuous non-constant real-valued function on $[a,b]$ that has infinitely many zeros? If one does exist, please give me an example.

Daniel
  • 3,053
  • 2
    Just pick any sub-interval where the function is zero and extend it to the rest... – Aryabhata Jun 30 '11 at 19:52
  • 7
    Let me try to spruce up the question a bit: can one characterize the subsets of $[0,1]$ which are zero sets of infinitely differentiable functions? – Pete L. Clark Jun 30 '11 at 19:58
  • 2
    $f(x)=x+|x|$ on $[−1,1]$ ? I suppose we should restrict the problem a little more to be more interesting (not constant on any subinterval, perhaps, as assumes Arturo) – leonbloy Jun 30 '11 at 19:59
  • How about a $C^{oo}$ function with isolated zeros? – gary Jun 30 '11 at 20:04
  • @Pete You can create a smooth take-off from an interval using a translate of $e^\frac{-1}{x^2}$ and the $xsin(\frac{1}{x})$ example below shows a different kind of behaviour. So you can get limit points and sets of non-zero measure. The set of values of a continuous real-valued function which map to zero must be closed, so I guess the question is which closed sets are possible. – Mark Bennet Jun 30 '11 at 20:09
  • @Mark: sure. If we stick to continuous functions, then this is a well-known thing: if $X$ is a topological space, every zero set of a continuous $f: X \rightarrow \mathbb{R}$ is closed, and the converse holds iff $X$ is perfectly normal, e.g. for any metrizable space. So as you say, for smooth functions the question is whether every closed set is still a zero set. (If you want me to guess, I'll guess...yes. But unless I've forgotten something I used to know, this is a pretty blind guess.) – Pete L. Clark Jun 30 '11 at 20:15
  • 4
    @Pete, @Mark: Every closed set is the zero set of a smooth function: For each open component of the complement there is a smooth function which is bigger than zero exactly on the component and goes to zero as we approach the boundaries. Now we may add such functions on all the components together as they have disjoint supports. – Sam Jun 30 '11 at 20:23
  • 1
    @Sam: Yes, this is a nice answer: I wish I had thought of it myself. Maybe you could leave it as an answer to the question? – Pete L. Clark Jun 30 '11 at 20:30
  • @Pete: Thanks. I think I just read it on MO a couple of days ago, so I remembered. ;-) I have also added it as an answer to this question. – Sam Jun 30 '11 at 20:57

5 Answers5

20

[!!! There is an error in the following argument !!! ]

Since this answer has been accepted, I can no longer delete it, however. The comments below may be useful for anyone interested.

In fact every closed subset of $\mathbb R$ is the zero set of a smooth function:

First, suppose we are given an open interval $I = (a,b) \subset \mathbb R$. We will construct a smooth function $f: \mathbb R\to [0,1]$ satisfying $f(x)>0 \iff x \in I$.

Then, if we are given a closed set $K \subset \mathbb R$, the complement $U = \mathbb R\setminus K$ can be written as the disjoint union of countably many open intervals $I_n$ for $n\in \mathbb N$, i.e.

$$ U = \bigcup_{n=1}^\infty I_n, \quad \text{with } \; I_n \cap I_m = \varnothing \; \text{ for $m\ne n$}$$

Assuming the first part, we can find smooth functions $f_n: \mathbb R\to [0,1]$ such that $f_n(x) > 0$ if and only if $x \in I_n$. Now define

$$g(x) := \sum_{n=1}^\infty f_n(x)$$

Then $g$ is well-defined and smooth, because for any point $x\in \mathbb R$ there is a neighborhood $V$ such that only finitely many $f_n$ are nonzero on $V$ (in fact we can choose $V$ sufficiently small such that it intersects two intervals $I_m$ and $I_n$ at most).

Let us prove the first assertion: So, we are given $I=(a,b)\subset \mathbb R$ and want to construct $f: \mathbb R\to [0,1]$ such that $f(x) >0\iff x \in I$.

First, let

$$ h(x) = \begin{cases} e^{-1/x} & x>0 \\ 0 & x\le 0\end{cases}$$

I think, it is a standard exercise in Analysis to prove that $h$ is smooth, so I won't bother doing this here. Now define

$$f(x) = h(x-a)h(b-x)$$

This function is smooth and maps into $[0,1]$ ($h\le 1$). Furthermore $$f(x) \ne 0 \iff x-a >0 \text{ and } b-x>0 \iff a < x < b$$

This concludes our observation.

Sam
  • 15,908
  • 4
    This is usually called Whitney's theorem. It is a special case of a vastly more general and even more surprising result, see the original reference and the Wikipedia entry. – t.b. Jun 30 '11 at 21:17
  • @Theo: does it follow from Whitney's theorem that every closed subset of a smooth manifold is the zero set of a smooth function? (If not, how do you prove that?) – Pete L. Clark Jun 30 '11 at 23:41
  • 2
    @Pete: I don't see a cheap way of getting it directly (partitions of unity seem to fail, or I miss a clever trick), but you can use Whitney's embedding theorem and embed your manifold smoothly and properly into some $\mathbb{R}^{N}$. Then apply Whitney's extension theorem to the closed subset you want as a zero set (but this smells like overkill). – t.b. Jun 30 '11 at 23:53
  • 1
    @Pete: Now that this question was bumped, I see that I indeed missed a (not so clever) trick: Cover your manifold $M$ with charts $V_i$ in such a way that there are open $U_i \subset V_i$ already covering $M$ (we may choose the cover $V_i$ locally finite) and choose a partition of unity $\rho_i$ subordinate to $V_i$ such that $\rho_i(u) \gt 0$ for $u \in U_i$. If $A$ is our closed set we can choose a smooth $f_i : V_i \to \mathbb{R}$ such that $f_i(x)^2 = 0$ iff $x \in A \cap V_i$ by Whitney. Now put $f = \sum \rho_i \cdot f_{i}^2$ and clearly $f(x) = 0$ iff $x \in A$. – t.b. Sep 13 '11 at 03:06
  • 1
    In this other post http://mathoverflow.net/questions/24034/can-cantor-set-be-the-zero-set-of-a-continuous-function, the height of the bump functions were carefully set to make the derivative converge uniformly to its pointwise limits. I can't see any flaw in your argument though. Why didn't you need to bother rescaling your h? – Rodrigo Oct 12 '13 at 00:57
  • @Rodrigo: It's the sentence starting with "Then $g$ is smooth because for any $x\in \mathbb R$ we can find ..." That's simply not true. Consider the countable set of intervals $I_n = (1/2^n, 1/2^{n-1})$. There is no neighborhood as claimed around the point $0$. (--> ^^ I was young and unaware of the many pitfalls) – Sam Jan 25 '14 at 05:12
  • @Sam: indeed given that sentence is false for the reason you stated. Am I to understand then that your proof is unsalvageable? – math_lover Jul 22 '17 at 20:23
18

You can take $$f(x) = \left\{\begin{array}{ll} (x-a)\sin\left(\frac{1}{x-a}\right)&\text{if }x\neq a\\ 0 &\text{if }x=a. \end{array}\right.$$

You can even make it differentiable on $[a,b]$ by replacing the $(x-a)$ factor with $(x-a)^2$. This function is not constant on any subinterval.

Arturo Magidin
  • 398,050
  • 2
    Ah, this function is a counterexample to so many fake theorems in analysis. – Joel Cohen Jun 30 '11 at 20:48
  • The function $f(x) = \left{\begin{array}{ll} (x-a)\sin\left(\frac{1}{x-a}\right)&\text{if }x\neq a\ 0 &\text{if }x=a. \end{array}\right.$ also is non-constant in $\mathbb{C}$ – Zophikel Sep 09 '17 at 14:53
  • Is it possible to get uncountably-many zeros in a compact subset, other than with $d(x,S)$ , for S a closed subspace and d the Hausdorff distance :=$ Inf {d(x,s): s \in S }$? – gary Nov 28 '17 at 23:09
  • 1
    @gary: Trivially so; take $[-1,2]$, then take a function which is zero on $[0,1]$ and is not the Hausdorff distance and nonzero on $[-1,0)$ and $(1,2]$. E.g., $f(x) = 0$ if $0\leq x\leq 1$, $f(x) = e^x-1$ on $[-1,0)$, and $f(x) = e^x-e$ on $(1,2]$. That's continuous. – Arturo Magidin Nov 28 '17 at 23:17
  • @Arturo: Sorry, I did not mention another condition I had in mind: between any two zeros there is a third zero so that there is no interval (a,b) where f is identically zero. EDIT: Then the zero set has a limit point (if f is defined on an interval [a,b] ). – gary Nov 28 '17 at 23:41
  • @Zophikel: That is the exact function Arturo defined. – gary Nov 28 '17 at 23:43
  • 1
    @gary: Your first sentence does not imply the second. Presumably you meant "between any two zeroes there is a point where the function is not zero" (otherwise, the function I gave you does satisfy the condition you first list: between any two zeroes there is a third point where the function is also zero). Again, the answer is provided by the top answer to this question, since ANY closed set is the zero set of a smooth function. Take, say, the Cantor set as your closed set (which is bounded, hence compact), and take the corresponding function. The Cantor set is uncountable. – Arturo Magidin Nov 28 '17 at 23:45
  • To make sure it is not any particular function (such as the one you provide), then just multiply it by some other smooth function that is never zero on the interval in question; e.g., multiply it by $e^x$, or $\arctan(x)+7$, or whatever you want. – Arturo Magidin Nov 28 '17 at 23:46
  • @gary: Re Zophikel: he is describing a complex variable function. I was talking about the real function. – Arturo Magidin Nov 28 '17 at 23:48
  • Thanks, @Arturo – gary Nov 28 '17 at 23:48
8

It is well known that, with probability $1$, the zero set of Brownian motion is an uncountable closed set with no isolated points.

Shai Covo
  • 24,077
6

And if you want a $C^\infty$-function, how about $f(x)=0$, if $x\le(a+b)/2$ and $f(x)=e^{-1/(a+b-2x)^2}$, whenever $x>(a+b)/2$.

Jyrki Lahtonen
  • 133,153
2

Such a functions does exists not only for interval $[a,b]$, but for inifinite general metric spaces.

Let $(X,\rho)$ be some infinite metric space. For each $A\subset X$ we define distance from $x$ to $A$ by equality $\rho(x,A)=\inf\{\rho(x,y):y\in A\}$. Since for all $x_1,x_2\in X$ we have $|\rho(x_1,A)-\rho(x_2,A)|\leq\rho(x_1, x_2)$, we see that $\rho(\cdot,A):X\to\mathbb{R}_{+}$ is uniformly continuous. Obviously $x\in\overline{A}$ iff $\rho(x,\overline{A})=0$.

Let $Y$ be some closed infinite subset of $X$. Since Y is closed then the zero set of $\rho(\cdot,Y)$ is $Y$. Thus we constructed a uniformly continuous function with zero set equal to infinite set $Y$.

Norbert
  • 56,803
  • I'll edit this typo – Norbert Dec 21 '11 at 05:11
  • Oh, I just misread. Sorry, I guess the overline in $\overline A$ was blended into the line above in my careless reading. The correction was really unnecessary, and the original statement was apt, because $\rho(x,\overline A)=\rho(x,A)$. – Jonas Meyer Dec 21 '11 at 05:12
  • I thought this correction will emphasize overline. Of course this is unnecessary correction – Norbert Dec 21 '11 at 05:30