# Math Help - continuity

1. ## continuity

Let $f: \bold{R} \to \bold{R}$ be the function $f(x) := \begin{cases} 1 \ \text{if} \ x \in \bold{Q} \\ 0 \ \text{if} \ x \not \in \bold{Q} \end{cases}$. Is this function continuous at any real number $x_0$?

It has no limit because $L = \lim_{n \to \infty} f(1/n) = \lim_{n \to \infty} 1 = 1$. Whereas $L = \lim_{n \to \infty} f(\sqrt{2}/n) = \lim_{n \to \infty} 0 = 0$. In other words, we can find both a rational and irrational sequence converging to $x_0$? Hence $f$ is not continuous at any real number $x_0$?

Is this correct?

2. No it's not correct. The function is not continuous at any point. (you were right on this).
And for
It has no limit because .
$\lim_{n\to \infty} f(\frac{1}{n})$ doesn't exist. It's equivalent to write $\lim_{x \to 0^+} f(x)$. When x tends to 0, f(x) doesn't tend to anything, it get the values 0 and 1 again and again and it doesn't tend to 1 as you said.
In other words, we can find both a rational and irrational sequence converging to ? Hence is not continuous at any real number ?
I think the implication doesn't work. For example if you have the function $f(x)=x$, then you could find both a rational and irrational sequence converging to, say 3. But the functions is continuous at any point. So be careful.

3. Originally Posted by arbolis
No it's not correct. The function is not continuous at any point. (you were right on this).
And for $\lim_{n\to \infty} f(\frac{1}{n})$ doesn't exist. It's equivalent to write $\lim_{x \to 0^+} f(x)$. When x tends to 0, f(x) doesn't tend to anything, it get the values 0 and 1 again and again and it doesn't tend to 1 as you said.
And about I think the implication doesn't work. For example if you have the function $f(x)=x$, then you could find both a rational and irrational sequence converging to, say 3. But the functions is continuous at any point. So be careful.
It does exist (the limits of the two sequences) in the context of this question. $(1/n)_{n=0}^{\infty}$ is a sequence of rationals, thus $\lim_{n \to \infty} f(1/n) = 1$. Whereas, $(\sqrt{2}/n)_{n=0}^{\infty}$ is a sequence of irrationals. Thus $\lim_{n \to \infty} f(\sqrt{2}/n) = 0$. Both these sequences converge to $0$. But $1 \neq 0$, and so the limit at $0$ does not exist.

4. You are right, sorry. I didn't realize $\frac{1}{n}$ was rational.
So
In other words, we can find both a rational and irrational sequence converging to ? Hence is not continuous at any real number ?
should be correct in your case.

5. Originally Posted by particlejohn
$\lim_{n \to \infty} f(1/n) = 1$. Whereas, $(\sqrt{2}/n)_{n=0}^{\infty}$ is a sequence of irrationals. Thus $\lim_{n \to \infty} f(\sqrt{2}/n) = 0$. Both these sequences converge to $0$. But $1 \neq 0$, and so the limit at $0$ does not exist.
You have the right idea. Here is a way to sharpen your result.
If $r \in \mathbb{R}$ is any real number then $r$ is the limit of a sequence of rational numbers, $\left( {Q_n } \right) \to r$, and is also the limit of a sequence of irrational numbers, $\left( {I_n } \right) \to r$ now as you have noted $\left( {f\left( {I_n } \right)} \right) \to 0\,\& \,\left( {f\left( {Q_n } \right)} \right) \to 1$.
Since $r$ is either rational or irrational $f$ cannot be continuous at $r$.