Define the function f R rightarrow R by fx 1 if x 0 1q if
Define the function f: R rightarrow R by f(x): = {1 if x = 0 1/q if x = p/q is rational with p belongsto Z and q elementof N having no common factors 0 if x is rational. Prove: f is discontinuous at all rational points, but continuous at all irrational points.
Solution
f is discontinuous at every rational number in [0,1]
Let x [0,1] Q and choose < 1/q . There exists an irrational number y such that | x - y | < , which implies that | f(x) - f(y) | = | 1/q - 0 | = | 1/q | < . Thus we have produced an for which there is no such that | f(x) - f(y) |< when | x - y | < .
f is continuous at every irrational number in [0,1]
Let c be an irrational number in [0,1] and > 0. Then there is a natural number n such that 1/n < . If we choose small enough that the interval ( c - , c + ) contains no rational numbers with denominator less than n , then it follows that for x in this interval we have | f(x) - f(c) | = | f(x) | 1/n < .
