I need to find $\displaystyle |f(x)-f(x_0)|< \epsilon$ when $\displaystyle 0<|x-x_0|< \delta$ (where $\displaystyle \delta,\epsilon>0$).Quote:

Prove that $\displaystyle f(x) = \begin{cases} x \ \ \ \ \text{if} \ x \ \ \text{is irrational} \\ 0 \ \ \ \ \text{if} \ x \ \text{is rational} \end{cases}$ is discontinuous at $\displaystyle x_0 \neq 0$.

Suppose that $\displaystyle x_0$ is rational and $\displaystyle x$ is rational. Therefore:

$\displaystyle |f(x)-f(x_0)|< \epsilon \Leftrightarrow \ |f(x)|< \epsilon \Leftrightarrow \ 0< \epsilon$.

This is valid from the definition of $\displaystyle \epsilon$.

Suppose that $\displaystyle x_0$ is rational and $\displaystyle x$ is irrational.

$\displaystyle |f(x)-f(x_0)|< \epsilon \Leftrightarrow \ |f(x)|<\epsilon \Leftrightarrow \ x< \delta$.

Hence take $\displaystyle \delta=\epsilon$.

So the proof for when $\displaystyle x_0$ is rational is as follows:

Let $\displaystyle \epsilon>0$, $\displaystyle x_0$ be rational and $\displaystyle \delta:=\epsilon$. When $\displaystyle 0<|x-x_0|< \delta$ I have:

$\displaystyle |f(x)-f(x_0)|=|f(x)|< \epsilon$ as required.

Suppose that $\displaystyle x_0$ is irrational and $\displaystyle x$ is also irrational.

$\displaystyle |f(x)-f(x_0)|<\epsilon \Leftrightarrow \ |f(x)-x_0|< \epsilon \Leftrightarrow \ |x-x_0|<\epsilon$.

Therefore pick $\displaystyle \delta=\epsilon$ as before.

Suppose that $\displaystyle x_0$ is irrational and $\displaystyle x$ is rational.

$\displaystyle |f(x)-f(x_0)|<\epsilon \Leftrightarrow \ |f(x)-x_0|< \epsilon \Leftrightarrow |-x_0|<\epsilon \Leftrightarrow \ |x_0|<\epsilon$.

At this point, a $\displaystyle \delta$ value cannot be chosen since it isn't in the above inequality chain. Since $\displaystyle |x_0|<\epsilon$ has to be valid $\displaystyle \forall \epsilon>0$, there is a clear contradiction (eg, if $\displaystyle x_0=5$ I can make $\displaystyle \epsilon=4$).

Is this sufficient proof to show that $\displaystyle f(x)$ is discontinuous at $\displaystyle x_0 \neq 0$?

(btw, I have shown that $\displaystyle f(x)$ is continuous at $\displaystyle x_0=0).$

PS. Can someone show me a way of doing this with sequences? This $\displaystyle \epsilon, \delta$ method is a little long.