# Function continuous in exactly the irrational points

1. Jan 11, 2009

### math8

Give an example of a function f:(0,1)-->Reals which is continuous at exactly the irrational points in (0,1).

I think the function f such that f(x)=1/n if x is rational in (0,1) (x=m/n for some n not 0) and f(x)= 0 if x is irrational in (0,1) should work.
I get the reason why f is continuous at the irrationals, but what would be a convincing argument to show that f is not continuous at the rationals?

I mean, there should be an e>0 s.t. for every d>0, we have |x-xo|<d but |f(x)-f(xo)|> or eq. to e. (for every rational xo).

2. Jan 11, 2009

### tim_lou

Re: continuity

no, the function that you have is only continuous at 0. Just think of lim(x->.5) f(x). That limit isn't well defined. What you might want to do is to exploit the countable nature of the rationals. Make it so that f(x) at rationals become increasingly small as the counting goes up.

3. Jan 11, 2009

### math8

Re: continuity

Maybe I'm mistaken but I think f(x)=1/n if x is rational in (0,1) (x=m/n for some n not 0) is such that f(x) at rationals becomes increasingly small as the counting goes up.

4. Jan 11, 2009

### Dick

Re: continuity

That's it. Be sure and specify m/n is in lowest terms to make sure f(x) is well defined. Now can you show f(x)->0 as x->a for an irrational number a?

5. Jan 11, 2009

### math8

Re: continuity

for an irrational a, f(a)= 0

Now, for every e>0 , there exists N>0 s.t.n> or eq.N d implies |f(x)|< e. (because f(x) is either 1/n or 0)

6. Jan 11, 2009

### Dick

Re: continuity

That's not very clear. Ok, e>0. Pick N>1/e. Tell me how to find a neighborhood of a where f(a)<=1/N<e. Hint: consider all of the numbers k/n where n<=N.

7. Jan 11, 2009

### tim_lou

Re: continuity

Ah, yes you are certainly right. I didn't know what I was thinking. Your solution seems good. To show how it's not continuous at rationals, you just need that between every two numbers there is an irrational number. Since any interval is uncountable and the rationals are countable.

Last edited: Jan 11, 2009