given an irrational number is it possible to find the closest rational number to the irrational number? If so, how?
is it possible to find the closest rational number to an irrational number?
-
0The [continued fraction](http://en.wikipedia.org/wiki/$C$ontinued_fraction) of your irrational number will allow you to get fractions as near as you want from your irrational (in some way the bests possible). – 2012-12-13
2 Answers
No. It is a fact that in any open interval $]a,b[ $ there exists a rational number.
Proof:
Assume WLOG that $a>0$. Let $n$ be a positive integer such that $\frac{1}{b-a}
Let $x$ be irrational and $r$ be the closest rational number, now get a closer rational from the interval $]r,x[$ (or $]x,r[$ if $x
-
0I edited my answer to include a proof of the first fact I used – 2012-12-13
There is no closest one, as already pointed out. However, you can sometimes estimate how far a rational number is from an irrational one. Take $\sqrt{2}$ for example and a rational number $\frac{p}{q}$. Then
$ \frac{p^2}{q^2} - 2 = \frac{p^2 - 2q^2}{q^2}. $
Since the numerator is a non-zero integer this shows
$ \left|\frac{p}{q} - \sqrt{2}\right| \cdot \left| \frac{p}{q} + \sqrt{2} \right| = \left|\frac{p^2}{q^2} - 2 \right| \geq \frac{1}{q^2} $
and so if $\left| \frac{p}{q} - \sqrt{2} \right| \leq \varepsilon$ then
$ \left|\frac{p}{q} - \sqrt{2}\right| \geq \frac{1}{q^2 ( 2\sqrt{2} + \varepsilon)}. $
See here for a more general discussion.