Q: Prove that if $m$ is a positive integer and $x$ is a real number, then
$$ \lfloor mx \rfloor=\lfloor x \rfloor+\lfloor x+\frac{1}{m} \rfloor+\lfloor x+\frac{2}{m} \rfloor+...+\lfloor x+\frac{m-1}{m} \rfloor. $$
I think the answer in the textbook is wrong. Let me show you the answer first.
Answer:
Let $x=n+(\frac{r}{m})+c$, where $n$ is an integer, $r$ is a nonnegative integer less than $m$, and $c$ is a real number with $0\le c<\frac{1}{m}.$The left-hand side is $\lfloor nm+r+mc \rfloor=nm+r.$ On the right-hand side, the terms $\lfloor x \rfloor $through $\lfloor x+\frac{m+r-1}{m} \rfloor$ are all just n and the terms from $\lfloor x+\frac{m-r}{m} \rfloor$ on are all n+1. Therefore, the right-hand side is $(m-r)n+r(n+1)=nm+r$, as well.
I think the part
"the terms $\lfloor x \rfloor $through $\lfloor x+\frac{m+r-1}{m} \rfloor$ are all just n"
Is wrong. I think the correct answer is:
$\lfloor x+\frac{m-r-1}{m} \rfloor$
Because $\lfloor \frac{m+r-1}{m} \rfloor\ge\lfloor \frac{m-r}{m} \rfloor$. (r is a nonnegative integer less than m)
So, I think the answer should be $\lfloor x+\frac{m-r-1}{m} \rfloor$ because $\lfloor x+\frac{m-r-1}{m} \rfloor$>$\lfloor \frac{m+r-1}{m} \rfloor$.
Is my idea logical? Welcome for the feedback.