Show that zeros of a differentiable function is countable when the the intersection of the set of zeros and the set of critical point is empty. Let $f:\mathbb{R}\to\mathbb{R}$ be a differentiable function such that $\mathbf{A}=\{x\in\mathbb{R}:f(x)=0\}$ and $\mathbf{B}=\{x\in\mathbb{R}:f'(x)=0\}$ and $\mathbf{A}\cap\mathbf{B}=\phi$. Then show that $\mathbf{A}$ is countable.
What I know is $sin{x}$ is an example of such a function. The cardinality of $\mathbf{A}$ for $sin{x}$ countable. But I don't how to prove this in general for any function satisfying these conditions?
 A: You don't need to know anything about uncountable sets.  You don't need Rolle's theorem.  This is simpler than these suggestions might indicate.

*

*Since $f$ is continuous the set $A=\{x:f(x)=0\}$ is closed.  [These are called level sets: get used to working with them.]


*The assumption here is simply that there is no point $x$  in $A$ at which $f'(x)=0$.


*Take any interval $[-n,n]$.  The closed set $A\cap [-n,n]$ must be finite.  If not, then there is a point  $x$ in this set along with  a sequence of distinct points
$\{x_n\}$  so that $x_n\to x$. [Use the Bolzano-Weierstrass theorem].
That means, since $f(x)=f(x_n)=0$ and $f'(x)$ exists, that
$$f'(x) = \lim_{n\to\infty} \frac{f(x)-f(x_n)}{x-x_n}=0,$$
which is impossible because of #2.


*So $A$ meets every interval in a finite set and, in particular,
$$A = \bigcup_{n=1}^\infty A\cap [-n,n]$$
is countable.
P.S.  Note that this statement is true about every level set $A_c=\{x:f(x)=c\}$.
A: As per Zerox's comment, if $A$ is uncountable, then $A$ must have an accumulation point. Why? We can cover the entire real line by countably many open balls of radius $1$ (for example, centred at all the integers). All the points in $A$ must lie in one or more of these balls. If only countably many points in $A$ lay in each ball, then $A$ would be a countable union of countable sets, and hence countable. Thus, $A$ must intersect with at least one ball uncountably (sort of like an infinite cardinal version of pigeonhole principle).
Now, if we restrict to one such ball of radius $1$, we can then cover it with two balls of radius $1/2$. Again, $A$ must intersect one ball or the other uncountably. We can then cover this ball with balls of radius $1/4$, etc, etc. At each step, the intersection of $A$ with the shrinking balls is uncountable, and in particular, non-empty.
Choose a sequence $x_n$ of distinct points from each ball (note: since $A$ intersects infinitely with these balls, removing a finite set of previous sequence points from contention will not be a problem). This produces a Cauchy sequence: each $x_N$ belongs to a ball of diameter $2^{1 - N}$ (radius $2^{-N}$), and each subsequent sequence point lies in the same ball, so
$$n, m \ge N \implies |x_n - x_m| \le 2^{1 - N}.$$
Because the points $x_n$ are distinct, the sequence is not eventually constant, so we do have an accumulation point. Let this limit be $x$.
Rolle's theorem guarantees there exists $y_n$ between $x_n$ and $x_{n+1}$ such that $f'(y_n) = 0$, i.e. $y_n \in B$. Since both $x_n$ and $x_{n+1}$ limit to $p$, then we have $y_n \to p$.
Now, the issue is, it's not immediately clear why $p \in B$, i.e. why $f'(p) = 0$. If $f'$ is continuous at $p$, then we have a contradiction, but there's no guarantee that $f'$ is continuous. We just need another argument to show $f'(p) = 0$.
We have,
$$f'(p) = \lim_{h \to 0} \frac{f(x) - f(p)}{x - p}.$$
Because $f$ is differentiable at $p$, then it is continuous at $p$, so $f(p) = 0$. Thus,
$$f'(x) = \lim_{h \to 0} \frac{f(x)}{x - p}.$$
We know this limit exists, so consider it on the sequence $x_n$:
$$f'(x) = \lim_{n \to \infty} \frac{f(x_n)}{x_n - p} = \lim_{n \to \infty} \frac{0}{x_n - p} = 0.$$
Thus $p \in B$ as claimed.
