Is $x^2$ differentiable at $0$ if we change the domain to $\{0\}\cup\{\frac1n\mid n\in\mathbb{N}\}$? 
We define the function $x^2$ to be from $\{0\}\cup\{\frac1n\mid n\in\mathbb{N}\}$ to the real numbers. Is the function differentiable at $0$?

I think the answer is yes because the function is continuous at $0$, since $0$ is in the domain, and there is a sequence $(1/n)$ that converges to $0$, so $0$ is also a limit point.
Also, I think this function is not differentiable at any other point in the domain since we do not have any other limit point besides $0$.
The part that I'm not so sure about is that we only have the right-hand limit. There is no left-hand limit so I'm not sure if we can apply the definition of the derivative. But I remember in Darboux's theorem that functions can be defined to be differentiable at their endpoints.

Let $f$ be your function. Yes, $f$ is differentiable at $0$ because:

*

*$0$ is a non-isolated point of the domain of $f$;

*the limit $\displaystyle\lim_{x\to0}\frac{f(x)-f(0)}x$ exists (it is equal to $0$).

And it is not differentiable anywhere else, since every other element of the domain of $f$ is an isolated point.
