TITLE: Floor function properties: $[2x] = [x] + [ x + \frac12 ]$ and $[nx] = \sum_{k = 0}^{n - 1} [ x + \frac{k}{n} ] $
QUESTION [31 upvotes]: I'm doing some exercises on Apostol's calculus, on the floor function. Now, he doesn't give an explicit definition of $[x]$, so I'm going with this one:

DEFINITION Given  $x\in \Bbb R$, the integer part of $x$ is the unique $z\in \Bbb Z$ such that $$z\leq x < z+1$$ and we denote it by $[x]$.

Now he asks to prove some basic things about it, such as: if $n\in \Bbb Z$, then $[x+n]=[x]+n$
So I proved it like this: Let $z=[x+n]$ and $z'=[x]$. Then we have that
$$z\leq x+n<z+1$$
$$z'\leq x<z'+1$$
Then $$z'+n\leq x+n<z'+n+1$$
But since $z'$ is an integer, so is $z'+n$. Since $z$ is unique, it must be that $z'+n=z$.
However, this doesn't seem to get me anywhere to prove that 
$$\left[ {2x} \right] = \left[ x \right] + \left[ {x + \frac{1}{2}} \right]$$
in and in general that 
$$\left[ {nx} \right] = \sum\limits_{k = 0}^{n - 1} {\left[ {x + \frac{k}{n}} \right]} $$
Obviously one could do an informal proof thinking about "the carries", but that's not the idea, let alone how tedious it would be. Maybe there is some easier or clearer characterization of $[x]$ in terms of $x$ to work this out.
Another property is
$$[-x]=\begin{cases}-[x]\text{ ; if }x\in \Bbb Z \cr-[x]-1 \text{ ; otherwise}\end{cases}$$
I argue: if $x\in\Bbb Z$, it is clear $[x]=x$. Then $-[x]=-x$, and $-[x]\in \Bbb Z$ so $[-[x]]=-[x]=[-x]$. For the other, I guess one could say:
$$n \leqslant x < n + 1 \Rightarrow  - n - 1 < x \leqslant -n$$
and since $x$ is not an integer, this should be the same as $$ - n - 1 \leqslant -x < -n$$
$$ - n - 1 \leqslant -x < (-n-1)+1$$
So $[-x]=-[x]-1$

REPLY [2 votes]: The trick for the inductive proof is that you want to do induction on $x$, not $n$, and you want to take steps of size $\frac{1}{n}$, not steps of size $1$.
For the base case, observe that it's true for $x \in [0, \frac{1}{n})$, since all of the terms are zero.
Then for the inductive step, you can see that substituting $x \to x + \frac{1}{n}$ will increase exactly one term on the left hand side by $1$, and has the same effect on the right hand side. Alternatively, you can calculate
$$\begin{align} \sum_{k=0}^{n-1} \left\lfloor \left(x + \frac{1}{n}\right) + \frac{k}{n} \right\rfloor 
&= \sum_{k=0}^{n-1} \left\lfloor x + \frac{k+1}{n} \right\rfloor 
\\&= \left( \sum_{k=0}^{n-1} \left\lfloor x + \frac{k}{n} \right\rfloor 
\right) + \left\lfloor x + \frac{n}{n} \right\rfloor 
- \left\lfloor x + \frac{0}{n} \right\rfloor 
\\&= \lfloor nx \rfloor + 1
\\&= \left\lfloor n \left( x + \frac{1}{n} \right) \right\rfloor
\end{align}$$
Consequently, if the theorem holds for $x = t$, then it also holds for $x = t + \frac{1}{n}$. Similarly, it holds for $x = t - \frac{1}{n}$. We thus conclude it holds for all real $x$.
To phrase this as an "ordinary" induction problem, the statement to be proved is:

For every integer $k$, the equation holds for $x \in [\frac{k}{n}, \frac{k+1}{n})$.

The base case is $k=0$. One inductive argument then proves the theorem for positive $k$, and another proves it for negative $k$.