# Continuity of a weird function defined as a summation including floor

## Homework Statement

Show that $f(x) = \sum_{i=1}^{\infty}\frac{2^{i}x - \lfloor 2^{i}x \rfloor}{2^{i}}$ is continuous at all real numbers, excluding integers.

## The Attempt at a Solution

I've tried going about via |f(x) - f(y)| < ε, but am having trouble with this, since first, I don't get anywhere and can't really pin down the floor parts of the function, and second, I'm a bit confused, since I also have to deal with n → ∞, in addition to, say, y → x to show continuity.

What I got this way is $f(y) - f(x) = \sum_{i=1}^{\infty}\frac{2^{i}(y - x) + \lfloor 2^{i}x \rfloor - \lfloor 2^{i}y \rfloor}{2^{i}}$, but after spending hours on this I have zero idea what to do with that.

Any help would be greatly appreciated, as I'm really struggling here.

Last edited:

PAllen
Maybe a first place to get a handle on this is to answer why it's not continuous at integers. Do you understand that?

Another hint is that I don't thing combining the y and x non-floor terms is doing you any favors. Try keeping x terms and y terms together.

Well, I can see that at integers, the sum is always zero, and I assumed this function goes in waves, so that it's increasing from, say 0 to 1, but then has a value of 0 at 1. But I can't really show that it's discontinuous at integers, either (believe me, I've tried).

I've written the f(y) - f(x) without combining them, as well, but I just can't get anywhere that way, either. The reason why I combined them is that I wanted to somehow relate to the fact that y → x.

PAllen
What is f(1.001)? What is f(.999) ? What about 1.00001 and .99999 ? What do you think that says about the limit at integers?

Last edited:
That's exactly what I'm working on right now, trying to work this out. But, for example, if y → x, can I say that $\lfloor2^{n}y\rfloor \rightarrow 2^{n}x$? Because 2n is increasing very rapidly, so I'm not sure it doesn't "beat" y → x.

PAllen
That's exactly what I'm working on right now, trying to work this out. But, for example, if y → x, can I say that $\lfloor2^{n}y\rfloor \rightarrow 2^{n}x$? Because 2n is increasing very rapidly, so I'm not sure it doesn't "beat" y → x.

What is .999 - floor(.999) ?

What is 1.001 - floor(1.001) ?

What is .999 - floor(.999) ?

What is 1.001 - floor(1.001) ?
Well, it's 0.999 and 0.001, respectively, but it's still the 2n thing that's bothering me, since n is not fixed, but rather n → ∞. I understand that you're going closer and closer, but, again, even as you go lower and lower from 1.001, 2n increases so rapidly that multiplying by it could still yield a higher integer after applying the floor function, couldn't it? I mean, how do I argue that it doesn't, I think that's what I'm having so much trouble with.

edit: But even if I can say that $\lfloor2^{n}y\rfloor \rightarrow 2^{n}x$, I'm still dealing with an infinite sum, right? And, say, the harmonic series also converges to zero, but the infinite sum does not.

Last edited:
PAllen
Well, it's 0.999 and 0.001, respectively, but it's still the 2n thing that's bothering me, since n is not fixed, but rather n → ∞. I understand that you're going closer and closer, but, again, even as you go lower and lower from 1.001, 2n increases so rapidly that multiplying by it could still yield a higher integer after applying the floor function, couldn't it? I mean, how do I argue that it doesn't, I think that's what I'm having so much trouble with.

edit: But even if I can say that $\lfloor2^{n}y\rfloor \rightarrow 2^{n}x$, I'm still dealing with an infinite sum, right? And, say, the harmonic series also converges to zero, but the infinite sum does not.

As a first step, I'm trying to make sure you understand continuity enough to see why at integers it obviously isn't continuous. That is easier than the rest of the problem, and gives hints for the rest. I believe I've given you way more than enough to understand why it is not continuous at integers.

So: can you give a clear statement of why it is not continuous at integers?

Yeah, it's because $\lim_{y\to x^{+}}f(y) = 1$, whereas $\lim_{y\to x^{-}}f(y) = 0$, where x is an integer.

PAllen
Ok, next step. If you sum from i=1 ... k, for y sufficiently close to x not an integer, what happens to the difference in the floor values?

They become zero. I was thinking of trying induction on this, is this the right step? I'd try to show that for all n, you can find δ, such that if |x - y| < δ, the floors cancel out.

edit: OK, I guess I don't even need induction here, I'd just show this is valid for all n, and then argue that since the sum of the infinite series is the sum of a finite series as n → ∞, if the finite series converges for all n, then the infinite series converges by definition. Any thoughts?

Last edited:
PAllen
ok, now forget y for a moment, and consider f(x,k), define by the same series as f(x) but summed from k+1 to ∞. What is an upper bound on this value? The same will be true for y. Then, what is an upper bound on f(y,k) - f(x,k)? Then and upper bound on f(y)-f(x) has become k(y-x) + this upper bound. Since as y -> x, k-> ∞, can you put all this together? Note that by construction, when the first k floor value differences become zero, y-x < 2^-k. So you have an upper bound of:

k(2^-k) + the upper bound I describe above.

Last edited:
Hmm, well I think the upper bound for f(x, k) would be 2-k, wouldn't it? And then the upper bound for f(x, k) - f(y, k) would be 2-k+1. If that's correct, do I then just apply the squeeze theorem to show f(y) - f(x) also converges to zero as k → ∞?

edit: On second thought, how did you come up with the upper bound k(2-k)? I mean, I set up $\delta = min(|\frac{\lceil 2^{n}x \rceil}{2^{n+1}} - x|, |\frac{\lfloor 2^{n}x \rfloor}{2^{n+1}} - x|)$, although I guess I can add $\frac{1}{2^{n}}$, as well.

Last edited:
PAllen