Graph of f(x) = the first number in the decimal expansion of x

500 Views Asked by At

I'm a bit confused about the answer given in the textbook. I take the definition of 'the first number in the decimal expansion of $x$' to mean simply the first number in its base $10$ representation... as opposed to the first digit of the fractional part of $x$?

So I thought it would be a series of steps, initially from $0$ to $9$ for $ 0 \leq x < 1$ and then for $ n\geq 0 $ we have a series of steps from $1$ to $9$ for $10^n \leq x \leq 10^{n+1}$. And we would have $f(x) = f(-x)$.

However, the book gives the answer as the second image in this link: Graph of the function $f(x)=$the 1st number in the decimal expansion of $x$, which I can't understand (why would $f(x) = 9$ for $-1< x <0\ldots$)