- #1
Mr Davis 97
- 1,462
- 44
Homework Statement
Let ##f## be defined on ##[0,1]## by the formula
$$ f(x) = \left\{
\begin{array}{ll}
x & \text{if } x \text{ is rational} \\
0 & \text{if } x \text{ is irrational} \\
\end{array}
\right. $$
Prove that ##f## is continuous only at ##0##.
Homework Equations
The Attempt at a Solution
First I will try to prove that ##f## is continuous at ##0##. We will show that for every sequence ##\{a_n\}## such that ##\lim_{n\to\infty}a_n = a## we have ##\lim_{n\to\infty}f(a_n) = f(a)##. To this end let ##\{a_n\}## be a sequence such that ##\lim_{n\to\infty} a_n = 0##. Let ##\epsilon > 0##. By the fact that ##\{a_n\}## converges to ##0## we have that there exists ##N\in \mathbb{N}## such that ##n\ge N## implies ##a_n < \epsilon##. Now, suppose that ##a_n## is rational, then ##|f(a_n)-0| = f(a_n) = a_n < \epsilon##; suppose that ##a_n## is irrational, then ##|f(a_n)-0| = 0 < \epsilon##. So we have shown that if ##n\ge N##, then ##|f(a_n) - 0| < \epsilon##, and so ##\lim_{n\to\infty}f(a_n) = 0 = f(0)##. Hence ##f## is continuous at ##0##.
Second we will show that for all ##a\in(0,1]##, ##f## is not continuous. Let ##a\in(0,1]##. Note that by the density of rational and irrationals there exists a rational sequence ##r_n## and an irrational sequence ##i_n## such that ##\lim_{n\to\infty}r_n = \lim_{n\to\infty}i_n = a##. However, we see that ##\lim_{n\to\infty}f(r_n) = \lim_{n\to\infty} r_n = a \not = 0 = \lim_{n\to\infty}f(i_n)##. If ##f## were continuous these limits would be the same, and so we have that ##f## is not continuous on the interval ##(0,1]##.