There exists a function such that is not continuous at ANY .
Proof: Let be defined the following (completely legitimate) way.
Let if is a rational number.
Let if is an irrational number.
If , then there exists a sequence of rational numbers tending to , that is . Also, there exists a sequence of irrational numbers tending to , that is . Therefore by the Sequential Definition, cannot be continuous at .
Now we make a small twist of this trick.
There exists a function such that is continuous at one single point.
Let , where is the function in the previous proposition. Then we “ruined” the discontinuity at zero! Indeed, if , then as well, since the sequence is bounded and (Proposition 2.4.1). On the other hand, we have not ruined the discontinuity at any other point. In fact, if , then we will have a convergent sequence of irrational numbers such that and a convergent sequence of rational numbers such that .
There exists a function such that is continuous at if and only if is an irrational number.
Note: There exists NO function such that is continuous at if and only if is an rational number. This is not easy to show.
Proof: The function is defined the following way. If is irrational number then . If is a rational number in the form of such that is its lowest terms (so and are relative primes, that is they do not have common prime factors), then let . Clearly, is not continuous at if is a rational number. Indeed, there exists a sequence of irrational numbers tending to and , . On the other hand, a bit surprisingly is continuous at if is an irrational number. Why?
Let be integer numbers such that and , then .
Proof: Now, provided that . Hence the lemma follows.
Let be an irrational number and . Pick an integer such that . Then, by the previous lemma in the interval there is at most one rational number such that . Indeed, if there are two such numbers and then, and thus . It is impossible since the length of the interval is . Let us chose in such a way that there is NO rational number on the interval such that . This means that if , then So, the function is continuous at .
There exists a function such that is continuous at if and only if is not an integer number.
Proof: Let be defined the following way. if is an integer number. Otherwise, let . If is an integer, then . On the other hand, there is a convergence sequence of non-integers tending to , so for any , hence is not continuous at . Again, if is not an integer, than there exists a such that if , then is also not an integer, hence . This shows that is continuous at .
Let be a closed subset. Then there exists a function such that set of continuity of is exactly . If is a function, then its set of continuities can be a non-closed set (see the proposition above), but it can always be written as , where all the ’s are closed sets.