Here's the question I've been asked to prove:
Suppose that $f$ is differentiable at $c$ and that $f^{\prime } (c) \ne 0$. Show that there exists a $\delta > 0$ such that $0<|x-c|<\delta \Rightarrow f(x)\ne f(c)$.
Here's my attempt:
Assume the contrary that for every $\delta > 0$, there is a $x_{\delta} \in \text{dom} f$ such that $0<|x_{\delta}-c|<\delta$ with $f(x_{\delta})=f(c)$.
Now, we pick $\varepsilon$ such that $0< \varepsilon < |f^{\prime} (c)|$. Since $f$ is differentiable at $c$, there is an $\delta > 0$ such that if $0<|x-c|<\delta$ then we have $\left| \frac{f(x)-f(c)}{x-c} - f^{\prime} (c) \right| <\epsilon$. For this $\delta$, there is $x_{\delta} \in \text{dom} f$ such that $0<|x_{\delta}-c|<\delta$ with $f(x_{\delta})=f(c)$. Thus, we must have $\left| \frac{f(x_{\delta})-f(c)}{x-c} - f^{\prime} (c) \right| = \left| f^{\prime} (c) \right|<\epsilon$ which contradicts our choice of $\varepsilon$.
Is this proof okay? Is there any possible direct proof? This question is asked in my analysis textbook before "The Mean Value Theorem" section.
You're proof is fine. Here is a bit easier proof in my opinion: suppose that the statement you have to prove is wrong. Then for every $n\in\mathbb{N}$ there exists a point $x_n$ such that $0<|x_n-c|<\frac{1}{n}$ and $f(x_n)=f(c)$. Then we got a sequence that satisfies $c\ne x_n\to c$ but $\frac{f(x_n)-f(c)}{x_n-c}\to 0$. This is a contradiction because by Heine's definition of a limit we must have $\frac{f(x_n)-f(c)}{x_n-c}\to f'(c)$ which is not $0$.