# Solve $\lfloor x^2 + 2x \rfloor = \lfloor x^2 \rfloor + 2 \lfloor x \rfloor$

How do we find all real $x$ such that $\lfloor x^2 + 2x \rfloor = \lfloor x^2 \rfloor + 2 \lfloor x \rfloor$, where $\lfloor \space \rfloor$ denotes the "greatest integer function" ?

• Just to be clear, you mean $[1.2]=2$ and $[1.7]=2$? Or put in other words, what do you mean with "greatest integer function"? – Umberto May 6 '14 at 9:29
• No. [1,2]=1, [1,9]=1, [3.8]=3. If $n\leq x <n+1$ then $[x]=n$ – RFZ May 6 '14 at 9:31
• The floor function is also known as the greatest integer function. – 6005 May 6 '14 at 9:41

## 1 Answer

Note that $$\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} \floor{a_1 + a_2 + \cdots + a_k} \ge \floor{a_1} + \floor{a_2} + \cdots + \floor{a_k}$$ with equality if and only if $$\{a_1\} + \{a_2\} + \cdots + \{a_k\}< 1$$ where $\{ \space \}$ denotes the fractional part. In particular, $$\floor{x^2 + 2x} \ge \floor{x^2} + \floor{x} + \floor{x}$$ So if $\{x\} = r < 1, \{x^2\} = s < 1$, you are looking for when $$s + 2r < 1$$ There are uncountably many solutions to this. To generate a solution, take any irrational $r$ with $0 < r < \frac12$. Then find any integer $n$ such that $2nr + r^2$ has fractional part less than $1 - 2r$, and let $x = n + r$.