10

I am looking for a continuous function $f: \mathbb R \rightarrow \mathbb R$ so that $f$ is differentiable in $x$, if and only if $x \in \mathbb Q$.

I already know there is no function that is continuous everywhere in $\mathbb Q$ but nowhere outside of it, but I wonder if something similar can be said about differentiability. If not, how could one prove that?

Thanks in advance!

Joshy
  • 103
  • 2
    Related: https://math.stackexchange.com/questions/112067/how-discontinuous-can-a-derivative-be – Hans Lundmark Jun 20 '18 at 16:26
  • I haven't had any measure theory, which makes reading this quite hard. It says that "a subset D of $\mathbb R$ can be the discontinuity set for some derivative if and only if D is an Fσ first category (i.e. an Fσ meager) subset of $\mathbb R$". Does that mean that $f$ can't be differentiable only on $\mathbb Q$, since the irrationals are not Fσ? – Joshy Jun 20 '18 at 18:30
  • Maybe an easier argument is the one which comes a little earlier: “the continuity set has cardinality $c$ in every subinterval of $J$”. Here $c$ is the cardinality of the reals, so in particular the continuity set must be uncountable (which of course the rationals aren't). – Hans Lundmark Jun 20 '18 at 19:07
  • 1
    @HansLundmark As I pondered a bit more, I came up with a function $g(x) = x^2 h(x)$ where $h(x)$ is nowhere differentiable. $g(x)$ is only differentiable in $x = 0$, so the set where $g(x)$ is differentiable is certainly not uncountable, nor empty. What goes wrong then with the argument you gave in this example? I noticed that the other thread discusses continuity of the derivative where I am looking for a function $f$ that is only differentiable at certain points ($\mathbb Q$). Is that a significant difference? – Joshy Jun 20 '18 at 21:29
  • 2
    That thread is talking about everywhere-differentiable functions, and is asking about on what sets can the derivative be discontinuous. Your question is about everywhere-continuous functions and is asking on what sets the function can be not differentiable. – Paul Sinclair Jun 21 '18 at 03:13
  • @PaulSinclair: You're right, of course! So this question is quite different. (And my earlier comment is irrelevant here since it refers to the situation in that other thread.) – Hans Lundmark Jun 21 '18 at 07:23
  • I'm tumped. If you don't get any more input soon, then I suggest cross-posting this on Math OverFlow – DanielWainfleet Jul 27 '18 at 07:54
  • After answering, I found this: https://math.stackexchange.com/questions/111443/construct-a-function-that-is-differentiable-only-on-the-rationals – Clement C. Jan 25 '21 at 11:15

1 Answers1

2

Here is a reference:

Mark Lynch. A Continuous Function That Is Differentiable Only at the Rationals. Mathematics Magazine 86, no. 2 (2013): 132-35. doi:10.4169/math.mag.86.2.132.

An explicit construction is given of a function that is continuous on an interval, and differentiable only at the rationals.

See also references within (Zahorski's Theorem) for a nonconstructive proof.

Clement C.
  • 67,323