TITLE: Show $f$ is continuous at a point $a \in [0,1]$, iff $a$ is irrational.
QUESTION [0 upvotes]: Let $r_1, r_2,.... $ be an enumeration of the set of rationals on the real line. For each $x\in \mathbb{R}$, let us put $f(x) = \sum_{n;r_n\leq x} \dfrac{1}{2^n} $ . Show $f$ is continuous at a point $a\in [0,1]$, iff $a$ is irrational.
for irrational points the terms of the series are infinite and for rational points the terms are finite and the sums are finite. So how do I choose an $\epsilon$ to prove that $f$ is not continuous at $a\in \mathbb{Q}$?
Any hints?

REPLY [1 votes]: Note that if $x < y$ then if $D_x= \{m| r_m \le x\}$ and $D_y = \{m|r_m\le y\}$ then $D_x \subset D_y$.  And as there is rational $q$ so that $x < q < y$ and there is a $k$ so that $q = r_k$ so $k\in D_y$ but $k\not \in D_x$, $D_x$ is a  proper subset of $D_y$. So $f(x) =\sum_{m\in D_x}\frac 1{2^m} <\sum_{m\in D_y}\frac 1{2^m} = f(y)$.
Now $q= r_k$ is rational then for all $x < r_k$ then $k \not \in D_x\subsetneq D_q$ but $k \in D_q$ so $f(x) = \sum_{m\in D_x} f(x) \le \sum_{m\in D_q;m\ne k} \frac 1{2^m} < \sum_{m\in D_q;m\ne k} \frac 1{2^m}+\frac 1{2^k} =\sum_{m\in D_q}\frac 1{2^m} =f(q)$.  So $|f(q) - f(x)| \ge \frac 1{2^k}$.  So $f$ can not be continuous at any rational $q$.
Now suppose $x$ is irrational and let $D_x = \{m| r_m \le x\}$.
Now for any $\epsilon > 0$ then let $\frac 1{2^w} < \epsilon$.  $\frac 1{2^w} = \sum_{j> w} \frac 1{2^j}$.
Now let $\delta = \min_{m=1}^w(|x-r_m|)$.
Now the only rationals in the interval $(x - \delta, x + \delta)$ can only have indexes larger that $w$ (because if $q = r_k$ and $k \le w$ then $|x-r_k| \ge \delta$ by the way we defined $\delta$).
Now if $|x-y| < \delta$ then only  the elements in $D_y$ that are not in $D_x$ (if $y > x$) or the elements of $D_x$ not in $D_y$ (if $x > y$) are the indexes of rationals in the interval so the only elments of $D_y$ not in $D_x$ (or vice versa) are indexes larger than $w$.
So $|f(x) - f(y)| \le \sum_{j>w} \frac 1{2^j} = \frac 1{2^w} < \epsilon$.
So $f$ is continuous at $x$.
{"set_name": "stack_exchange", "score": 0, "question_id": 3849207}