4

Consider the function $f: (0, 1) \to \mathbb{Q}$ defined by $$f(x) = \begin{cases} 0, & x\text{ irrational} \\ 1/q, & x = p/q\text{ in lowest terms.} \end{cases}$$ The problem is to show that $\lim\limits_{x \to a}f(x) = 0$, using $\delta$-$\epsilon$, for all $a \in (0, 1)$. That is, for all $\epsilon >0$ there is a $\delta > 0$ such that for all $x$ satisfying $0 < |x - a| < \delta$, $|f(x)-0| <\epsilon$.

If $x$ is irrational, this is trivial. Edit: as discussed in the comments, this isn't as trivial as I thought it was.

But what if $x$ is rational? Then $f(x) = 1/q$ as shown above, so $$\left|\dfrac{1}{q}\right| < \epsilon\text{.}$$ I'm used to $\delta$-$\epsilon$ problems where I can "work backwards" to find $\delta$, but obviously $1/q$ isn't a function of $x$, and I'm lost as to what to do here. I sort of understand the discussion in Spivak, but I'm not quite getting how the discussion helps me find $\delta$, so I thought someone here could enlighten me.

As mentioned in the comments, I don't agree that this is a duplicate.

Clarinetist
  • 19,519
  • 2
    Pay close attention to the difference between < and $\le$ in the definition. Understand that $0<|x-a|$ means that $x\ne a$. (This is going to continue to be important in analysis.) – deinst Jan 14 '16 at 21:45
  • 1
    @RRL This question differs as I am asking about limits, rather than continuity, at both rational and irrational points. That isn't to say the questions aren't related, but they're not duplicates. – Clarinetist Jan 14 '16 at 22:32
  • @RRL The question linked is solely focused on the irrationals. – Clarinetist Jan 14 '16 at 22:38
  • I agree with the OP that this is not a duplicate of the question cited by RRL. – Rob Arthan Jan 15 '16 at 00:16
  • 1
    It might be worth writing out the proof you used to show "If $x$ is irrational, this is trivial". I suspect that whatever proof you used for that would extend to the rational case with very minor modification. – Milo Brandt Jan 15 '16 at 01:03
  • @MiloBrandt For $x$ irrational, $|f(x) - 0| = 0 < \epsilon$. – Clarinetist Jan 15 '16 at 01:06
  • @Clarinetist Well, that gives some insight why the second part is hard: That's not actually a proof that $\lim_{x\rightarrow a}f(x)=0$ for irrational $a$. It's a proof that $f$ restricted to the irrationals is continuous, but that's different than $f$ is continuous at the irrationals. Consider that, within any interval $(a-\delta,a+\delta)$, there is a rational number, so we need to choose $\delta$ so that no rational number in that interval has denominator $\frac{1}{\varepsilon}$ or less. – Milo Brandt Jan 15 '16 at 01:11
  • @MiloBrandt Hence deinst's comment. I understand why (s)he said that now. So this problem is indeed more difficult than I expected... – Clarinetist Jan 15 '16 at 01:12

2 Answers2

3

Let $a \in (0,1)$.

For any $\epsilon > 0$, choose $N \in \mathbb{N}$ such that $1/N < \epsilon$.

There are only a finite number of rational numbers $r = p/q \in (0,1)$ in lowest terms with $q \leqslant N$. Indeed, $r \in S_a =\{1/2, 1/3, 2/3, 1/4, 3/4, ..., (N-1)/N\}.$

Since $S_a$ is finite we can choose $\delta$ such that $0 <\delta < \min\{|r - a|: r \in S_a\, r \neq a\}$.

Consider any $x \in (0,1)$ with $ 0 < |x-a| < \delta$. If $x$ is irrational then $f(x)=0$ and $|f(x) - 0|= 0 < \epsilon.$

If $x$ is rational and $x = p/q$ in lowest terms, then $q > N$ and $|f(x) - 0| = 1/q < 1/N < \epsilon.$

Hence, $\lim_{x \to a}f(x) = 0.$

RRL
  • 90,707
0

Hint: for $a \in (0, 1)$ and $1/a < n \in \Bbb{N}$, consider the interval $I = (a - 1/2n, a + 1/2n)$ (which has length $1/n$): how many rational numbers $p/q \in I$ (with $p$ and $q$ coprime) can have $q \le n$?

Rob Arthan
  • 48,577