1. ## continuity

Let $\displaystyle f: \bold{R} \to \bold{R}$ be the function $\displaystyle 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 $\displaystyle x_0$?

It has no limit because $\displaystyle L = \lim_{n \to \infty} f(1/n) = \lim_{n \to \infty} 1 = 1$. Whereas $\displaystyle 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 $\displaystyle x_0$? Hence $\displaystyle f$ is not continuous at any real number $\displaystyle 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 .
$\displaystyle \lim_{n\to \infty} f(\frac{1}{n})$ doesn't exist. It's equivalent to write $\displaystyle \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 $\displaystyle 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 $\displaystyle \lim_{n\to \infty} f(\frac{1}{n})$ doesn't exist. It's equivalent to write $\displaystyle \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 $\displaystyle 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. $\displaystyle (1/n)_{n=0}^{\infty}$ is a sequence of rationals, thus $\displaystyle \lim_{n \to \infty} f(1/n) = 1$. Whereas, $\displaystyle (\sqrt{2}/n)_{n=0}^{\infty}$ is a sequence of irrationals. Thus $\displaystyle \lim_{n \to \infty} f(\sqrt{2}/n) = 0$. Both these sequences converge to $\displaystyle 0$. But $\displaystyle 1 \neq 0$, and so the limit at $\displaystyle 0$ does not exist.

4. You are right, sorry. I didn't realize $\displaystyle \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
$\displaystyle \lim_{n \to \infty} f(1/n) = 1$. Whereas, $\displaystyle (\sqrt{2}/n)_{n=0}^{\infty}$ is a sequence of irrationals. Thus $\displaystyle \lim_{n \to \infty} f(\sqrt{2}/n) = 0$. Both these sequences converge to $\displaystyle 0$. But $\displaystyle 1 \neq 0$, and so the limit at $\displaystyle 0$ does not exist.
You have the right idea. Here is a way to sharpen your result.
If $\displaystyle r \in \mathbb{R}$ is any real number then $\displaystyle r$ is the limit of a sequence of rational numbers, $\displaystyle \left( {Q_n } \right) \to r$, and is also the limit of a sequence of irrational numbers, $\displaystyle \left( {I_n } \right) \to r$ now as you have noted $\displaystyle \left( {f\left( {I_n } \right)} \right) \to 0\,\& \,\left( {f\left( {Q_n } \right)} \right) \to 1$.
Since $\displaystyle r$ is either rational or irrational $\displaystyle f$ cannot be continuous at $\displaystyle r$.