Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Continuity question

  1. Feb 5, 2009 #1

    In the book i'm reading it gives the function

    f(x) = 0, if x is irrational
    f(x) = 1/q, if x=p/q in lowest terms.

    It says this is continuous at all irrational x. This i can understand i think, because you can show that f(x) tends to zero, as x tends to a, for all a. For this you just take epsilon to be the distance from a to the closest rational number. It can be seen from the graph:

    http://img80.imageshack.us/img80/7246/26351357js6.jpg [Broken]

    Then they give the function

    f(x) = 0, if x is irrational
    f(x) = x, if x is rational.

    But they say this is discontinuous at all values of x other than x=0. I don't really understand why this is the case. How come you can't use the same argument as above to show that f(x) tends to zero, as x tends to a, for all a again?

    Last edited by a moderator: May 4, 2017
  2. jcsd
  3. Feb 5, 2009 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    This doesn't exist

    To show that the first function is continuous, you have to notice that for every epsilon, there exists n such that 1/n<epsilon. Then there are only finitely many rationals that are 'near' (say within distance 1) an irrational x with denominator less than or equal to n, so if you pick some d smaller than the distance to the closest one of those, then

    |x-y|<d implies f(y) = 1/q for some q larger than n (since if y is rational, we constructed d to force y to have a larger denominator) or f(y)=0 if y is irrational. Hence |f(x)-f(y)| = |f(y)| < 1/n < epsilon in either case. Hence f is continuous at every irrational point.
  4. Feb 5, 2009 #3


    User Avatar
    Science Advisor

    Actually, what you can show is that the limit is 0 at all real values of x. That is because, given any [itex]\epsilon> 0[/itex], there exist only a finite number of denominators q such that p/q is within [itex]\epsilon[/itex] of any given x, so, as [itex]\epsilon[/itex] goes to 0, both p and q must go to infinity. Since for x rational, f(x)= x, the limit, 0, is equal to the value of the function if and only if x= 0.
  5. Feb 5, 2009 #4
    Okay yeah I understand it better now.

    Thanks for your help!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook