3

(on a bounded domain). I believe that such a function could not exist since every $C^\infty$ function can be approximated by a sequence of polynomials and every polynomial has a finite number of roots so it would not be possible for something that vanishes countably often to converge to something that vanishes uncountably often.

Anne Bauval
  • 34,650
  • 4
    How about a compactly supported function ? – fwd Mar 17 '23 at 18:59
  • Your polynomial approximation idea works the same way if the function is only assumed to be continuous, and such a function can be zero on $(-1,0)$ and $=x$ on $[0,1)$ – reuns Mar 17 '23 at 19:00
  • And so with $g(x)=e^{-1/(x(1-x))})1_{x\in [0,1]}$ you can also construct a smooth function $\phi\in C^\infty(0,1),\phi(x)=\sum_{n=0}^\infty \frac1{n!}\sum_{a\in {0,2}^n} g(3^{n+1} (x-3^{-n-1}-\sum_{m=1}^n a_m 3^{-m})$ vanishing only at the Cantor set, which is not a countable union of points and closed intervals. – reuns Mar 17 '23 at 19:38
  • Your claim that a sequence of functions with only countably many zeros cannot converge to a sequence with uncountably many zeros is also wrong: Take the sequence of constant functions $f_n(x) = 1/n$. – Eike Schulte Mar 18 '23 at 10:19

2 Answers2

13

The following function is $C^\infty$ on ${\bf R}$ and is zero outside the unit interval. $$ f(x) = e^{-{1\over 1-x^2}}{\bf 1}_{[-1,1]}(x) $$ Such function is called a bump function.

coudy
  • 5,843
-3

$x \sin (1/x) $

This function has a sequence of roots tending to zero.

enter image description here

Daron
  • 10,300