30

While studying complex variables, I could learn that $f(z)=|z|^{2}$ has only one point which is $z=0$ that $f$ being differentiable and $f$ being not differentiable at any other points.

Then, I was wondering if there is a function $f: \mathbb R \to \mathbb R$ that has only one point differentiable and not on any other points.

In intuition, it seems there are no such point! However, I have no idea how I can prove this...

Additional question is that would there be any function $f: \mathbb R \to \mathbb R$ that has only one point continuous and not on any other points.

I think this is pretty interesting things to think about! :-)

Emily
  • 1,291

1 Answers1

46

Let $$p(x)= \begin{cases} 0,& x\in\mathbb Q\\\\1,& x\in \mathbb R-\mathbb Q \end{cases}$$ Now take $f(x)=x^2p(x)$.

Mikasa
  • 67,374
André Nicolas
  • 507,029
  • Thank you! this gives me a perfect answer that I can be convinced! – Emily Sep 11 '12 at 16:05
  • 1
    @Emily: Regarding to $f(x)$ above, if you want a function differentiable at 2 points you can take $(x-1)^2f(x)$. It is differentiable at x=0 and x=1 only. – Mikasa Sep 11 '12 at 17:28
  • 2
    @Emily Another possible generalization: if you take $f(x) = x^np(x)$, with $p(x)$ as above, then $f$ is $(n-1)$ times differentiable at $0$, and not differentiable anywhere else. To make sense of that, you have to write a single limit corresponding to the $n$th derivative at $0$ (since you can't compute limits using $f'$, because $f'$ only exists at $0$). – student Sep 11 '12 at 17:31
  • 4
    Ah, but can you write a continuous function which is only differentiable in one point? – Asaf Karagila Sep 11 '12 at 17:35
  • 4
    @AsafKaragila: Yes, but need to quote a non-trivial result, that there is a bounded continuous nowhere differentiable function. Then the $x^2$ trick fixes things at $0$, and doesn't help at $x\ne 0$. – André Nicolas Sep 11 '12 at 18:05
  • @student what exactly "a single limit corresponding to the $n$th derivative at $0$" is supposed to mean? – freakish Dec 27 '20 at 19:26
  • @AsafKaragila But what does differentiability only at a single point mean? To me, the concept of differentiability seems to give an idea of local behaviour on a neighbourhood. – Jamāl May 14 '21 at 20:11
  • @Jamāl: Well, let me ask you this in the other way, what does it mean that $f(x)=|x|$ is differentiable in all but one point? – Asaf Karagila May 14 '21 at 20:20
  • @AsafKaragila In this case it would mean that the behaviour on a neighborhood about $0$ is different on its left and right side. Specifically, the tangent line changes suddenly as we move it about $0$. – Jamāl May 14 '21 at 23:50
  • @Jamāl: Well, being differentiable at a single point is the same. It means that the rate of change around the point has a limit as we get closer to the point. – Asaf Karagila May 15 '21 at 01:09
  • @AsafKaragila hmm. That actually makes sense. I would imagine that the tangent line undergoes infinitely many bumps as it approaches the differentiable point from either side but the value of the tangent we get is the same from either side. Thanks for clearing up my intuition. – Jamāl May 15 '21 at 08:37