[Math] Why is/isn’t the derivative of a differentiable function continuous

analysiscontinuityderivativesreal-analysis

I am confused about the following Theorem:

Let $f: I \to \mathbb{R}^n$, $a \in I$. Then the function $f$ is differentiable at $a$ if and only if there exists a function $\varphi: I \to \mathbb{R}^n$ that is continuous in $a$, and such that $f(x) – f(a) = (x – a)\varphi(x)$, for all $x \in I$; furthermore, $\varphi(a) = f'(a)$.

I understand the proof of this theorem, but something confuses me. Doesn't this theorem state that the derivative of a function in a point is always continuous in that point, since $f'(a) = \varphi(a)$ is continuous in $a$? This would mean that the derivative of a function is always continuous on the domain of the function, but I have encountered counterexamples. I have probably misinterpreted something; any help would be welcome.

Best Answer

The theorem is simply stating that the function \begin{align*} \varphi(x) &= \begin{cases} \frac{f(x) - f(a)}{x - a} & \text{if}\;x\not = a; \\ f'(a) & \text{if}\;x = a \end{cases} \end{align*} is continuous. And it clearly is; the only point to check is $x = a$, and the condition $\lim_{x\to a} \varphi(x) = \varphi(a)$ is exactly the definition of $f'(a)$. The theorem is not claiming that $f = \varphi$ everywhere on $I$.

One of the classic examples of a differentiable function $f$ with $f'$ not continuous is $f(x) = x^2\sin (1/x)$ (with $f(x) = 0$). The derivative \begin{align*} f'(x) &= \begin{cases} 2x \sin (1/x) - \cos (1/x) & \text{if}\; x \not = 0; \\ 0 & \text{if}\; x = 0 \end{cases} \end{align*} exists everywhere, but it is not continuous at $0$.

Related Question