We will show that the function is not continuous at any point x∈R. Consider an arbitrary point x∈R. It is well known that the set of rational numbers Q is everywhere dense in R. Therefore there exists a sequence {rn}n=1∞⊂Q such that rn→x for n→∞. Hence f(rn)=2→2 for n→∞. Also it is known that the set of irrational numbers I=R∖Q is everywhere dense in R. Therefore there exists a sequence {xn}n=1∞⊂I such that xn→x for n→∞. Hence f(xn)=4→4 for n→∞.
So, thus we found two sequences rn→x←xn, but ∣f(rn)−f(xn)∣→0 for n→∞. Therefore f is not continuous at x∈R. Now if B⊂R is any subset, then f is not continuous on B , because f is discontinuous at every point.
Comments