4

What is the range of $$f(x)=\left[\frac{[x]}{x}\right]?$$

My textbook says the answer is the two-point set $\{0,1\}$, which I think means that the range is either $0$ or $1$. When I graph the function on my TI-nspire CX, I get a graph that has points on it whose $y$ values are indeed $0$ and $1$, but the graph also has points whose $y$ values are neither $0$ nor $1$. An example of this is the point $(-0.5,2)$. I don't understand this

Crosby
  • 585
54284User
  • 111
  • @dxiv Probably sufficiently non-obvious to make it worth posting as an answer? – David Jun 26 '18 at 01:43
  • @David Advice taken, thanks. Expanded and posted as a full answer. – dxiv Jun 26 '18 at 01:53
  • 1
    My guess is they were taking $[-0.5] = 0,$ $[-1.3] = -1,$ etc, either by mistake or by definition. This is sometimes how the floor function is defined for negative numbers (especially when it goes by the name 'integer part' function), though it's a less common definition and obviously not the one your calculator uses.. – spaceisdarkgreen Jun 26 '18 at 02:02
  • 1
    I'm more inclined to think the simply didn't consider $x \le 0$. Defining or making that error just isn't something any reasonable text would do. – fleablood Jun 26 '18 at 02:06
  • @fleablood in the american high school system (at least what I remember of it) these 'domain and range' questions ask 'what's the domain?' and 'what's the range?' and the domain means the maximal subset of the reals on which the rule is naturally defined as a real-valued function ($\mathbb R \setminus {0}$) here) and then the range is the set of values under that maximal domain. (So by that standard there's also no problem with omitting the $x\ne 0$ clause.) Within this paradigm, forgetting to consider $x<0$ is something no reasonable text would do – spaceisdarkgreen Jun 26 '18 at 02:42
  • @fleablood ...And I've definitely seen the the definition both ways and seen people make the mistake (read: I've made the mistake). On the other hand, since it involves the floor function, I suppose it could certainly be occurring in context where functions are mostly defined on the positive numbers. – spaceisdarkgreen Jun 26 '18 at 02:48
  • 1
    well... it's one or the other. We both agree that if we define $[x]$ as being the unique greatest integer $n$ so Thatn $n \le x < n+1$ then $[[x]/x] = 1$ if $x$ is a an integer other than $0$. $[[x]/x]= 0$ if $x$ is a positive non-integer and $[[x]/x]$ could be any value if $x < 0$, dont we? – fleablood Jun 26 '18 at 03:09
  • @fleablood Of course. – spaceisdarkgreen Jun 26 '18 at 04:11

1 Answers1

7

I guess the textbook says that for $\,x \gt 0\,$, in which case it holds because:

$$ 0 \le \lfloor x \rfloor \le x \quad\implies\quad 0 \le \frac{\lfloor x \rfloor}{x} \le 1 \quad\implies\quad \left\lfloor \frac{\lfloor x \rfloor}{x} \right\rfloor \in \{0,1\} $$

For negative numbers, however, all positive integers are included in the range, since for $\,\forall n \in \mathbb{N}\,$:

$$\;\displaystyle\left\lfloor \frac{\lfloor −1/n \rfloor}{−1/n} \right\rfloor = \left\lfloor \frac{-1}{−1/n}\right\rfloor = \lfloor n \rfloor = n $$

dxiv
  • 76,497
  • 3
    Not to mention, the expression is undefined for $x = 0$. – fleablood Jun 26 '18 at 01:58
  • @fleablood Right, of course. Tacit assumption was that the domain must have been defined somewhere as either $,\mathbb{R}^+,$ or $,\mathbb{R} \setminus {0},$. – dxiv Jun 26 '18 at 01:59