Does there exist a function that is continuous at all irrational points but not continuous at all rational points?
Definition (for this question) : A function is said to be continuous at a point if for any positive there exists an such that for all real
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Relevant wiki: Continuous Functions
We'll define a function first and then we'll prove it works.
f ( x ) = 0 if x is irrational If x is rational, let x = q p where p , q ∈ z and q > 0 then we let f ( x ) = q 1
I would recommend trying to visualise this function, or at least drawing a rough sketch of it before carrying on so you have a 'feel' of the function.
Now at any irrational point, say r , it is continuous because no matter how small epsilon gets (in the definition above), there are finitely many x with f ( x ) > ϵ where ∣ x − r ∣ < 1 . This is because q (above) can only take finitely many values.
At any rational point, say r , there exist irrational points arbitrarily close to it as the irrationals are dense in the reals as required.