The integer nearest to \(x\) is either \([x]\) or \([x]+1\). If \(\{x\} \lt 1/2\), then the nearest integer is \([x]\). This means \(\{x\}+1/2 \lt 1\), so:
$$\begin{align} x &= [x] + \{x\} \\ [x+1/2] &= [[x] + \{x\} + 1/2] \\ [x+1/2] &= [x] + [\{x\} + 1/2] \\ [x+1/2] &= [x] \end{align}$$
If \(\{x\} \gt 1/2\), then the integer nearest to \(x\) is \(x+1\). Since \(\{x\}+1/2 \gt 1\), this means:
$$\begin{align} x &= [x] + \{x\} \\ [x+1/2] &= [[x] + \{x\} + 1/2] \\ [x+1/2] &= [x] + [\{x\} + 1/2] \\ [x+1/2] &= [x] + 1 \end{align}$$