# Prove that $f$ is discontinuous for points $b/2^n$

Let $$f(x) = \cases{1/2^n & if x = b/2^n with b odd \cr 0 & otherwise}$$

Prove that $f$ is discontinuous at the points $x=b/2^n$ with $b$ odd, but is continuous at every other point.

Let's see, if I take $S$ to be the set of all numbers of the form $b/2^n$ then for $a \in S$ I'll let $0< \varepsilon < 1/2^n$ and $\delta>0$ such that $\exists x\in \mathbb{R} / S$ : $|a-x|<\delta$. Then $|f(a)-f(x)|=1/ 2^n> \varepsilon$ so $f$ is discontinuous at $a$. Is this right? Now how to prove continuity at every other point?

• You should distinguish two cases: when $x=0$ and when $x \ne 0$ (and not of the form $b/2^n$ for odd $b$).. For the latter case try to find an interval around each such $x$ so that in that interval $f(x)=0$. For the $x=0$ case, try to find the maxima of the $f(x)$ function within any interval around $0$. – Zoltan Zimboras Oct 22 '17 at 4:36

The numbers in the form of $b/2^n$ is called dyadic. Let $x$ be any point not dyadic. Given a certain $\epsilon$, we can choose $\delta$ small enough that in the interval $(x-\delta, x+\delta)$, the dyadic numbers all do not have small denominators.

Formally, let $N$ be a number big enough such that $2^N > 1/\epsilon$, and let $\delta_1 = 1/2^{N+1}$.

And let $\delta_2$ be a number small enough that the interval $(x-\delta_2, x+\delta_2)$ do not contain a dyadic number in the form of $b / 2^k$ where $k \leq N$.

For example, the interval $(3/8, 5/8)$ contains $1/2$ which has denominator $2^1$. Or another example, $(3/16,5/16)$ contains $1/4$ which has denominator $2^2$. If our choice of $\delta_1$ results in one of these cases, then we simply choose $\delta_2$ to be small enough to "avoid" stepping on the.se low-denominator dyadic number. To prove that this choice of $\delta_2$ is always possible, look at the binary expansion of $x$. Because $x$ is not dyadic, the binary expansion of $x$ will not terminate, but rather it goes on forever (it might repeat itself after a while but it will go on forever). Suppose the dyadic number we "stepped on" has form $b/2^k$ then just go further than the $k$-th digit.

Now it's rather straightforward to show that $f(x)$ in the interval $(x-\delta_2, x+\delta_2)$ will have maximum value $1/2^{N+1} < \epsilon$.

At every other point (when $x \in \mathbb{r} - S$), we have f(x)=0.

Let $\epsilon > 0$,
let $\delta$ be epsilon. $$\forall x: 0<\lvert x-a \rvert < \delta,$$ $$f(x)=0<\epsilon$$ $\square$ Q.E.D.