Prove that $f$ is continuous only at $x=0$

1.6k Views Asked by At

I cannot understand the solution to this problem given in my book.

Problem: Consider function $f$ defined for all $x$ by $f(x)=x$ if $x$ is irrational and $f(x)=0$ if $x$ is rational. Prove that $f(x)$ is continuous only at $x=0$.

Solution given in book: Recall that, arbitrarily close to any given real number, there are rational as well as irrational numbers. The function $f$ is continuous at $a = 0$, because $|f (x) − f (0)|=|f (x) − 0|=|f (x)|≤|x|$ for any $x$, so $f (x) → f (0)$ as $x → 0$. If $a \neq 0$ is rational, then $|f (x) − f (a)|=|f (x)|$, which is equal to $|x|$ when $x$ is irrational. But if $a\neq 0$ is irrational, then $|f (x) − f (a)|=|f (a)|$ whenever $x$ is rational. In either case, $f(x)$ does not approach $0$ as $x$ approaches $a$. It follows that $f$ is discontinuous for all $x = 0$.

I do not specifically understand the part where it shows that $f(x)$ is not continuous at any $x$ other $0$. I would be very grateful if anybody could throw some light on this part as well as the last part of the proof that $f(x)$ is continuous at $x=0$. How does the inequality give the conclusion that $f(x)$ is continuous at $x=0$.

1

There are 1 best solutions below

7
On BEST ANSWER

For the continuity at $0$, since you always have $|f(x)|\leqslant|x|$, then, given $\varepsilon>0$, if $\delta=\varepsilon$, then$$|x|<\delta\iff|x|<\varepsilon\implies|f(x)|<\varepsilon.$$

If $a\ne0$ and $a$ is rational, then $|f(x)-f(a)|=|f(x)-0|=|f(x)|$, which is equal to $|x|$ if $x\notin\Bbb Q$. So, if $|x-a|<\frac{|a|}2$, $|f(x)|=|x|>\frac{|a|}2$ and therefore $|f(x)|$ is not arbitrarily close to $0$, as it should be, if $f$ was continuous at $a$.

Can you understand the other case now?