# Equivalence between finite number of points and subset of measure zero of compact sets

$$f()$$ is continuously differentiable on $$[0,1]$$. The set of $$x$$ such that $$f(x) = 0$$ is of measure zero. Can we conclude that there is a finite number of points such that $$f(x) = 0$$ ?

I think if $$f()$$ is just continuous, this would not be true: e.g. $$f(x) = x sin(1/x)$$ if $$x \neq 0$$ and $$f(0) = 0$$. This function is continuous but has infinitely many separated zeros (on a set of measure zero). The set of measure zero property only excludes ‘flatness’ of $$f(x)$$, but it does not exclude the possibility of infinitely many separated points.

However, with continuously differentiable functions, I think this is indeed true. The continuous differentiability implies some smoothness of the function. And since I know that the set of $$x$$ such that $$f(x) = 0$$ is of null measure, it gives some implicit restrictions on $$f’(x)$$ (i.e. the set such that $$f(x) = 0$$ and $$f’(x) = 0$$ is empty or at least of null measure). In which case I should get back the finite number of zeros following more traditional lines (e.g. this question).

But I’m not sure this is correct. And I cannot find any counterexample. And maybe I need something less restrictive than “continuously differentiable” to get to the property (e.g. just Lipschitz continuous?).

If $$F\subseteq [0,1]$$ is a closed set, then there exists $$C^{\infty}$$ function $$f:[0,1]\rightarrow \mathbb{R}$$ such that $$f(x)=0$$ for $$x\in F$$. This even holds if you replace $$[0,1]$$ by a paracompact $$C^{\infty}$$ manifold $$M$$.
So for instance you can have smooth function which vanishes precisely on the standard Cantor set $$C\subseteq [0,1]$$.
Let $$f(x)=x^3\sin(\frac{1}{x})$$ and note that $$f'(x)=3x^2 \sin(\frac{1}{x})-\frac{x}{2}\cos(\frac{1}{x})$$ which extends continuously to $$x=0$$ by setting $$f'(0)=0$$. By the mean value theorem, we get that $$f$$ is differentiable at $$0$$. However, $$f$$ has exactly the same zeroes as $$x\sin(1/x)$$.