Let $f : [0, 1] \to \mathbb{R}$ be a function that maps rationals to irrationals and irrationals to rationals. I could show that any such $f$ can't be continuous by showing that its range is at most countable and going from there. We also know that for a function $g$ to be continuous, for all sequences $x_n$ that converge to $x$, $g(x_n)$ has to converge to $g(x)$. So since $f$ is discontinuous, there exists a sequence for which this does not hold. Is it possible to construct it without assuming anything further about $f$? In other words, is it possible to prove that $f$ is discontinuous by constructing such a sequence?
Proving a function is discontinuous by constructing a sequence
629 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
Say a function $h(y)$ is a triangular signal, that is a continuous function on all reals to the interval $[0,1]$. Also, if $y$ is rational, so is $h(y)$ and conversely for irrational $y$.
Then $h(f(x))$ is a function from the interval $[0,1]$ to itself. Assume that $f$ is continuous.
1-If $f(x)$ is continuous and $g(y)$ is continuous, then so is $g(f(x))$.
2-If $g(f(x))$ is continuous, then by Brouwer's theorem it contains a fixed point $x_0=h(f(x_0))$.
3-If $x_0$ is rational, then by $h$'s property, so is $f(x_0)$, and conversely for irrational $x_0$.
This creates a contradiction, so $f$ cannot be continuous.
I do not think the logic of sequences will help you much though, because you can always have a sequence of rational numbers converging to an irrational number (say Taylor series for $e^x$ for instance).
The following proof uses Baire Category Theorem.
Suppose $\{r_n\}$ is an enumeration of rationals. Let $A_n=f^{-1}(r_n)$. Since $$\left(\bigcup_{n\ge 1,\ r_n\in[0,1]}\{r_n\}\right)\cup\left(\bigcup_{n\ge 1} A_n\right)=[0,1],$$ by Baire category theorem, at least one $\bar A_n$ contains some interval $I$. Pick $q\in I\cap\mathbb{Q}$. If $f$ is continuous, then $f(q)=r_n\in\mathbb{Q}$, contradicting to the assumption that $f(q)\notin\mathbb{Q}$.