# Show that $f$ is continuous at exactly one point

Let $f:\mathbb{R}\to\mathbb{R}$ be defined by

$$f(x)= \begin{cases} 5x+7 & \text{ if } x \text{ is rational } \\ x+11 & \text{ if } x \text{ is irrational } \end{cases}$$

Show that f is continuous at exactly one point.

My attempt:
Let $a \in \mathbb R$, and take a rational sequence $(x_n)$ and an irrational sequence $(y_n)$ such that $x_n \to a$ and $y_n \to a$.
Then $f(x_n) = 5x_n + 7 \to 5a+7$ and $f(y_n) = y_n + 11 \to a + 11$.
We have $lim_{n \to \infty}f(x_n) = lim_{n \to \infty}f(y_n) = f(a) \iff a = 1$. Therefore $f$ is continuous only at $x = 1$.

Is the above valid? In the above, I have shown that for every sequence $(z_n)$ such that $(z_n) \to 1$, $lim_{n \to \infty} f(z_n) = f(1)$. Doesn't that prove that $f$ is continuous at $x = 1$? In the given solutions they also used the $\epsilon - \delta$ definition of continuity to prove that $f$ is continuous at $x = 1$, I'm not sure if that is necessary, or why it is necessary. Can anyone explain?

Thanks.

## 1 Answer

Using the sequential criterion for continuity is fine, but I think you have to make clear, why $\bigl(f(z_n)\bigr)$ converges for all $z_n \to 1$, even when not all $z_n$ are rational or all irrational. That almost follows from your argument (just look at the subseqeunces of the rational resp. irrational $z_n$), but you can expand on this a little:

Let $z_n \to 1$ be any sequence. If all but finitely many $z_n$ are rational, then $f(z_n) \to f(1)$, as allready shown (the finitely many terms do not make a difference), same if all but finitely many $z_n$ are irrational. Otherwise (that is we have infinitely many rational and irrational $z_n$) let $(z_{n_k})$ denote the subsequence of rational and $(z_{n'_k})$ the subsequence of irrational numbers. Then $(z_{n_k})$ and $(z_{n'_k})$ cover $(z_n)$ and have the same limit $f(1)$ (as shown), hence $f(z_n) \to f(1)$.

• Actually, my proof doesn't consider real-valued sequences $(z_n)$ which contain both rational and irrational values. Is that why we have to use the $\epsilon-\delta$ definition to complete the proof? – Vizuna Apr 24 '15 at 6:51
• No, you haven't, you can stick to sequences if you like and expanding your proof. I'll be more concrete on this. – martini Apr 24 '15 at 6:58
• Thanks for your edit. You say that if $(z_n)$ contains finitely many irrational values, and infinitely many rational values, then the finitely many terms do not make a difference, so $f(z_n) \to f(1)$ as shown earlier. Intuitively I think I see the logic behind this, as $(z_n)$ would behave like a rational sequence in this case, but is there any theorem or argument that proves this result (that we can disregard the finitely many terms)? – Vizuna Apr 24 '15 at 7:27
• This follows from the very definition of convergence for a sequence. – martini Apr 24 '15 at 7:29
• At a finite $K \in \mathbb N^+$, for all $n \ge K$, each $z_n$ is rational? – Vizuna Apr 24 '15 at 7:34