Question about a comment in my analysis book (differentiation) In the book I am reading differentiability is defined as:
f is differentiable in $x_0\in I$ if
$\lim_{x\rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0}$ exists
After this definition there is a comment that states
because $f$ has the derivative $f'(x_0)$ in $x_0$ it follows that for every sequence $(x_n)$ which converges to $x_0$ (and $x_n \neq x_0$) the limit of
$\frac{f(x_n)-f(x_0)}{x_n-x_0}$ converges to $f'(x_0)$
I tried to prove that as follows:
$$f'(x_0)=\lim_{x\rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0}= \frac{\lim_{x\rightarrow x_0}f(x)-f(x_0)}{\lim_{x\rightarrow x_0}x-x_0}=(*)$$
These two limits are obviously equal
$$\lim_{x\rightarrow x_0}x=x_0=\lim_{n\rightarrow  \infty}x_n$$
but for
$$\lim_{x \rightarrow x_0} f(x)=\lim_{n \rightarrow  \infty} f(x_n)$$
it is necessary for $f$ to be continuous.
So if $f$ is continuous then
$\lim_{n \rightarrow  \infty}\frac{f(x_n)-f(x_0)}{x_n-x_0}$ holds.
After this comment a corollary follows that states that a differentiable function is also continuous. My problem now is that the prove uses the comment above.
My Questions is:
Was my way of proving the comment wrong? Is there a way which does not use continuity of $f$?
 A: By definition, as $x$ tends to $x_0$, $$\lim_{x\rightarrow x_0} (x-x_0)=0$$ Therefore, the fact that $$\lim_{x\rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0}$$ exists as a real number implies that the numerator $f(x)-f(x_0)$ converges to $0$ .
That means that $f$ is continuous at $x_0$. Therefore, being differentiable at a point implies that the function is also continuous at that point.
Note that both numerator and denominator converge to $0$, so be careful when you say that the limit of the ratio is the ratio of the limits (you get a $0/0$).
A: To see that $f$ is continuous is trivial. $$f(x)=f(x)-f(x_0)+f(x_0)=\frac{f(x)-f(x_0)}{x-x_0}(x-x_0)+f(x_0).$$
It now follows that $\lim_{x\to x_0}f(x)$ exists and is equal to $f’(x_0)\cdot 0+f(x_0)=f(x_0)$.
To answer your question, you are essentially saying that if $h$ is continuous then $h(x_n)\to h(a)$ if $x_n\to a$, which is true if $h$ is continuous at $a$. Moreover if it holds for every sequence $x_n$ that approaches $a$ then $h$ is in fact continuous.
A: If the derivative at $x_0$ exists (call it $\mathrm{L}$), it means that whenever $x$ is $\delta$ close to $x_{0}$, $\frac{f(x)-f(x_0)}{x-x_0}$ is $\epsilon$ close to $\mathrm{L}$.
Let $y_n$ be a sequence  that converges to $x_0$. That means that $\exists 
 n_0\in \mathbb N: \forall n \geq n_0 \Rightarrow 0 \lt |y_{n_0}-x_0| \lt \delta$.
Assuming $f:A \to \mathbb R$ and $y_n \in A, y_n \neq x_0$, the previous statement just tells us that there are numbers in $A$, the members of $y_n, n\geq n_0$ that get $\delta$ close to $x_0$. Meaning that $y_{n_0}, y_{n_0 + 1}, y_{n_0 + 2}, \ldots$ are $\delta$ close to $x_0$, thus $\frac{f(y_n)-f(x_0)}{y_n-x_0}$ is $\epsilon$ close to $\mathrm L$, $\forall n \geq n_0$.
For each $\epsilon \gt 0, \exists \delta \gt 0 : |x-x_0| \lt \delta \Rightarrow |\frac{f(x)-f(x_0)}{x-x_0} - \mathrm L| \lt \epsilon$. For each such $\delta, \exists n_0 \in \mathbb N : \forall n \geq n_0 \Rightarrow 0 \lt |y_n - x_0| \lt \delta \Rightarrow |\frac{f(y_n)-f(x_0)}{y_n-x_0} - \mathrm L| \lt \epsilon, \forall y_n \in A, y_n \to x_0$ and $y_n \neq x_0$.
A: In general, for any function $f$ defineted in $D\subseteq \mathbb R$ with values in $\mathbb R$ and any accumultation point $x_0$ of $D$ the following  holds:
$\lim_{x\to x_0} f(x) = l$ iff for any sequence $(x_n)_1^\infty \subset D$ with $x_n \ne x_0$, for all $n\in \mathbb N$, we have $\lim_n f(x_n) = l$
DIM. ($\implies$)
Let assume $\lim_{x\to x_0} f(x) = l$. For any $\epsilon > 0$ there exists a $\delta > 0$ so that $\lvert f(x) - l\rvert < \epsilon$ for any $x\in D$, $x\ne x_0$ such that $\lvert x - x_0 \rvert < \delta$. If $x_n\to x_0$ then there exists a $\eta \in \mathbb N$ such that $\lvert x_n - x_0\rvert < \delta$ for any $n > \eta$. As consequence $\lvert f(x_n) - l\rvert < \epsilon$ for any $n > \eta$, that is $\lim_n f(x_n) = l$.
($\impliedby$)
Let assume $\lim_n f(x_n) = l$ for any sequence $(x_n)_1^\infty \subset D$ with $x_n\ne x_0$ and $\lim_n x_n = x_0$. If $\lim{x\to x_0} f(x)$ were not $l$, there should exist a positive real number $\epsilon$ such that for any $n\in \mathbb N$ we can choose a real number $y_n\in D$, $y_n \ne x_0$ and $\lvert y_n - x_0\rvert < 1/n$ such that $\lvert f(y_n) - l\rvert > \epsilon$. Evidently the sequence $(y_n)_1^\infty$ converges to $x_0$ but $\lim_n f(y_n) \ne l$. That contradicts our assumption, so it must necessarily be $\lim_{x\to x_0} f(x) = l$.
Now we only have to apply the above result to the function
$$
r(x) = \frac {f(x) - f(x_0)}{x - x_0}
$$
