# 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

-

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.

$${}_{}$$