# Thread: Continuity at 0 (Rational/Irrational)

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

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

Ok so I was thinking doing it this way:

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

Then,

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

So then if I say something like there exists a sequence $\displaystyle \{x_n\}$ of rational numbers such that $\displaystyle x_n \to 0$ and a sequence $\displaystyle \{y_n\}$ of irrational number such that $\displaystyle 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?
$\displaystyle \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 $\displaystyle \epsilon > 0$ Choose $\displaystyle \delta = \epsilon$.
Then for $\displaystyle \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}$, $\displaystyle \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. $\displaystyle \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]$