Rewriting $\lfloor x \rfloor+\lfloor-x\rfloor$ How can I prove that
$$\lfloor x\rfloor + \lfloor -x\rfloor = \begin{cases} \phantom{-}0 &, x \in \mathbb{Z} \\ -1 &, x \notin \mathbb{Z} \end{cases}$$
where $x$ is a real number?

Consider the following equation: $\lfloor x \rfloor - \lfloor x \rfloor = 0.$ Doh, of course, because $\lfloor x \rfloor = \lfloor x \rfloor$. The question is then: when does $\lfloor x \rfloor = |\lfloor -x \rfloor|$? (The straight bars here represent the absolute value function).
If $x$ is positive but not an integer, then $\lfloor -x \rfloor = -(\lfloor x \rfloor + 1)$, so $|\lfloor x \rfloor| < |\lfloor -x \rfloor|$. For example, if $x = \pi \approx 3.14159$, then $-x \approx -3.14159$ and $\lfloor -x \rfloor = -4$, and obviously $3 < |-4|$.
Similarly, if $x$ is negative but not an integer, then $\lfloor -x \rfloor = -(\lfloor x \rfloor + 1)$ just the same, but $|\lfloor x \rfloor| > |\lfloor -x \rfloor|$. Example: $x = -\frac{3}{2}$. Then $$\lfloor -x \rfloor = \left\lfloor \frac{3}{2} \right\rfloor = 1,$$ and obviously $|-2| > 1$.
But if $x$ is an integer, be it positive or negative or 0, then $\lfloor x \rfloor = |\lfloor -x \rfloor|$. For example, if $x = -7$, then $\lfloor x \rfloor = -7$ and the absolute value of that is 7, the same as the absolute value of $x$ itself, and $\lfloor x \rfloor$ as well.
