8

Let $f: [0,1)\to\mathbb{R}$ such that $f(x)=0.a_1a_3a_5\ldots$ where $x=0.a_1a_2a_3a_4\ldots$, i.e, $f(x)$ skips the even digits of $x$. Prove $f$ is continuous at $0$, and find a point where $f$ is not continuous. Updated: If the expansion of $x$ could be finite, we adopt the finite expansion.

As we can see, $f(0)=0$ and $f(x)\geq 0$ for all $x\in[0,1)$. To prove $f$ is continuous, we want to estimate $f(x)$ less than some elementary function $g(x)$. I tried to estimate it, but the function is so strange.

Did anyone see the similar function before? Any hint would be highly appreciated.

lee
  • 219
  • 2
    If you know that $|0-x|<\delta$ (i.e., $|x|<\delta$), what can you say about $|f(0)-f(x)|$ (i.e., $|f(x)|$)? Can you upper bound it by something involving $\delta$? – kccu Aug 23 '19 at 20:22
  • @kccu: We have $|f(0)-f(x)|=f(x)$. But I don't know any relation between $|x|<\delta$ and $f(x)$ since $x$ can have infinite decimal expansion and $a_3>a_2$. – lee Aug 23 '19 at 20:29
  • Is there a limit to how much larger $a_3$ can be than $a_2$? If so, how does that translate to a limit on how large $f(x)$ can be in comparison to $\delta$? Maybe try some examples, say $\delta = 0.2$, so we know $x=0.a_1a_2\dots$ with $a_1=<2$. What does this tell you about how large $f(x)=a_1a_3\dots$ can be? – kccu Aug 23 '19 at 20:39
  • @kccu: Thank you. I will try. – lee Aug 23 '19 at 20:44
  • 1
    You have the usual problem with non unique decimal expansions. For example, $.01999999\dots = .020000\cdots,$ but then $f(.01999999\dots) = .0999999\dots = .1000000\dots,$ while $f(.020000\dots) = .000000\dots =0.$ – zhw. Aug 23 '19 at 20:45
  • For a point of discontinuity, take a look at what happens near $0.01$. – Matt Carr Aug 23 '19 at 20:46
  • @zhw: Thank you. I will update the question. If the expansion could be finite, we adopt the finite expansion. – lee Aug 23 '19 at 20:48
  • @MattCarr: Thank you. Why did you choose $0.01$? I guess the set of discontinuity is $(0,1)$. – lee Aug 23 '19 at 20:55
  • @lee It could be! I haven't thought about that. Based on the function, I expected things to go wrong at $0.01$ since $f(0.01)=0$ but $f(0.009)=0.9$. – Matt Carr Aug 23 '19 at 21:00
  • Hint: if the decimal expansion of $x$ starts with at least $2n$ zeros, then $f(x)$ starts with at least $n$. – Robert Israel Aug 23 '19 at 21:07
  • 3
    @MattCarr Good idea, but $f(0.009)=0.09$. Otherwise the idea works. – Ingix Aug 23 '19 at 23:02
  • I modified my example of discontinuity to follow closer the path proposed in the comments. – dfnu Aug 24 '19 at 07:39
  • 3
    Did anyone see the similar function before? --- This example is due to Lebesgue, and it can be found (I think this is it's first published appearance, but I'm not certain) on p. 90 of Lebesgue's book Lecons sur l'Intégration et la Recherche des Fonctions Primitives (1904). I don't believe he discusses continuity at $x=0,$ but his intent was to show that a function can satisfy the intermediate value property in an interval without being continuous anywhere in that interval, which is true for this function. (continued) – Dave L. Renfro Aug 24 '19 at 10:01
  • 3
    For more about Lebesgue's function, see my answer to Is there a different name for strongly Darboux functions. – Dave L. Renfro Aug 24 '19 at 10:03
  • @DaveL.Renfro: Thank you so much. – lee Aug 24 '19 at 15:23
  • 2
    By the way, I think maybe the Lebesgue function is slightly different from what you have (same essential idea, however), since I know that Lebesgue's function is discontinuous at each point in the open interval $(0,1),$ whereas @dfnu's answer says your function will have points of continuity in every open interval. I haven't looked carefully at the details of his answer, but I suspect someone would have jumped on it as being problematic by now if it was incorrect. Since my reading of French is extremely poor, I'm more inclined to think Lebesgue's formulation was slightly different. – Dave L. Renfro Aug 24 '19 at 17:44
  • @DaveL.Renfro I also am interested, having noted your comment to see whether I made some mistake or rather the function is different. I'll go through your reference again. Thanks for pointing it out. Let me know if you spot some mistake, please. – dfnu Aug 24 '19 at 17:51
  • 1
    @dfnu: I'll try to remember to look at it tomorrow when I'm fresh. I've been working the past 13+ hours on some contract work, stopping every now and then to pop in and say something in a Stack Exchange group for refreshment purposes, but I'm pretty wasted now (and was when I wrote my last comment an hour ago), so I'm "shutting down" for the day. (Just in case you're wondering why I said what I said an hour ago, rather than simply looking over the details.) – Dave L. Renfro Aug 24 '19 at 18:38

2 Answers2

21

Continuity in $0$

To show continuity in $0$, take any sequence $(a_n)$ converging to $0$, with $0< a_n < 1$. Convergence of $(a_n)$ implies that for any given $k\in \Bbb Z^+$, and for sufficiently large $n$,

$$a_n \leq 10^{-2k}.$$

As a consequence,

$$f(a_n) \leq 10^{-k}.$$

So, by taking $n$ large enough, $f(a_n)$ can be made arbitrarily small and thus the squence $(f(a_n))$ converges to $f(0) = 0$.


Example point where the function is not continuous

Take now, for example, $x_0 = 10^{-2m}$, with $m\in \Bbb Z^+$, so that

$$f(x_0) = 0.$$

The sequence

$$a_n = \sum_{k=1}^n 9\cdot 10^{-2m-k}, \ \ \ n\in \Bbb Z^+,$$

converges to $x_0$. However

$$f(a_n) = \sum_{k=1}^{\left\lfloor\frac{n-1}2 \right\rfloor}9\cdot 10^{-m-k}$$

converges to $10^{-m} \neq f(x_0)$, making the function not continuous in $x_0$.


Further discussion on continuity

It is straightforward to extend the above path to any $x_0\neq 0$ with finite decimal representation where the least significant digit occupies an even position. In all these points the function is not continuous. See Edit 1 at bottom.

On the other hand, if $x_0$ has finite decimal representation and the least significant digit occupies an odd position, then the function is continuous in $x_0$. See Edit 2.

If $x_0$ has infinite decimal representation, then $f$ is continuous in $x_0$. See Edit 3.

So the function is not continuous only on a subset of $\Bbb Q$, which makes it a Riemann-integrable function.


Further discussion on differentiability

The function $f$ is nowhere differentiable. In fact the limit of the difference quotient

$$\lim_{x\to x_0} q_{x_0}(x) = \lim_{x\to x_0} \frac{f(x)-f(x_0)}{x-x_0}$$

never converges. However it does exist (and it is equal to $+\infty$) almost everyhere, that is at all points having infinite decimal representation. See Edit 4 for details.


How the function graph looks like

In the first figure below you see an approximate plot of $f(x)$, the red dots representing some of the points that belong to the grah of $f$. The function is constrained within the light blue regions.

Figure 1

These regions can be obtained by shifting the first one of them, which is plotted, after magnification of a factor $10$, in the following figure. Again red dots are points belonging to the graph of $f$. A further zoom by a factor $100$, and a scaling of the $y$ axis, will give as result an identical copy of the graph given below. And so on for every interval of the form $x\in[0,10^{-2k+1}]$, $y\in [0,10^{-k}]$, $k\in\Bbb Z^+$.

enter image description here


Edit 1. Continuity - Finite decimal representation - least significant digit in even position

Let $x_0$ have decimal representation $$ x_0= \sum_{k=1}^{2m}x_k\cdot 10^{-k}$$ for some $m \in \Bbb Z^+$, and $x_{2m}> 0$.

We have

$$f(x_0) = \sum_{k=1}^mx_{2k-1}\cdot 10^{-k}.$$

Consider the sequence

$$a_n = \sum_{k=1}^{2m-1}x_k\cdot 10^{-k}+ (x_{2m}-1)\cdot 10^{-2m}+\sum_{k=1}^n 9\cdot 10^{-2m-k}, \ \ \ n\in \Bbb Z^+.$$

Clearly $(a_n) \to x_0$. We also have

$$f(a_n) = f(x_0) + \sum_{k=1}^{\left\lfloor\frac{n-1}2 \right\rfloor}9\cdot 10^{-m-k}.$$

So $(f(a_n)) \to f(x_0) + 10^{-m}\neq f(x_0)$, and the function is therefore not continuous in $x_0$.


Edit 2. Continuity - Finite decimal representation - least significant digit in odd position

Let $x_0$ have decimal representation of the form $$ x_0= \sum_{k=1}^{2m-1}x_k\cdot 10^{-k}$$ for some $m \in \Bbb Z^+$, and $x_{2m-1}> 0$.

Again we have

$$f(x_0) = \sum_{k=1}^mx_{2k-1}\cdot 10^{-k}.$$

Suppose the function is not continuous in $x_0$. Thus there must be a sequence $(a_n) \to x_0$ such that $(f(a_n))\not \to f(x_0)$. This in turn implies that, for any $N\in \Bbb Z^+$, there is $\epsilon$ such that

$$|f(a_n) - f(x_0)| \geq \epsilon,$$

for some $n>N$. Consider now $h \in \Bbb Z^+$ such that and $\epsilon > 10^{-m-h}$. So we either have

$$f(a_n) > f(x_0) + 10^{-m-h}\tag{2}\label{2}$$

or

\begin{eqnarray}f(a_n) < f(x_0) - 10^{-m-h}&=&f(x_0)- 10^{-m}+\sum_{k=1}^{h}9\cdot 10^{-m-k}.\tag{3}\label{3}\end{eqnarray}

If \eqref{2} occurs, then it must be

$$a_n > x_0 + 10^{-2m+1-2h}.\tag{4}\label{4}$$

If \eqref{3} occurs, then

$$a_n<x_0 - 10^{-2m+1} + \sum_{k=1}^{2h}10^{-2m-k}.\tag{5}\label{5}$$

Since either \eqref{4} or \eqref{5} occurs for some $n> N$, no matter how large we take $N$, $(a_n)$ does not converge to $x_0$, and we have a contradiction. Thus $f(x)$ is continuous in $x_0$.


Edit 3. Continuity - Infinite decimal representation.

Since, as required by OP, we adopt the finite decimal representation version of the number in case of infinite tail of $9$'s, any digit of $x_0$ (having infinite decimal representation) is at most followed by a finite sequence of $0$'s or $9$'s.

For any $\epsilon>0$, we aim at finding a $\delta(\epsilon)$, such that, for all $x$ satisfying

$$|x_0-x| < \delta(\epsilon),$$

we have

$$|f(x_0)-f(x)| < \epsilon.$$

Take $k$ so that $$10^{-k}\leq \epsilon.$$

In order to obtain

$$f(x) < f(x_0) + 10^{-k}$$

we need the carry due to the addition not to affect the $k$th digit. If $t\geq 0$ is the number of consecutive $9$'s following the $k$th digit of $x_0$, then we must choose

$$x < x_0+10^{-2k-t+1}.$$

Similarly, in order to have

$$f(x) > f(x_0) - 10^{-k},$$

we can decrement the first non-null digit after the $k$th digit. So if $s\geq 0$ is the number of consecutive $0$'s following the $k$th digit of $x_0$ then we need

$$x > x_0 - 10^{-2k-s+1}.$$

Thus we can choose

$$\delta(\epsilon) = 10^{-2k-\max\{t,s\}+1}.$$

And this demonstrates the continuity of $f(x)$ in $x_0$.


Edit 4. Limit of the difference quotient

Let us first show that the limit

$$\lim_{x\to x_0}q_{x_0} (x)$$

does not exist if $x_0$ has finite decimal representation. At this aim, let $m\in\Bbb Z^+$ be the least significant digit of $x_0$, $o_n$ the null sequence

$$o_n = 10^{-2\left(\left\lfloor\frac m2\right\rfloor+n\right)+1}, \ \ n\in \Bbb Z^+$$

and $e_n$ the null sequence

$$e_n = 10^{-2\left(\left\lfloor\frac m2\right\rfloor+n\right)}.$$

The sequences

$$a_n = x_0+o_n$$

and

$$b_n = x_0+e_n$$

both converge to $x_0$. We have now

$$q_{x_0}(a_n) = \frac{f(a_n)-f(x_0)}{o_n} = \frac{10^{-n}}{o_n}=10^{n-2\left\lfloor\frac m2\right\rfloor},$$

so that $(q_{x_0}(a_n))\to+\infty$, and

$$q_{x_0}(b_n) = \frac{f(b_n)-f(x_0)}{e_n}=0,$$

so that $(q_{x_0}(b_n)) \to 0$. Therefore the limit does not exist.

Consider now a point $x_0$ with infinite decimal representation. We want to show, first, that

$$\lim_{x\to x_0^+}q_{x_0}(x) = +\infty.$$

Consider a null sequence $(d_n)$, with $0<d_n<1$, and let $k$ the first non-null digit of $d_n$, that is $$k = -\left\lfloor\log_{10}d_n\right\rfloor.$$ Let also

$$a_n = x_0+d_n,$$

a sequence converging to $x_0$.

Now, the addition $x_0+d_n$ affects at least the $\lfloor\frac{k+1}2\rfloor$th digit of $f(x_0)$ (it may affect more significant digits because of the carry), so that

$$f(x)-f(x_0)\geq 10^{-\left\lfloor\frac{k+1}2\right\rfloor}\tag{6}\label{6}.$$

Condition \eqref{6} and the fact that $d_n < 10^{-k+1}$ yield

$$q_{x_0}(x) = \frac{f(x)-f(x_0)}{d_n}> \frac{10^{-\left\lfloor\frac{k+1}2\right\rfloor}}{10^{-k+1}}\geq 10^{-\frac k2}.$$

Therefore, by taking $n$ large enough, we can make the difference quotient $q_{x_0}(x)$ arbitrarily large. And thus the limit exists and it is $+\infty$.

A similar approach can be used to demonstrate that also

$$\lim_{x\to x_0^-}q_{x_0}(x) = +\infty.$$


A different approach (later edit)

Some insight can be obtained by considering that $f(x)$ can be written as \begin{eqnarray} f(x) &=& \sum_{n=1}^{+\infty} f_n(x)=\\ &=&\sum_{n=1}^{+\infty} \left[\frac{\left(10^{2n-1}x\right)}{10^{n-1}}-\frac{\left(10^{2n}x\right)}{10^{n}}\right] \end{eqnarray} where $(x)$ denotes the fractional part of $x$.

Note, for example, that the above series converges uniformly, by Weierstrass M-test. Then, since for all $n\in \Bbb Z^+$ $f_n(x)$ is continuous at all irrational points, so is $f(x)$. Uniform continuity and Riemann integrability of $f_n(x)$ guarantees also integrability of $f(x)$.

dfnu
  • 7,528
  • (following up on my yesterday comments) Regarding continuity at $0,$ to me this is simply a fact that as the input values approach zero, the corresponding input decimal representations have increasingly long initial segments of zeros, which result in the outputs having decimal representations having increasing long initial segments of zeros, and hence the output values converge to zero. However, "least significant digit occupies an even position" part does not seem correct. Take $0.123456$ for example. The least significant digit is $6$ and this occupies the sixth position. (continued) – Dave L. Renfro Aug 25 '19 at 08:33
  • The value at this point is $0.135,$ and if we take a sequence of values approaching $0.123456$ from the left, then as we progress through that sequence, the terms will have (and will continue to have) the form $0.123455$ followed by a large number of $9$'s, and then other digits, and the images will be values having a decimal representation of $0.135$ followed by a large number of $9$'s (about half as many as before), and then other digits, and hence the image values will converge to $0.136,$ and now I have disproved my claim that something of yours was incorrect, oops! – Dave L. Renfro Aug 25 '19 at 08:47
  • @DaveL.Renfro I'll go through whay you've been writing, don't worry. Maybe not today, 'cause it's my turn to need a little break. But thanks for giving your feedback! – dfnu Aug 25 '19 at 08:51
  • I'll go through --- I'll save you the trouble. Note that at the end I have: "... now I have disproved my claim that something of yours was incorrect, oops!" (To nick-pick, probably "not proved my claim" is more accurate.) – Dave L. Renfro Aug 25 '19 at 09:16
  • @DaveL.Renfro your approach might hint a way to show inconsistencies in what I wrote. – dfnu Aug 25 '19 at 10:19
  • @DaveL.Renfro, read it. The demonstration of that statement (the one about the even position) is straightforward, maybe I can add it. It could be interesting to show what happens if the last digit is in an odd position. Also: the part I'm not too sure about is the the continuity in the points with infinite decimal representation.

    Finally: the function proposed by Legendre (page 90 of the document you proposed) is different. For example, that function takes value $0$ if the decimal representation of the input is not periodic.

    – dfnu Aug 25 '19 at 11:02
  • @DaveL.Renfro I just added a general proof for the case $x_0$ has finite decimal representation and its least significant digit has even position. I'm not sure how to demonstrate that, on the other hand, if the list signficant digit has an odd position, then the function is continuous in $x_0$, even though I have a feeling it is. – dfnu Aug 25 '19 at 15:46
  • 1
    @DaveL.Renfro added a proof also for the continuity in $x_0$ when it has finite decimal representation and the position of least significant digit is odd. – dfnu Aug 25 '19 at 17:15
  • I'll try to look at this carefully (in the sense of working out the details myself first) at some point, as this function seems more interesting than I first thought, but I'll be pretty busy for the next few days, so it won't be right away. If you don't hear back from me regarding this in a week or so, feel free to "ping me" a reminder. – Dave L. Renfro Aug 26 '19 at 17:27
  • @DaveL.Renfro, thanks. Sure, I will! By the way, I believe part of this "weirdness" is due to the fact that, as required by OP, we are using the finite decimal representation, in case of ambuiguity. In fact, if we used the infinite representation, - such as $0.199999\dots$ instead of $0.2$ - and if my reasoning is correct, then the function would be continuous everywhere in its domain. – dfnu Aug 26 '19 at 17:31
  • @DaveL.Renfro the demonstration was incorrect in the case of infinite decimal representation (no infinite sequences of $9$'s allowed, as usual). Now I corrected it and I am reasonably sure it works fine (see Edit 3, if you like, and whenever you have time) – dfnu Aug 27 '19 at 12:58
  • @DaveL.Renfro in case you are interested, I added, at the bottom, an interesting note on $f(x)$ a the sum of a uniform convergent series of functions. – dfnu Oct 16 '19 at 11:44
3

An attempt to show the continuity of $f$ at $0$:

Let arbitrary small error $\epsilon \in (0,1)$ with $\epsilon=0.u_1u_2u_3u_4u_5u_6u_7u_8...$ be given.

For every $x \in (0,1)$ with $x=0.a_1a_2a_3a_4a_5a_6a_7a_8a_9...$

Let $a_{2i-1}$ be the $1st$ digit in $0.a_1a_3a_5a_7a_9...$ such that $a_{2i-1}>u_i$.

Put $\delta \in (0,1)$ by $\delta=$"$0.a_1a_1a_3a_3a_5a_5a_7a_7a_9a_9...$ with $a_{2i-1}$ being substituted by $\max\{0,u_i\}$"

We have "$0.a_1a_3a_5a_7a_9...$ with $a_{2i-1}$ being substituted by $\max\{0,u_i\}$" $\le 0.u_1u_2u_3u_4u_5u_6u_7u_8... = \epsilon$

If $x=0.a_1a_2a_3a_4a_5a_6a_7a_8a_9...\le \delta=$"$0.a_1a_1a_3a_3a_5a_5a_7a_7a_9a_9...$ with $a_{2i-1}$ being substituted by $\max\{0,u_i\}$"

Then $f(x)=0.a_1a_3a_5a_7a_9...\le$ "$0.a_1a_3a_5a_7a_9...$ with $a_{2i-1}$ being substituted by $\max\{0,u_i\}$" $\le 0.u_1u_2u_3u_4u_5u_6u_7u_8... = \epsilon$