# Compute $\lim_{x \to 0} x \lfloor x - \frac{1}{x} \rfloor$

Let $f: \mathbb{R} \to \mathbb{R}$ be the following function:

$f(x) = x \lfloor x - \frac{1}{x} \rfloor$

Show that $f(x)$ admits a limit at zero, and compute its value.

Using epsilon delta, I can prove that $\lim_{x \to 0} x \lfloor x - \frac{1}{x} \rfloor = - 1$:

$|x \lfloor x - \frac{1}{x} \rfloor + 1|$

$\leq |x \lfloor x - \frac{1}{x} \rfloor| + |1|$

$\leq |x| |\lfloor x - \frac{1}{x} \rfloor| + |1|$

$\leq |x| |x| + |1|$

$\leq |x|^2 + |1| < \epsilon$ if $|x| < \delta = \sqrt{\epsilon - 1}$

Is that right? If not, how can I do prove it?

But how do I show that $\lim_{x \to 0} x \lfloor x - \frac{1}{x} \rfloor$ exists?

• That calculation won’t work if $\epsilon\le 1$. – Brian M. Scott Sep 29 '15 at 16:08
• The easiest way to prove this is via a squeeze theorem approach. It is simple enough to put limits on a floor function which bounds this above and below and approach the same limit. – Paul Sep 29 '15 at 16:14
• @Paul Thanks!.. – BCLC Sep 29 '15 at 16:20
• @BrianM.Scott Thanks! – BCLC Sep 29 '15 at 16:20
• Direct approach: use $$x-\frac1x-1\lt\left\lfloor x - \frac{1}{x} \right\rfloor\leqslant x-\frac1x.$$ – Did Sep 29 '15 at 22:20

By definition of the floor function

$$x-\frac{1}{x}-1<\left\lfloor x-\frac{1}{x}\right\rfloor \le x-\frac{1}{x}$$

So for $x>0$

$$x^2-1-x < x \left\lfloor x-\frac{1}{x}\right\rfloor \le x^2-1$$

so by the Squeeze Theorem,

$$\lim_{x\to 0^+}{x \left\lfloor x-\frac{1}{x}\right\rfloor}=-1$$

Now for $x<0$ the direction of the inequality reverses so

$$x^2-1-x > x \left\lfloor x-\frac{1}{x}\right\rfloor \ge x^2-1$$

and again by the Squeeze Theorem,

$$\lim_{x\to 0^-}{x \left\lfloor x-\frac{1}{x}\right\rfloor}=-1$$

Since the two one-sided limits are the same, the limit as $x\to 0$ is $-1$.

• Figured this out from Paul's comment. Thanks Marconius! – BCLC Sep 29 '15 at 16:20

Suppose that $\frac1{n+1}\le x<\frac1n$; then $n<\frac1x\le n+1$, so

$$-n-\frac{n}{n+1}=\frac1{n+1}-(n+1)\le x-\frac1x<\frac1n-n=-n+\frac1n\;,$$

and $\left\lfloor x-\frac1x\right\rfloor$ is either $-n-1$ or $-n$. Thus, $x\left\lfloor x-\frac1x\right\rfloor$ is either $-nx$ or $-(n+1)x$. Now use the limits on $x$ to bound $-nx$ and $-(n+1)x$, and let $n$ increase without bound.

• Without computing limit, is there a way to prove that the limit exists? – BCLC Sep 29 '15 at 16:23
• @BCLC: I don’t immediately see one. – Brian M. Scott Sep 29 '15 at 16:25