[Math] A function differentiable at 0 but not differentiable at any other point

analysiscalculuscontinuityderivativesreal-analysis

I am asked to find a function $f$ that is differentiable at $x=0$ but not differentiable at any other point.

I am looking at the function $f(x)=x^2$ when $x\in \mathbb{Q}$ and $f(x)=0$ when $x\notin \mathbb{Q}$.

I think it is easy to see that it is not differentiable whenever $x\neq 0$ but I do not know how to go about proving that the function is differentiable at $x=0$. I am thinking about using the idea of convergence (that we can create a sequence of rational numbers close to $x=0$ that approach $0$ or are within the $\epsilon$-neighborhood of $0$) but I am not sure if I need to worry about the irrational numbers? Specifically, how do I guarantee that this function is continuous at $0$?

Best Answer

Hint: You're on the right track with that function, but you're overthinking it. You have $|f(x)| \le x^2$ for all $x.$ Use the definition of the derivative at $0.$

Related Question