# Prove the following identity holds for all real numbers $x$

Prove the following identity holds for all real numbers $x$: $$\lfloor4x\rfloor=\lfloor x \rfloor +\left\lfloor x+\frac14 \right\rfloor+\left\lfloor x+\frac24\right\rfloor+\left\lfloor x+\frac34\right\rfloor$$

I understand that $\lfloor4.3\rfloor$ would be $4$ and $\lfloor-2.4\rfloor$ would be $-3$

I am trying to prove this by cases. I think that I should prove each case first such as $\lfloor x\rfloor$ first and then $\left\lfloor x+\frac14\right\rfloor$ and on but I'm having trouble proving it in generality

## 4 Answers

Hint: Separate all real numbers into a few groups, depending on the relation of their fractional part to the intervals formed by $0$, $\frac14$ , $\frac12$ , $\frac34$ and $1$.

Let $\{x\}=x-[x]$, (i.e., the fractional part of $x$).

First Case: if $\{x\}\in[0,0.25)$ then $$4\{x\}<1\Rightarrow [4x]=4[x],$$ and also $$[x]=[x+1/4]=[x+2/4]=[x+3/4],$$ so for this case we have $$[4x]=4[x]=[x]+[x+1/4]+[x+2/4]+[x+3/4].$$

$${}_{}$$

Second Case: if $\{x\}\in[0.25,0.5)$ then $$1\le4\{x\}<2\Rightarrow [4x]=4[x]+1,$$ and also $$[x]=[x+1/4]=[x+2/4],$$ but now $$[x+3/4]=[x]+1.$$ So for this case we have $$[4x]=4[x]+1=[x]+[x+1/4]+[x+2/4]+[x+3/4].$$

$${}_{}$$

I think you see the pattern and can complete the last two cases.

$${}_{}$$

EDIT: I added lots of spacing and made the equations display style for readability.

• With the mix of math and english, I find it almost impossible to read your answer. – Justin Jan 30 '14 at 4:48
• @Quincunx: I think this answer is quite well-written and to the point, and fully detailed. – ShreevatsaR Jan 30 '14 at 5:11
• @ShreevatsaR This is a well written answer, but I think it could use a little spacing (would you hand in a proof that looks like that? I know I would split it into more lines). – Justin Jan 30 '14 at 6:45

There is no need to consider different cases. Observe that any real number $$x$$ admits the representation $$\,x=n+k\,\frac14+r$$, where $$k$$ is an integer within $$[0,4)$$ and $$r$$ is a real within $$[0,\frac14)$$. Then prove that each of l.h.s. and r.h.s. of your identity equals $$4n+k$$.

Define $$f(x)=\lfloor x\rfloor+\left\lfloor x+\tfrac14\right\rfloor+\left\lfloor x+\tfrac12\right\rfloor+\left\lfloor x+\tfrac34\right\rfloor-\lfloor4x\rfloor\tag1$$ Note that $$f$$ is periodic with period $$\frac14$$: \begin{align} f\!\left(x+\tfrac14\right) &=\left\lfloor x+\tfrac14\right\rfloor+\left\lfloor x+\tfrac12\right\rfloor+\left\lfloor x+\tfrac34\right\rfloor+\color{#C00}{\lfloor x+1\rfloor}\color{#090}{-\lfloor4x+1\rfloor}\\ &=\color{#C00}{\lfloor x\rfloor+1}+\left\lfloor x+\tfrac14\right\rfloor+\left\lfloor x+\tfrac12\right\rfloor+\left\lfloor x+\tfrac34\right\rfloor\color{#090}{-\lfloor4x\rfloor-1}\\ &=f(x)\tag2 \end{align} Furthermore, for $$x\in\left[0,\frac14\right)$$, each term in $$(1)$$ is $$0$$. Thus, $$f(x)=0$$ for x in a complete period.

So, we have that for all $$x\in\mathbb{R}$$, $$f(x)=0$$. That is, $$\lfloor x\rfloor+\left\lfloor x+\tfrac14\right\rfloor+\left\lfloor x+\tfrac12\right\rfloor+\left\lfloor x+\tfrac34\right\rfloor=\lfloor4x\rfloor\tag3$$