TITLE: Where is the error in my proof that all derivatives are continuous?
QUESTION [9 upvotes]: I know that this can not be true due to counter-examples but I don't know where the error in my reasoning is.
Assumption:
If $f(x)$ is differentiable in $\mathbb{R}$ then the derivative $f'(x)$ is continuous in  $\mathbb{R}$.
Faulty Proof:
For every $c \in \mathbb{R}$, using the mean value theorem for $f(x),$ on the interval $x \in [c, c + h] $ where $h$ is positive.
$$
\frac{f(c + h) - f(c)}{h} = f'(\xi(h))
$$
Where $\xi(h) \in (c,c+h)$. Because this equation holds for every $h>0$. It must hold in the limit as $h \rightarrow 0^+$. 
$$
\lim_{h\to 0^+}\frac{f(c + h) - f(c)}{h} = \lim_{h\to 0^+}f'(\xi(h)) 
$$
But the left side of the equation is the right one sided derivative.
$$
f'_{+}(c) = \lim_{h\to 0^+}\frac{f(c + h) - f(c)}{h} = \lim_{h\to 0^+}f'(\xi(h)) 
$$
The same can be done for $h$ being negative, but because of differentiability at every point the left and right derivatives must be equal.  
$$
f'(c) = f'_{+}(c) = f'_{-}(c) = \lim_{h\to 0^-}\frac{f(c + h) - f(c)}{h} = \lim_{h\to 0^-}f'(\xi(h)) 
$$
As $h \rightarrow 0^+$, $\xi(h) \rightarrow c$. So because the limit $\lim_{h\to 0^+}f'(\xi(h))$ exists and $\xi(h) \neq c$, it is equal to $\lim_{x\to c^+}f'(x)$
It follows that $\lim_{x\to c^+}f'(x) = \lim_{x\to c^-}f'(x) = f'(c)$ so the function $f'(x)$ is continuous.

REPLY [12 votes]: The issue is that you can't compute limits along particular paths like $\xi(h)$.
If you prove that $\lim_{n \to +\infty} f(p_n)$ exists for some $p_n \to x_0$, you cannot deduce that $\lim_{x \to x_0} f(x)$ exists.