# Thread: Continuity at 0 (Rational/Irrational)

1. ## Continuity at 0 (Rational/Irrational)

Prove that the function f defined by $f(x)= x$if is rational and $f(x)=-x$ if x is irrational is continuous at 0 only .

Ok so I was thinking doing it this way:

$\exists \{x_n\} \in \mathbb{Q}$ such that $x_n \to c$, $x_n \neq c$, $\forall n$ and $c \neq 0$
$\exists \{y_n\} \in \mathbb{R} \backslash \mathbb{Q}$ such that $y_n \to c$ , $y_n \neq c$ , $\forall n$ and $c \neq 0$

Then,

$lim f(x_n) = lim (x_n)=c$
$
lim f(y_n) = lim -(y_n)=-c
$

So then if I say something like there exists a sequence $\{x_n\}$ of rational numbers such that $x_n \to 0$ and a sequence $\{y_n\}$ of irrational number such that $y_n \to 0$. And then show that there limits are the same would that show that it is only continuous at 0???

2. Does this give a verry strong hint?
$\left| x \right| < \delta = \varepsilon \Rightarrow \quad \left| {0 - \left( { - x} \right)} \right| = \left| {0 - \left( x \right)} \right| < \delta = \varepsilon$

3. Yes, it does give a strong hint...

Ok so how would I word my answer??? Would something like that be correct?

Let $\epsilon > 0$ Choose $\delta = \epsilon$.
Then for $\left| f(0) - f(x) \right| = \left| {0 - \left( { - x} \right)} \right| = \left| {0 - \left( x \right)} \right|< \epsilon = \delta \quad \forall x \in \mathbb{R}$, $\left| x - 0 \right| < \delta \quad \delta > 0$

This shows that the function is continous at 0 but it doesn't show that it is only at 0, right???
So I have to show that the function is discontinuous at every other points? If I showed that there are two sequences converging to different limit would that be enough?

4. $\left( {\forall z \ne 0} \right)\left( {\forall n} \right)\left( {\exists x_n \in \mathbb{Q}} \right)\left( {\exists y_n \in \mathbb{R}\backslash \mathbb{Q}} \right)\left[ {\left( {x_n } \right) \to z\,\& \,\left( {y_n } \right) \to z} \right]$