1. ## Continuity Question

Discuss the continuity of the function defined by:

$f(x)=\begin{cases}
& x\text{ if } x\,\in\,Q \\
& -x\text{ if } x\,\notin \,Q
\end{cases}$

2. Originally Posted by vuze88
Discuss the continuity of the function defined by:

$f(x)=\begin{cases}
& x\text{ if } x\,\in\,Q \\
& -x\text{ if } x\,\notin \,Q
\end{cases}$
Every rational number lies between two irrational numbers, and vice versa.

So the function is discontinuous everywhere...

3. Can you explain why every rational number is between two irrational numbers? Also, according to the textbook, it is discontinuous everywhere but is continuous at 0.

4. Yes, the function is continuous at 0. Given any $\epsilon$> 0, [tex]|f(x)- f(0)| is |x- 0|= |x| if x is rational, and |-x- 0|= |x| if x is irrational. Take $\delta$ to be any number less than $\epsilon$.

If a is any rational number other than 0, f(x)= a so |f(x)- f(a)= |x-a| if x is rational and |-x-a|= |x+a| if x is irrational. No matter how small $\delta$ is, there will exist both rational and irrational numbers between $a-\delta$ and $a+ \delta$ so with $\epsilon$ less than half the difference between them, there will exist x such that |f(x)- f(a)|> [tex]\epsilon[/b]. The same is true if a is irrational.