How to show that if $[x]=v$ then $\left|x-v\right|<\frac{1}{2}$

46 Views Asked by At

How to show that if $[x]=v$ then :

$$\left|x-v\right|\le\frac{1}{2}$$

Where $ []$ is the nearest Integer Function.

I know how to round a real number,but how to prove this?it looks simple,however I could not prove that.

3

There are 3 best solutions below

0
On

If by contradiction we would have $\lvert x - v \rvert > \frac{1}{2}$ that would mean that either $x > v + \frac{1}{2}$ or $x < v - \frac{1}{2}$. In the first case the $v + 1$ would be a better approximation of $x$ and in the second it would be $v - 1$ as we would have $\lvert x - (v + 1) \rvert < \frac{1}{2}$ in the first case and $\lvert x - (v - 1) \rvert < \frac{1}{2}$ in the second one.

5
On

It is wrong. Say $x = 2.5$ and $v = 2$. Then $[x] = v$ but $|x - v| = \frac{1}{2} \not< \frac{1}{2}$.

2
On

WLOG $x=v+f$ where $0\le f<1$

$$|x-v|=|f|$$ which is be $<\dfrac12$

$$\iff0\le f<\dfrac12$$

But $\dfrac12\le f<1,$ $$|x-v|\ge\dfrac12$$