# How to simplify an equation with a floor function

This might seem like a dumb post, but I've never worked with floor/ceiling functions before.

How would we simplify $$\dfrac{\left\lfloor{x}\right\rfloor \left\lfloor{x+1}\right\rfloor}{10100} - \dfrac{\left\lfloor{x-1}\right\rfloor \left\lfloor{x}\right\rfloor}{10100}$$?

$$x$$ is a positive integer if that helps, and in that case it seems like we can just ignore the floor functions or am I missing something.

• $\lfloor x \rfloor = x$ if $x$ is a positive integer. – DavidW Oct 27 '20 at 13:33

Note that $$\lfloor x\pm k\rfloor=\lfloor x\rfloor\pm k$$ for any integer $$k$$. Hence $$\frac{\lfloor x\rfloor\lfloor x+1\rfloor}{10100}-\frac{\lfloor x\rfloor\lfloor x-1\rfloor}{10100} =\frac{\lfloor x\rfloor(\lfloor x\rfloor+1)}{10100}-\frac{\lfloor x\rfloor(\lfloor x\rfloor-1)}{10100} =\frac{2\lfloor x\rfloor}{10100} =\frac{\lfloor x\rfloor}{5050}$$ If furthermore $$x$$ is itself an integer, this simplifies to $$x/5050$$.
This makes sense only if $$x$$ is positive real number. For integers, you can simply remove the floor function.
$$\frac{\left\lfloor{x}\right\rfloor \left\lfloor{x+1}\right\rfloor}{10100} - \frac{\left\lfloor{x-1}\right\rfloor \left\lfloor{x}\right\rfloor}{10100} = \frac{\left\lfloor{x}\right\rfloor (\left\lfloor{x+1}\right\rfloor - \left\lfloor{x-1}\right\rfloor)}{10100} = \frac{\, \lfloor x \rfloor}{5050}$$
• @stevengregory of course it is true for all $x$. My point was in reference to question stating $x$ was a positive integer. I meant to say that it should probably read positive real as in case of positive integer, the floor function could simply be removed. Reading it now, yes I could have been more clear. – Math Lover Jul 16 at 15:28