Let's say we have a function $h$ and its derivative $h'$. Can there ever be a point $x_0$ such that $h'(x_0)=r$ for some $r\in\mathbb{R}$ but $\lim\limits_{x\to x_0}h'(x)\neq r$?
-
3You are asking if derivatives are continuous. In general, no. – Andrew Dec 30 '22 at 09:14
-
See for example https://math.stackexchange.com/q/257907/42969 – Martin R Dec 30 '22 at 09:41
-
1Does this answer your question? Prove that $f'(a)=\lim_{x\rightarrow a}f'(x)$. – Hans Lundmark Dec 30 '22 at 14:18
2 Answers
Here is a theorem (the proof uses the mean-value theorem):
Fix a non-empty open interval $I$, a point $x_0\in I$, and a function $f:I\to\Bbb{R}$. If
- $f$ is continuous at $x_0$,
- $f$ is differentiable on $I\setminus\{x_0\}$,
- $\lim\limits_{x\to x_0}f’(x)$ exists,
then $f$ is differentiable at $x_0$ and $f’(x_0)=\lim\limits_{x\to x_0}f’(x)$.
With suitable modifications, you can prove analogous results at an endpoint of a closed interval. So, the only way the conclusion can fail is if one of the three hypotheses is not satisfied. Without the first bullet point, there are counterexamples, for example a piecewise constant function with a non-zero jump at $x_0$. Without the second and third bullet points, the conclusion wouldn’t even make sense, so we need them.
Note also that bullet points (1), (2) alone do not imply (3). A famous counterexample here is $f(x)=x^2\sin(1/x)$ if $x\neq 0$ and $f(0)=0$. It is precisely because of this failure that not every differentiable function is continuously differentiable.
So, in this sense, the theorem above is pretty much “optimal”, and describes the only possible ways the conclusion can fail.

- 55,725
- 2
- 45
- 89
The function $x \overset f{\longmapsto} x^2 \sin(\frac 1x)$ is defined on $\mathbb R^*$ and can also be defined at $0$ by $f(0) = 0$ by continuity, because $\sin$ is bounded and thus $x^2 \sin(\frac 1x) \underset{x \to 0}{\longrightarrow} 0$.
The function $f$ is of course derivable on $\mathbb R^*$, and $$\forall x \neq 0, f'(x) = 2x\sin(\frac 1x) - \cos(\frac 1x),$$
It also differentiable at $0$, since $$ \frac{f(x) - f(0)}{x - 0} = x \sin(\frac 1x) \underset{x \to 0}{\longrightarrow} 0 = f'(0), $$ However, you can check that $\underset{x \to 0}{\lim} (2x\sin(\frac 1x) - \cos(\frac 1x))$ doesn't exist, because of the term $\cos(\frac 1x)$, hence $f'$ is not continuous at $0$. You can also take a look at its graph.

- 977