Assume that $f:\mathbb{Q}\to \mathbb{Q}$ is given such that $\forall a\in \mathbb{Q}$ the following limit, exists

\begin{equation} \lim_{x\to a} \frac{f(x)-f(a)}{x-a}\in \mathbb{R} \end{equation}

Is it true to say that the above limit is a rational number?

  • $\begingroup$ But if $f(x),f(a)$ are both Rationals, and you can always approach $a$ by a sequence of Rationals, then you have a quotient of Rational numbers. $\endgroup$
    – user99680
    Jun 23, 2014 at 23:26
  • 2
    $\begingroup$ @user99680 but a limit of rational numbers is not necessarily a rational number. $\endgroup$ Jun 23, 2014 at 23:28
  • $\begingroup$ Ah, never mind, I see your point, Duh, dumb me, let me rethink. $\endgroup$
    – user99680
    Jun 23, 2014 at 23:35
  • $\begingroup$ It's true if $f()$ is polynomial; such an $f()$ must have rational coefficients (by an easy interpolation argument - the coefficients of a degree-$n$ polynomial can be given explicitly in terms of rational arguments of its values at $n$ points), and so so does its derivative. It should be easy to extend to rational $f()$ by very similar arguments, but beyond that point things start getting murky fast. $\endgroup$ Jun 23, 2014 at 23:39

1 Answer 1


It is false: I would define something piecewise-constant and discontinuous at irrational $x$ such as $f : \mathbb{Q} \to \mathbb{Q}$ by:

$f(x) = 1$ for $x > \frac{1}{\sqrt{2}}$

$f(x) = \frac{1}{2}$ for $\frac{1}{3\sqrt{2}}<x<\frac{1}{2\sqrt{2}}$

$f(x) = \frac{1}{3}$ for $\frac{1}{4\sqrt{2}}<x<\frac{1}{3\sqrt{2}}$, and so on for positive $x$, and $f(0) = 0$.

Similarly for negative $x$ define:

$f(x) = -1$ for $x < -\frac{1}{\sqrt{2}}$

$f(x) = -\frac{1}{2}$ for $-\frac{1}{2\sqrt{2}}<x<-\frac{1}{3\sqrt{2}}$

$f(x) = -\frac{1}{3}$ for $-\frac{1}{3\sqrt{2}}<x<-\frac{1}{4\sqrt{2}}$ and so on. Then $f$ is differentiable (since constant) at all rational $x$ other than 0, and $f'(0) = \sqrt{2}$.

  • 1
    $\begingroup$ thanks for your very interesting example $\endgroup$ Jun 24, 2014 at 0:01
  • 1
    $\begingroup$ This is a great (counter)example. I never would have thought of a piecewise-constant function having non-zero derivative at a point - to the point where I might even add that to a 'false beliefs' list ('If a function is piecewise-constant, its derivative is 0 everywhere the derivative is defined'). Brilliant! $\endgroup$ Jun 24, 2014 at 0:05
  • $\begingroup$ I have fixed the typos, thank you. $\endgroup$
    – whosleon
    Jun 24, 2014 at 0:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .