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

Function continuous at irrationas and integers

  1. Nov 16, 2004 #1
    I have to either give an example or show that no such function exists:

    A real valued function f(x) continuous at all irrationals and at all the
    integers, but discontinuous everywhere else.

    I think such function exists and I would define it as follows:

    f(x) = 0 if x is an irrational or an integer
    1/q if x is rational (p/q) but not an integer.

    This way the proof is similar to the case for continuous for irrationas, discontinuous everywhere else. Each rational can be viewed as a limit of a sequence of irrationals, right? So those rationals that have the same value as that sequence (integers in my case) will be continuous, those that don't won't be.
    Does this sound right?
  2. jcsd
  3. Nov 16, 2004 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Your argument seems very right to me.
  4. Nov 16, 2004 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    It is not clear to me that your function as defined is continuous anywhere,

    I am having troubles with your function on the rationals, it is not clear that it is even a function.

    [tex] f ( \frac 1 2 ) <> f( \frac 2 4 ) [/tex]

    Seems like you would need to throw in a requirement that P and q must be relatively prime. But then, I think you will be able to find a rational (y) in every neighborhood of an irrational (x) such that f(y) is not in the corresponding neighborhood of f(x). so your function on the irrationals is not continuous.

    I know that I have not expressed this precisely, but since I do not know what definition of continuity you are working with, I have tried to make it general. Do a bit of analysis along the lines I am describing, see if it holds. I have not done a detailed analysis and may be wrong, that is your job! :smile:
  5. Nov 16, 2004 #4
    Also think about it like this. Any delta neighborhood is going to include both rationals and irrationals. Therefore for any x_0, you can find an x such that |f(x) - f(x_0)| (is not less than) epsilon.

    I really think there is a way to do this though, just think about how you can satisfy your definitions.
  6. Nov 17, 2004 #5


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    zolit does, in fact, have the right function. (once he adds the condition that p and q are relatively prime)
  7. Nov 17, 2004 #6
    Yeah, that's what I forgot to specify: all rational non-integers p/q expressed in the lowest order. this takes cares of 2/4, etc.
    Thanks for all input.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Function continuous at irrationas and integers
  1. Continuous Function (Replies: 5)

  2. Continuous function? (Replies: 6)

  3. Continuous functions (Replies: 3)

  4. Continuous function (Replies: 8)