# continuity

• Aug 5th 2008, 08:00 AM
particlejohn
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?
• Aug 5th 2008, 09:25 AM
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.
Quote:

In other words, we can find both a rational and irrational sequence converging to http://www.mathhelpforum.com/math-he...f20c111b-1.gif? Hence http://www.mathhelpforum.com/math-he...1929cce7-1.gif is not continuous at any real number http://www.mathhelpforum.com/math-he...f20c111b-1.gif?
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. (Wink)
• Aug 5th 2008, 09:34 AM
particlejohn
Quote:

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. (Wink)

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.
• Aug 5th 2008, 10:08 AM
arbolis
You are right, sorry. I didn't realize $\frac{1}{n}$ was rational.
So
Quote:

In other words, we can find both a rational and irrational sequence converging to http://www.mathhelpforum.com/math-he...f20c111b-1.gif? Hence http://www.mathhelpforum.com/math-he...1929cce7-1.gif is not continuous at any real number http://www.mathhelpforum.com/math-he...f20c111b-1.gif?
should be correct in your case.
• Aug 5th 2008, 10:14 AM
Plato
Quote:

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$.