# Differentiability at the limit of non-differentiable points

Let $$f : \mathbb{R} \to \mathbb{R}$$ be a continuous function. Suppose there exists a sequence $$(x_n)_{n \ge 1} \subseteq \mathbb{R}$$ such that:

1. there exists $$x_\infty \in \mathbb{R}$$ such that $$x_n \to x_\infty$$ as $$n \to \infty$$
2. $$f$$ is not differentiable at each point $$x_n$$

Do we know that $$f$$ cannot then be differentiable at $$x_\infty$$? I suspect it is impossible for $$f$$ to be differentiable at $$x_\infty$$ but I have not been able to prove this myself. I have tried approximating the Newton quotients at $$x_\infty$$ by those at $$x_n$$, making use of continuity, but to no avail. I have also not found this result anywhere online.

Hints towards the proof of this result or counter-examples would be greatly appreciated.

Of course, after posting, I realized that this question may be stated more succinctly. For $$f \in C(\mathbb{R})$$, is the set $$A := \{x \in \mathbb{R}\ |\ f'(x) \text{ does not exist}\}$$ closed?

• I believe that $x^2\arccos(\cos(\frac{\pi}{x}))$ (with value $0$ at $x=0$) is a counterexample using the sequence $x_n=\frac{1}{n}$. However I would recommend you check it as I haven't been too thorough. Aug 4, 2022 at 3:57
• For continuous functions it is even possible for the set $A$ to be both dense (in the reals) and have a dense complement -- see Construct a function on a bounded interval on $\Bbb{R}$ which is continuous everywhere but differentiable only at irrationals. Aug 4, 2022 at 9:44
• @Fishbane thank you for this example. It is quite interesting, the function you gave is squeezed between $y = pi x^2$ and $y = 0$ at the point $x=0$ so I believe it is differentiable there. Aug 4, 2022 at 18:02
• @DaveL.Renfro thank you for this comment. I was unaware of just how "badly" behaved the set of differentiable points of a continuous function may be. Very interesting Aug 4, 2022 at 18:03
• Of related interest is Two functions whose powers make fractals by Marc Frantz (1998). The functions there are not everywhere continuous, but they nonetheless might be interesting. For more about these types of functions, see this 13 December 2006 sci.math post. Aug 4, 2022 at 18:25

Let $$g$$ be a continuous no-where differentiable function on $$[0,1]$$ and $$f(x)=x[g(x)-g(0)]$$. Then $$f$$ is not differentiable at each of the points $$x_n=\frac 1 n$$ but it is differentiable at $$0$$ with $$f'(0)=0$$.