[Math] Show that the function is not continuous anywhere

real-analysis

I'm trying to prove that a specific function $f$ is not continuous for any $x_0$ that it is defined for. Here's what I have so far. Let

$$f(x) = \left\{
\begin{array}{rl}
-1 & \textrm{ if $x$ is irrational}\\
1 & \textrm{ if $x$ is rational}
\end{array}
\right.$$
I claim that $f$ is not continuous anywhere. Suppose $a$ is an irrational number. By way of contradiction, suppose that $f$ is continuous at $a$. By definition, it follows that given $\epsilon >0$ there exists $\delta > 0 $ such that $|f(x)+1|<\epsilon$ if $0|x-a|<\delta.$ Then, we have that $$|f(x)+1| = |-1+1| = 0 < \epsilon$$ if $x$ is irrational and $$|f(x)+1|=|1+1|=2<\epsilon$$ if $x$ is rational. Thus, we have that $\delta > 0$ and $\delta > 2$.

$\textbf{Now this is where I am stuck}. $ Am I going about this the right way? Thanks!

Best Answer

Hints:

You should know the facts that $\Bbb Q$ and $\Bbb R\setminus \Bbb Q$ is dense in $\Bbb R$ respectively.

Now suppose $x \in \Bbb R \setminus \Bbb Q$, then there exists a sequence $\{x_n: x_n\in \Bbb Q\}$ which converges $x$. Clearly, $f(x)=-1\not=1=\lim_{n\to \infty}f(x_n)$.

The other case is similar.

Related Question