I have two problems I am working on and I would appreciate a critique of them. The following is a lemma I want to use to prove the main problem I will give below.

Let $A \subseteq \Bbb{R}$ and $c \in A$. If $f : A \to \Bbb{R}$ is continuous at $c$, then $f$ is bounded on some open interval of $c$.

Let $\epsilon > 0$. Since $f$ is continuous, there exists a $\delta > 0$ such that $|x-c| < \delta \implies |f(x)-f(c)|< \epsilon$. Let $x \in V_{\delta}(c)$. Then $|f(x)|= |f(x)-f(c)+f(c)| \le |f(x)-f(c)| + |f(c)| < \epsilon + |f(c)|$.

Here is the next problem:

Let $A = (0,\infty)$ and $f : A \to \Bbb{R}$ be defined as

$$f(x) = \begin{cases} 0, & x \in A \cap (\Bbb{R}-\Bbb{Q}) \\ n, & x = \frac{m}{n} \in A \cap \Bbb{Q} \end{cases},$$

where $gcd(m,n)=1$. Prove that $f$ is unbounded on every open interval in $A$. Conclude that $f$ is not continuous at any point of $A$.

Let $(a,b)$ be some interval in $A$, and suppose that there exists $M > 0$ such that $|f(x)| \le M$ for all $x \in (a,b)$. Since $M > 0$, there exists an $n \in \Bbb{N}$ such that $M < n$. Now, consider the interval $(na,nb)$, and note that $nb-na = n(b-a) > 1$. This means that there is some integer $m \in (na,nb)$ or $\frac{m}{n} \in (a,b)$. Thus, there exists a rational number $\frac{m}{n}$ in $(a,b)$ such that $M < n = f(\frac{m}{n})$, which is a contradiction.

  • $\begingroup$ I assume the second problem is to show that $f$ is unbounded on any open interval. You don't seem to be using your lemma at all - it's not relevant since $f$ is not continuous. Or are you proving that $f$ is not continuous? $\endgroup$ May 28, 2017 at 23:45
  • $\begingroup$ Also - I would use the Archimedean property of the reals to choose $n$ so that $n(b-a) > 1$ rather than choosing $n$ so $M < n$. That condition won't guarantee that $n(b-a) > 1$. $\endgroup$ May 28, 2017 at 23:47
  • $\begingroup$ You also need to show that $gcd(m,n) = 1$ in your proof. $\endgroup$ May 28, 2017 at 23:48
  • $\begingroup$ @JairTaylor Whoops! I forgot to include the problem state for the second problem. I believe I fixed my post. Regarding the second lemma, how am I not using it? I show that $f$ as defined above is not bounded on any interval, and means in particular any open neighborhood of any point in $A$. $\endgroup$
    – user193319
    May 28, 2017 at 23:55
  • $\begingroup$ Now that I see the problem statement, I see how the lemma is relevant. $\endgroup$ May 29, 2017 at 1:36

2 Answers 2


You have a solid start at an approach to showing that $f$ is a nowhere continuous function. https://en.wikipedia.org/wiki/Nowhere_continuous_function However, there are a few subtleties which you might want to consider revising.

  • In order to both use your lemma and directly address the main problem, you'll need to begin and end the proof from the perspective of establishing that $f$ is a nowhere continuous function. To achieve this, you could simply nest your current proof by contradiction for $f$ being unbounded on every open interval in $A$ into a proof by contradiction which demonstrates that $f$ is discontinuous everywhere in $A$. The latter proof will be short and sweet, since all of the dirty work is taken care of by the proof you currently have. In fact, $f$'s nowhere continuity follows very nicely and clearly from your current proof and lemma.

  • Claiming that $n(b-a) > 1$ is faulty, because this is true iff $b-a > \frac{1}{n}$, which is not necessarily true given that $a$ and $b$ are both arbitrarily selected. As Jair Taylor mentioned in one of the comments, an easy way to handle this issue is to select $n \in \mathbb{N}$ such that $b-a > \frac{1}{n}$, which is fully justified by using the Archimedean principle: For all positive real numbers $x \in \mathbb{R}_{>0}$, there exists $n \in \mathbb{N}$ such that $\frac{1}{n} < x$.

  • To make the proof regarding $f$'s unboundedness on $(a,b)$ fully complete, you'll have to conclude with a fraction in reduced form. As currently laid out, $\frac{m}{n}$ is not necessarily in reduced form, because $gcd(m,n)=1$ is not guaranteed by your current exposition. An easy way around this is to take care of the situation in which $gcd(m,n) = d > 1$ by including something like "If $gcd(m,n) = d > 1$, then let $m = id, \ n = jd$ with $i,j \in \mathbb{N}$ and write $\frac{m}{n} = \frac{c}{d}$, so that you have an equivalent fraction in reduced form.

  • $\begingroup$ Regarding the last sentence in your last bullet point, why did you write $\frac{m}{n} = \frac{c}{d}$? Based upon what you said, should you not have written $\frac{m}{n} = \frac{i}{j}$? If so, wouldn't that affect my one line that reads "$M < n = f(\frac{m}{n})$," which is essential in obtaining the contradiction? $\endgroup$
    – user193319
    May 29, 2017 at 12:42

Note that this approach essentially re-proves the fact that the rationals are dense in the real numbers - that is, that every open interval contains a rational number. If you don't want to re-prove this, here's another approach that assumes we already know that $\mathbb{Q}$ is dense in $\mathbb{R}$.

First, prove that if $S$ is a dense set in $\mathbb{R}$ then in fact every interval $(a,b)$ must contain infinitely many points of $S$. Then, fix $K$ and prove that the set of rationals of the form $A = \{m/n \in \mathbb{Q}: n < K, a < m/n <b\}$ is finite. Then by the pigeonhole principle, there must be $q \in \mathbb{Q} \cap (a,b)$, $q \notin A$. Then if we write $q = m/n$ in reduced form, we must have $n > K$.


You must log in to answer this question.

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