* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Oulun Lyseon lukio / Galois club 2010
List of important publications in mathematics wikipedia , lookup
Vincent's theorem wikipedia , lookup
Infinitesimal wikipedia , lookup
Large numbers wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Location arithmetic wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Hyperreal number wikipedia , lookup
Proofs of Fermat's little theorem wikipedia , lookup
Mathematics of radio engineering wikipedia , lookup
Approximations of π wikipedia , lookup
Continued fraction wikipedia , lookup
Real number wikipedia , lookup
Positional notation wikipedia , lookup
Oulun Lyseon lukio / Galois club 2010-2011 / Notes on continued fractions / TL ***************************************************************** 1. Real numbers Given a straight line and two fixed points O and A on this line, we define real numbers as distances along the line from the point O (origin or zero) using the distance OA as the measurement unit 1. Distances to the points on the right or left side of O are called respectively positive or negative real numbers. It follows that there is a one-to-one correspondence between the points of the line and real numbers. Each point P on the number line corresponds to one and only one real number x which is the distance from O to P. O A P 0 1 x FIGURE 1.1. The number line. The point P corresponds to the real number x. It is easy to see that there are at least two kinds of real numbers (i) integers n (the distance OP is an exact multiple of the unit distance OA) (ii) rational numbers r (the distance OP is an exact multiple of a fraction 1 𝑛 of the unit distance OA) In fact, the second class contains the first as a subset (case n = 1). According to a legend, it came as an unpleasant surprise to Pythagoras1 that there are distances (for example the distance between the opposite vertices of the unit square) which are not exact multiples of any fraction of the unit distance. Such distances and the corresponding real numbers are called irrational. B 1 A 1 FIGURE 1.2. Unit square. The diagonal distance AB is irrational (√2 in the modern notation). 1 Pythagoras (ca. 600 BC) had developed, possibly inspired by his studies of musical harmony, a philosophical doctrine that all relations in the universe can be expressed as ratios of integers (i.e. as rational numbers). The discovery of irrational relations shattered the foundations of this philosophy. 1 Oulun Lyseon lukio / Galois club 2010-2011 / Notes on continued fractions / TL ***************************************************************** 2. Representing real numbers by sums of powers As is well-known, every real number x in the interval2 0 ≤ 𝑥 < 1 can be represented as an infinite sum of powers of the base number 10, 𝑥 = 𝑑1 ∙ 10−1 + 𝑑2 ∙ 10−2 + 𝑑3 ∙ 10−3 + ⋯ , where the digits 𝑑𝑖 ∈ {0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9}. This is usually written as the decimal expansion 𝑥 = 0. 𝑑1 𝑑2 𝑑3 ⋯ Instead of 10 we could take the constant base number to be any positive integer k > 1 and have 𝑥 = 𝑑1 ∙ 𝑘 −1 + 𝑑2 ∙ 𝑘 −2 + 𝑑3 ∙ 𝑘 −3 + ⋯ , where the digits 𝑑𝑖 ∈ {0 , 1 , 2 , ⋯ , 𝑘 − 1} . When k = 2 we speak of binary expansion with two digits 0 and 1, and when k = 16 we speak of hexadecimal expansion with sixteen digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F (where A, B, C, D, E and F have numerical values 10, 11, 12, 13, 14 and 15). It is easy to see that x is rational if and only if its decimal (or any k-ary) expansion is periodic. The expansions of irrational numbers are non-periodic. 3. Representing real numbers by continued fractions Continued fractions can be generated from the basic fractional form 𝑎+ 1 𝑏 by substituting this form again and again for b to yield fractional forms 𝑎+ 1 1 𝑎+𝑏 , 𝑎+ 1 𝑎+ 1 1 𝑎+ 𝑏 , 𝑎+ 1 𝑎+ 1 1 𝑎+ 1 𝑎+ 𝑏 Below are examples of continued fractions obtained from these forms by substituting integers for a and b, not necessarily the same integers for different occurrences of a. 2 This restriction causes no loss of generality since every positive real number y can be expressed as a sum y = n + x, where n is an integer (integral part of y) and the fractional part x lies in the interval [0,1[. The expansion of y is essentially the expansion of x. 2 Oulun Lyseon lukio / Galois club 2010-2011 / Notes on continued fractions / TL ***************************************************************** 2+ 1 3 , 2+ 1 1 3+7 , 2+ 1 3+ 1 , 2+ 1 7+ 2 1 3+ 1 1 7+ 1 2+ 4 It is practical to introduce a special square-bracketed coordinate notation in which the above (terminating) continued fractions are written as follows [2; 2] , [2; 2, 3] , [2; 2, 3, 7] , [2; 2, 3, 7, 2] , [2; 2, 3, 7, 2, 4] Note that the decimal approximations (to three decimal places) of these fractions are [2; 2] ≈ 2.333 [2; 2, 3] ≈ 2.318 [2; 2, 3, 7] ≈ 2.319 [2; 2, 3, 7, 2, 4] ≈ 2.319 We observe that the fractions when continued to the right without changing the initial part seem to converge towards a certain limit value (in this case the limit value to the accuracy of three decimal places is 2.319). This observation can be proved generally right. Therefore it makes sense to consider nonterminating (infinite) continued fractions like x = [1; 2, 2, 2, . . . ] which can be understood as a limit value of its finite initial segments. In this case the exact value of x can be found by an algebraic insight since 𝑥 − 1 = [0; 2, 2, 2, . . . ] = 1 2+ 1 2+ 1 2+⋯ 1 1 = 2+(𝑥−1) = 𝑥+1 , from which (𝑥 − 1)(𝑥 + 1) = 1 𝑥 2 = 2 and 𝑥 = √2 (obviously x must be positive). Hence √2 has a periodic continued fractions expansion √2 = [1; 2, 2, 2, . . . ]. It may be proved that all quadratic3 irrationals have periodic expansions as continued fractions. Non3 quadratic irrationals like √2 , 𝜋 or e have non-periodic expansions. All terminating expansions represent rational numbers and vice versa. Irrational numbers which are roots of quadratic equations 𝑎𝑥 2 + 𝑏𝑥 + 𝑐 = 0, where the coefficients a, b and c are integers, are called quadratic irrationals. 3 3 Oulun Lyseon lukio / Galois club 2010-2011 / Notes on continued fractions / TL ***************************************************************** 4. Algorithm for constructing the continued fractions expansion of a given real number Let x be a real number. How can we find its expansion x = [𝑎0 , 𝑎1 , 𝑎2 , ⋯]? The sequence of coordinates 𝑎0 , 𝑎1 , 𝑎2 , ⋯ can be constructed in parallel with another auxiliary sequence of numbers 𝑏0 , 𝑏1 , 𝑏2 , ⋯ with help of the following recursive rule: 𝑎0 = ⌊𝑏0 ⌋ 𝑏0 = 𝑥 , 𝑏𝑘+1 = 𝑏 1 𝑘 −𝑎𝑘 𝑎𝑘+1 = ⌊𝑏𝑘+1 ⌋ , (continue as long as 𝑏𝑘 ≠ 𝑎𝑘 ) Here ⌊𝑦⌋ denotes the integral part of y. 5 Example 1. Find the continued fractions expansion for = 13 . Solution: We have 5 𝑎0 = ⌊𝑏0 ⌋ = 0 𝑏0 = 13 , 𝑏1 = 𝑏 1 0 −𝑎0 = 13 5 𝑏2 = 1 𝑏1 −𝑎1 = , 𝑏3 = 1 𝑏2 −𝑎2 𝑏4 = 𝑏 1 3 −𝑎3 𝑏5 = 𝑏 1 4 −𝑎4 , 𝑎1 = ⌊𝑏1 ⌋ = 2 5 3 𝑎2 = ⌊𝑏2 ⌋ = 1 = , 3 2 𝑎3 = ⌊𝑏3 ⌋ = 1 =2, 𝑎4 = ⌊𝑏4 ⌋ = 2 (stop) 1 = 0 (undefined, the process terminates) Exercise. Use the algorithm to find the continued fractions expansion for 𝑥 = √3 . (As a quadratic irrational its continued fractions expansion must be non-terminating and periodic.) 4