1
$\begingroup$

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$?

  • 0
    You are on the right track. The definition of derivative in terms of limit of difference quotient can be used here.2017-02-28
  • 0
    A similar (subtly different) example was presented in Answer to [this previous Question](http://math.stackexchange.com/questions/194194/is-there-a-function-f-mathbb-r-to-mathbb-r-that-has-only-one-point-differe), however without providing any details of the proof as you seek here.2017-02-28

1 Answers 1

3

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.$

  • 0
    Using the definition, I have $\lim_{h\to 0} \frac{(x+h)^2-x^2}{h} = \lim_{h\to 0} \frac{2xh+h^2}{h} = \lim_{h\to 0} 2x+h = 2x$. But I am unsure of how the bound you provided helps me?2017-02-28
  • 1
    What you want to consider is $$\frac{f(x) - f(0)}{x-0}.$$2017-02-28
  • 0
    So I have $\lim_{x\to 0} \frac{f(x)-f(0)}{x-0} = \lim_{x\to 0} \frac{x^2}{x} = \lim_{x\to 0} x = 0$. Does this alone prove that the derivative at $0$ exists?2017-02-28
  • 0
    Well $f(x) = x^2$ some of the time. Youll want to consider the difference quotient separately for rational and irrational points.2017-03-01
  • 0
    Thanks, I think I was overthinking it again, I figured everything out!2017-03-02