Determine whether the given function is continuous or not.

140 Views Asked by At

Determine whether the given function $$f(x)=\begin{cases} x &\text{ if } x\text{ is rational }\\ 1-x &\text{ if } x \text{ is irrational.}\end{cases}$$ is continuous or not.

Assume the function is continuous and take $x=x_1$ if $x$ is rational otherwise $x=x_2$ then we should have:

($1$)$$\lim_{x \to x_1}f(x)=f(x_1) $$ ($2$)$$\lim_{x \to x_2}f(x)=f(x_2) $$

($1$) $$\forall \epsilon>0, \exists\delta_1>0, \left(\left|x-x_1\right|<\delta_1\Longrightarrow \left|f(x)-f(x_1) \right|<\epsilon\right)$$

($2$) $$\forall \epsilon>0, \exists\delta_2>0,\left(\left|x-x_2\right|<\delta_2\Longrightarrow \left|f(x)-f(x_2)\right|<\epsilon\right)$$

take $\epsilon=\frac{1}{4}$ then we have:

$$\left|f(x)-x \right|\le\left|f\left(x\right)\right|+\left|x\right|<\frac{1}{4}$$

$$\left|f(x)-1+x\right|\le\left|f\left(x\right)\right|+\left|x-1\right|\le\left|f\left(x\right)\right|+\left|x\right|+\left|1\right|<\frac{5}{4}$$

On the other hand : $$1=\left|f\left(x\right)+x-f\left(x\right)-x+1\right|\le\left|f\left(x\right)+x\right|+\left|-f\left(x\right)-x+1\right|\le\left|f\left(x\right)\right|+\left|x\right|+\left|f\left(x\right)\right|+\left|x\right|+\left|1\right|<\frac{1}{4}+\frac{5}{4}=\frac{3}{2}$$

Hence $1<\frac{3}{2}$, although I tried to reach a contradiction,I did not get that and my proof now shows the function is continuous everywhere. but clearly the only point for which the function has a limit at is $x=\frac{1}{2}$ and the limit is the same as the value of the function for $x=\frac{1}{2}$.

2

There are 2 best solutions below

1
On

An Idea to prove the above:
Assuming that between 2 rational numbers there exist some irrational numbers we may state that for some rational number $x=a$ other than 1/2.
If we look for the value of the function at that point, we can see it's $f(x)=a$ but when we do a minor increment in $x$, before reaching another rational number, it would go through an irrational number, which is greater than $a$ by an infinitesimal, we may say this irrational number as $a^+$ if we are to evaluate $f(a^+)$ it is $1-a^+$ which is approximately $1-a$ (slightly smaller than it), and $1-a\neq a$ since we choose $a\neq 1/2$.
$a$ and $a^+$ are infinitely close to each other (on x axis) but $f(a)$ and $f(a^+)$ are significantly apart, Hence $f(x)$ is discontinuous everywhere except $x=1/2$ as pointed out by @fleablood.

0
On

Hint:

In any neighborhood of $x$, you will find function values as close as you want to $x$ and to $1-x$. So unless $x=1-x$, continuity is broken.