# On the measure of the zero set of continuous function , when the zero set does not contain any non-trivial interval

Does there exist a continuous function $f:[0,1] \to \mathbb R$ such that $0 \in Im f$ , $f^{-1}\{0\}$ does not contain any non-trivial interval and $f^{-1}\{0\}$ has positive Lebesgue measure ? If such a function exists , then what if we want such a smooth ( infinitely differentiable) function ?

Every closed subset of $\Bbb R$ is the zero set of a $C^\infty$ function; I think this is due to Whitney. So the question is whether there is a closed $A\subseteq[0,1]$ with positive measure, and containing no non-trivial interval. There are such $A$; for example "fat Cantor sets", which we produce by the usual construction of the Cantor set, but instead at each stage removing intervals whose length shrink fast enough to ensure that the measure of the remainder is $>0$.
• Perhaps simpler for $A$: Let $U$ be an open subset of $[0,1]$ containing $\mathbb Q \cap [0,1],$ with $m(U) < 1/2.$ Take $A= [0,1]\setminus U.$ – zhw. Jul 18 '17 at 18:36
• @zhw. : how to construct such an $U$ ? – user456828 Jul 18 '17 at 18:40
• @misao given $(q_n)_{n \ge 1}$ an enumeration of $\mathbb{Q}$, just take $U:= \bigcup \limits_{n \ge 1} \left ] q_n - \frac{1}{6^n}, q_n + \frac{1}{6^n} \right[$ : then $m(U) \le 2 \sum \limits_{n=1}^{+\infty} \frac{1}{6^n}=2/5<1/2$. – Charles Madeline Jul 18 '17 at 18:54
• @misao $\mathbb Q \cap [0,1]$ is a set of measure $0$ so we can find an open $U$ containing it of arbitrarily small measure. – zhw. Jul 18 '17 at 23:46