Rational Approximation to Square Roots of Integers

advertisement
Published by the Applied Probability Trust
© Applied Probability Trust 2007
51
Rational Approximation to
Square Roots of Integers
M. A. KHAN
1. Introduction
A calculator that displays ten digits gives 1.414 213 562 for the square root of 2 which, when
written as a fraction in lowest terms, is
707 106 781
.
500 000 000
In this article we describe a method for finding rational approximations that are nearly as good
but have smaller numbers in the numerator and denominator. The calculations are simple and
do not require the use of calculus or infinite series. For example, the fraction
19 601
= 1.414 213 564
13 860
√
agrees with 2 to eight decimal places.
Our algorithm essentially consists of first finding an initial solution (x0 , y0 ) in positive
integers by trial which satisfies the Diophantine equation
y 2 = nx 2 + 1.
(1)
Here, n is the positive integer whose square root is sought. Once the initial trial solution
(x0 , y0 ) is found, it can be used to produce a chain of other possible solutions
(x1 , y1 ), (x2 , y2 ), . . . , (xr , yr ), . . . ,
with increasing numerical values. Then, for any solution (xr , yr ) , we can write (1) in the
following form:
y2 − 1
n= r 2 .
(2)
xr
Now, if yr2 is much greater than 1 then yr2 − 1 can be approximated by yr2 and, with the aid of
(2), we can now write
√
yr
n= .
xr
√
Thus, yr /xr is a rational approximation of n .
2. An algorithm for evaluating successively increasing values of (x r , y r )
Let (x0 , y0 ) satisfy (1), so that
y02 − nx02 = 1
or (y0 +
√
n x0 )(y0 −
√
n x0 ) = 1.
Download