# Is there a non trivial smooth function that has uncountably many roots?

(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.

• How about a compactly supported function ?
– fwd
Commented Mar 17, 2023 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)$ Commented Mar 17, 2023 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. Commented Mar 17, 2023 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$. Commented Mar 18, 2023 at 10:19

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.
$$x \sin (1/x)$$