Continuity of Rational and Irrational

362 Views Asked by At

Suppose f(x) = x - 1 if x is rational and f(x) = 1 - x if x is irrational. Is f continuous at x = 0?

I can convince myself that it's both continuous and discontinuous by thinking about the density of rationals and irrationals, so I'm really confused now. Can someone explain the answer please?

2

There are 2 best solutions below

0
On

$f(0)=-1$, construct a sequence $x_n \to 0$ such that $x_n$ is irrational, what is the limit of $f(x_n)$?

what can you conclude?

0
On

$f$ only continuous at $x=1$

If $f(x)= \begin{cases} x &\text{x is rational}\\ -x &\text{x is irrational}\\ \end{cases}$

Then $f$ is continuous at $x=0$