If function is differentiable at a point, is it continuous in a neighborhood?

To answer the question in the title: a function that is differentiable at a point need not be continuous in a neighbourhood. For example, consider the function $$ f(x) = \begin{cases} x^2, & x\in\mathbb Q \\ 0, & x\notin\mathbb Q\end{cases} $$ then $\frac{\mathrm{d}f}{\mathrm{d}x}(0)=0$, but $\lim_{x\to a}f(x)$ cannot exist for $a\neq0$ because $\lim_{\substack{x\to a\\x\in\mathbb Q}}f(x)=\lim_{x\to a}x^2=a^2$ whereas $\lim_{\substack{x\to a \\ x\notin\mathbb Q}}f(x)=0$.

This doesn't mean the multivariable chain rule is fake, however, though perhaps the proof you were reading made stronger assumptions than just being differentiable at the point of interest?


It usually isn't. Consider the function $f : [0,1[ \rightarrow \mathbb R$ defined by

$$ f(x) = \frac{1}{n} \quad \text{if} \quad x \in \left[\frac{1}{n+1},\frac{1}{n} \right[,n \in \mathbb N^* $$ $$ f(0) = 0 $$

It is surely continuous at $x = 0$ and you can easily check that it is differentiable at $0$ with derivative $1$. And yet there is a discontinuity in any neighborhood of $0$.