0

Is there a method that, for a given $x\in \mathbb R$ finds the closest number in the ring $\mathbb Z[\sqrt2]$? It is trivial for $\mathbb Z$ and also for comlex rings of integers like $\mathbb Z[i]$ (if we $\mathbb R$ by $\mathbb C$).
The problem is I don't even see a reason why there should be a closest number of the required form. I actually think that you can get as close as you want to $x$ by the numbers $a+b\sqrt2$. But I am unable to prove that. Do you have any ideas?

FusRoDah
  • 513
  • 1
    $\mathbb{Z}[\sqrt{2}]$ is dense in $\mathbb{R}$, so there is no ``closest'' element to, say, $\pi$. – Luiz Cordeiro May 18 '18 at 20:28
  • Right, but the question is how to prove $\mathbb Z[\sqrt 2]$ is dense in $\mathbb R$. It is the OP's intuition but s/he doesn't know how to prove them. – fleablood May 18 '18 at 20:30
  • 1
    I was just looking at my old answers. This is actually a fun exercise. See https://math.stackexchange.com/questions/889296/xy-sqrt2-infimum-x-y-in-mathbbz/889316#889316 and the links therein – Luiz Cordeiro May 18 '18 at 20:31

2 Answers2

1

Yes, you can get as close as you want. This follows immediately from the Equidistribution Theorem, but you don't need full force of that theorem -- it can be derived from some more elementary results.

xyzzyz
  • 7,612
0

Fix $x\in \mathbb{R}$. Then unless $x=a+b\sqrt 2$ for some $a,b\in \mathbb Z$, there is no number of the form $a+b\sqrt 2$ which is closer to $x$ than any other number of the same form. This is due to the fact that $\sqrt 2$ is irrational. The proof goes like this:

Assume $x$ is not of the form $a+b\sqrt 2$. $x$ has an integer part and a fractional part, respectively denoted $[x]$ and $\{x\}$, so $x=[x]+\{x\}$. Since $\sqrt 2$ is irrational, the sequence $(\{n\sqrt 2\})_{n\in \mathbb N}$ of fractional parts of the numbers $n\sqrt 2$ is dense in the unit interval. Using this, fix $\epsilon>0$ and pick $N>0$ so that $|\{N\sqrt 2\}-\{x\}|<\epsilon$. Then let $M=[x]-[N\sqrt 2]$. It follows that $|(M+N\sqrt 2)-x|=|\{N\sqrt 2\}-\{x\}|<\epsilon$. This completes the proof.

D. Brogan
  • 3,427
  • 10
  • 20
  • The hard part is to prove that the sequence of fractional parts is dense in the unit interval. This is pretty standard result that most people have seen in their mathematical career, but I think you should rather assume that the original poster didn't, as otherwise he wouldn't have asked the question. – xyzzyz May 18 '18 at 20:37
  • 1
    Sure. I omitted it to make the answer less cumbersome. I can include it if one wishes, but the asker should know that it is really just the pigeonhole principle. – D. Brogan May 18 '18 at 20:43