# Thread: Proving Continuity of a function

1. ## Proving Continuity of a function

f(x)={0 if x is irrational | 1/n if x = m/n ∈ Q}

I need to prove that f is continuous at every irrational point and that f has a simple discontinuity at every rational point.

I have no idea where to begin because for all irrational x, there will always be a rational number in an arbitrarily small neighborhood around it.

Please help me. Any input is appreciated.

2. You need to show that $\lim_{x\rightarrow a} f(x)= 0$ for all a. Yes, inside any interval around an irrational (or rational) number there exist a rational number. But, since there are only a finite number of m such that m/n is in such an interval, as the interval gets smaller, n must get larger and larger.

3. Originally Posted by HallsofIvy
You need to show that $\lim_{x\rightarrow a} f(x)= 0$ for all a. Yes, inside any interval around an irrational (or rational) number there exist a rational number. But, since there are only a finite number of m such that m/n is in such an interval, as the interval gets smaller, n must get larger and larger.
How do I know that (the bolded part)? Because, I agree, if I can prove n gets larger and larger, then I'll be able to prove continuity. My worry was that the irrational point would contain some simple fraction like 1/2 in its neighborhood. How can I prove that $n \rightarrow \infty$ as $\frac{m}{n} \rightarrow x$?