# Where is the error in my proof that all derivatives are continuous?

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.

-
You just proved that $\lim_{h\to 0}f'(\xi(h))=f'(c)$. How does it follow from this that $\lim_{x\to c}f'(x)=f'(c)$? For all you know, $\xi(h)$ could always be rational, for example. – Andrés Caicedo Jul 24 '14 at 14:49
The proof would be correct for showing that if the limit of the derivatives exists, that limit is the derivative at $c$. However, as tracing a standard counterexample will show, the limit need not exist. – André Nicolas Jul 24 '14 at 14:52
Have you try plugging the counterexample into $f$ in the above proof to see where it went wrong? – Gina Jul 24 '14 at 14:54

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.
$\xi$ may not even describe a path, since it could fail to be continuous. – Andrés Caicedo Jul 24 '14 at 14:52