Find range of $\left[\frac{[x]}{x}\right]$

algebra-precalculusceiling-and-floor-functionsfunctions

If $[.]$ denotes greatest integer function, find the range of $$\left[\frac{[x]}{x}\right]$$

My friend and I tried solving this question and arrived at the answer ${0,1}$ but when we took the value of $x$ as $-0.14$ we got the range as $7$ and then while trying other numbers we started getting big numbers like $5,6$ etc…. But the answer given is ${0,1}$, so did we do something wrong?
Thanks.

Best Answer

Let's start with a simple proof showing that when including negative numbers, it's possible for $\bigg[\frac{[x]}{x}\bigg]$ to be any natural number larger than or equal to 1.

Let $x=-\frac{1}{a}$ and $a>1$, then $-1<x<0$. Since $x$ is always between $-1$ and $0$ (in this specific example defining $x$ by $a$), then the greatest integer less than $x$ is always $-1$:

$$\implies[x]=-1$$

So forth, plugging this into the formula

$$\frac{[x]}{x}=\frac{-1}{-\frac{1}{a}}=a$$

Thus, $\forall a>1$ there exists an $x\in(-1,0)$, such that $\frac{[x]}{x}=a$.

So we've shown that $\frac{[x]}{x}$ has range at least $\mathbb{R}_{>1}$, which implies $\bigg[\frac{[x]}{x}\bigg]$, has range of at least $\mathbb{N}_{\geq1}$.

But since $\frac{[x]}{x}\geq0$ $\forall x$ and as you yourself have shown that when $x>0$ then $\bigg[\frac{[x]}{x}\bigg]$ has range $\{0,1\}$ (E.g; $\bigg[\frac{[0.5]}{0.5}\bigg]=0$ and $\bigg[\frac{[1]}{1}\bigg]=1$), then the entire range is $\mathbb{N}_{\geq1}\cup\{0,1\}=\mathbb{N}_0$.


In summary, when $x<0$, we find that $\bigg[\frac{[x]}{x}\bigg]$ can be any natural number greater than or equal to $1$, and when $x>0$ we find that $\bigg[\frac{[x]}{x}\bigg]$ can (and must) be $0$ or $1$, and since $\bigg[\frac{[x]}{x}\bigg]$ as a whole is always greater than or equal to $0$, then the range is all natural numbers including zero.

A good question and a fun solution!