Continued Fractions: Invisible Patterns Ramana Andra Thomas Jackson FTLOMACS OCT 14, 2017
AGENDA • Representations on Numbers • Continued Fraction Notation • Finite Ratio Example • Convergents • Radicals • Algebraic Numbers • π • Java Programs • Invisible Connections 2
TRADITIONAL REPRESENTATIONS OF NUMBERS Infinite Series, Periodic and Nonperiodic Decimal Expansions, Integrals 1 1 1 1 1 1 1 1 1 1 1 1 𝜌 = 1 + 3 + 4 − 5 + 6 + 7 + 8 + 9 + − 10 + 11 + 12 − 13 … 2 + ∞ 1 − 𝑦 2 𝑒𝑦 = 𝜌 2 −∞ ∞ 9 − ⋯ = (−1) 𝑙 𝜌 4 = 1 − 1 3 + 1 5 − 1 7 + 1 2𝑙 + 1 𝑙=0 3.1415926535897932384626433832795……. 3
TRADITIONAL REPRESENTATIONS OF NUMBERS 𝜒 = 1 + 5 = 1.6180339887 … 2 𝜒 = 1 + 1 + 1 + ⋯ 1 1 1 1 1 ∞ e = 1 + 1•2 + 1•2•3 + 1•2•3•4 + ⋯ = 1 + 𝑜=0 𝑜! 1 𝑜 ) 𝑜 = 2.718281828459… e = lim 𝑜→∞ (1 + 2 = 1.41421356237… 4
EXAMPLES OF CF’S 1 2 4 𝜌 = 1 + 32 2 + 52 2 + 72 2 + 92 2 + 2 + 112 2 + … 5
EXAMPLES OF CF’S 1 e = 2 + 1 1 + 1 2 + 1 1 + 1 1 + 1 4 + 1 1 + 1 1 + 6 + … 1 Φ = 1 + 1 1 + 1 1 + 1 1 + 1 1 + 1 1 + 1 + … 6
EXAMPLES OF CF’S 𝜌 1 2 = 1 - 2•3 3 − 1•2 1− 4•5 3 − 3•4 1 − 6•7 3 − 1− 5•6 3 − … 1 2 = 1 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 2 + ⋯ 7
CONTINUED FRACTIONS TYPES Continued Fractions Simple General Finite Infinite Non- Periodic Periodic 8
CONTINUED FRACTIONS FORMS General Continued Fraction 𝑐 1 a 1 + 𝑐 2 𝑏 2 + 𝑐 3 𝑏 3 + 𝑐 4 𝑏 4 + 𝑏 5 + 𝑐 5 𝑏 6 … Simple Continued Fraction (b i = 1) 1 a 1 + = [a 1 ; a 2 , a 3 , a 4 , …] = [a 1 : a 2 , a 3 , a 4 , …] 1 𝑏 2 + 1 𝑏 3 + 1 𝑏 4 + + 1 𝑏 5 𝑏 6 … Convergents 𝑞 𝑗 𝑟 𝑗 = [a 1 ; a 2 a 3 , a 4 , a 5 ,…a n ] 9
FAMOUS CONTINUED FRACTIONS π = [3; 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, ...] e = [2; 1, 2, 1, 1, 4, 1, 1, 6, …] φ = [ 1; 1, 1, 1, 1, 1, 1, … ] 10
FINITE RATIO EXAMPLE 47 Consider the fraction 13 . Can we find the continued fraction (cf.) for this finite ratio? We should consider breaking up the fraction into mixed form. 47 8 So 13 = 3 + 13 We need the numerator to be one for our cf. form so we can apply the 𝑏 1 𝑐 = following algebraic identity to move forward. 𝑐 𝑏 11
FINITE RATIO EXAMPLE 47 1 1 1 1 = 3 + 13 = 3 + = 3 + = = 3 + 13 1+ 1 1 1 + 5 1+ 8 1 + 3 8 8 5 5 47 1 1 1 13 = 3 + = 3 + = 3 + 1 1 1 1+ 1+ 1+ 1 + 1 1 + 1 1 + 1 5 1+2 1+2 3 3 3 47 1 1 13 = 3 + = 3 + 1 1 1+ 1+ 1 + 1 1 1 + 1+1 1+ 1 3 1+1 2 2 12
FINITE RATIO EXAMPLE This procedure is an example of an algorithm called the Euclidean Algorithm which was developed by Euclid in his famous book The Elements. We can also look at the problem from geometrical and coding perspectives. 13
GEOMETRIC CONSTRUCTION 14
Geometric Construction 15
EUCLIDEAN ALGORITHM Let’s consider the calculations already performed for the fraction 47 13 . 47 = 3 (13) + 8 13 = 1 (8) + 5 8 = 1 (5) + 3 5 = 1 (3) + 2 3 = 1 (2) + 1 2 = 2 (1) + 0 16
EUCLIDEAN ALGORITHM We continue this operation on the two numbers and it will always stop when the length of the shortest rectangle is one and the remainder after the last triangle has been divided is zero. We can find the cf. form from the leading numbers from the list: 47 1 13 = 3 + 1 𝟐+ 1 𝟐 + 𝟐+ 1 𝟐+1 𝟑 17
PHI DERIVATION We all know that φ is derived from the roots of the quadratic equation φ 2 - φ - 1 = 0 1 φ = 1 + φ 1 φ = 1 + 1 + 1 φ 1 φ = 1 + 1 1+ 1 + 1 φ 1 φ = 1 + 1 1+ 1 1 + 1+⋯ φ = [1; 1, 1, 1, 1, 1, 1, 1, …] 18
CONVERGENTS 47 We can look at the partial cfs for the fraction 13 to find better approximations to the exact value of this fraction. These values are called convergents. 1 1 1 1 1 , 3 + 3, 3 + , 3 + , 3 + 1+ 1 1 1 1+ 1+ 1 + 1 1 + 1 1 1+1 1 1 7 11 18 47 3, 4, 2 , 3 , 5 , 13 = 3, 4, 3.5, 3.666.., 3.6, 3.65… 19
CONVERGENTS 𝑞 𝑗 We can generalize this procedure. Let c i = 𝑟 𝑗 represent the convergents for a given fraction with i ≥ 0. So c 1 = 𝑞 1 𝑟 1 = a 1 = 𝑏 1 1 c 2 = 𝑞 2 𝑟 2 = a 1 + 1 𝑏 2 = 𝑏 1 𝑏 2 +1 𝑏 2 𝑞 3 1 𝑏 1 𝑏 2 𝑏 3 +𝑏 1 +𝑏 3 c 3 = 𝑟 3 = a 1 + = 𝑏 2 + 1 𝑏 2 𝑏 3 +1 𝑏 3 20
CONVERGENTS 𝑞 4 1 𝑏 1 𝑏 2 𝑏 3 𝑏 4 +𝑏 1 𝑏 2 +𝑏 1 𝑏 4 +𝑏 3 𝑏 4 +1 c 4 = 𝑟 4 = a 1 + = 1 𝑏 2 𝑏 3 𝑏 4 +𝑏 2 +𝑏 4 𝑏 2 + 𝑏 3 + 1 𝑏 4 So we can “see” the following recursions for the convergent terms if we look carefully: p i = a i p i-1 + p i-2 q i = a i q i-1 + q i-2 21
CONVERGENTS Using these recursion formulas, the convergents for the golden ratio φ are 1 2 3 5 8 13 1 , 1 , 2 , 3 , 5 , 18 , ….. We can see that the numbers in the numerators and denominators are terms from the Fibonacci sequence! We should notice that p i = a i p i-1 + p i-2 = (1)p i-1 + p i-2 = p i-1 + p i-2 q i = a i q i-1 + q i-2 = (1)q i-1 + q i-2 = q i-1 + q i-2 and c i = t i+1 𝑢 𝑗 where t i are the terms of the Fibonacci sequence. 22
SQUARE ROOT 2 1 2 = 1 + = [1; 2, 2, 2, 2, 2, 2, … ] 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 2 + ⋯ 23
SQUARE ROOT 2 Let’s see how we can derive this cf representation. 1 1 2 = 1 + ( 2 - 1) = 1 + = 1 + 2+1 1 2−1 1 1 But 2 + 1 = 2 + ( 2 − 1) = 2 + = 2 + 2+1 1 2−1 1 Thus 2 = 1 + 1 2+ 2+1 If we use this rationalization method again repeatedly, we find the cf. of 2 consists of a single 1 followed entirely by 2’s. Thus 2 = [1; 2, 2, 2, 2, 2, … ] 24
SQUARE ROOT 17 Is there a pattern in the representation? Can we generalize numbers of the form 𝑜 2 + 1 ? Let’s give it a go! 25
PERIODIC CF’S Let’s consider a simple case and suppose A = [a; b, b, b, b, b,…] 1 We can rewrite A in the form A = a + [𝑐; 𝑐, 𝑐, 𝑐, 𝑐, 𝑐,… ] We need to determine the value of B = [b; b, b, b, b, b, …] 1 Just like for A, we can rewrite B = b + [𝑐; 𝑐, 𝑐, 𝑐, 𝑐, 𝑐,… ] 26
PERIODIC CF’S 1 So we have B = b + B which can be rewritten as B 2 – bB -1 = 0 𝑐+ 𝑐 2 +4 Using the Quadratic Formula, we have B = 2 𝑐− 𝑐 2 +4 𝑐 2 +4 2 2𝑏−𝑐 + Thus A = a + 𝑐+ 𝑐 2 +4 = a - = 2 2 2 𝑐 2 +4 2𝑏−𝑐 + So we have = [a; b, b, b, b, …] 2 2 If b = 2a, then 𝑏 2 + 1 = [𝑏; 2𝑏, 2𝑏, 2𝑏, 2𝑏, … ] 27
SQUARE ROOT 3 Let’s try to derive the continued fraction for 3 on the board together! 28
SQUARE ROOT 3 1 3 = 1 + 1 1 + 1 2 + 1 1 + 1 2 + 1 1 + 2 + ⋯ = [1; 1, 2, 1, 2, 1, 2, … ] . 29
PERIODIC CF’S 30
CUBE ROOTS What about cube roots? These continued fractions are not periodic. We will find their cf. representation from their decimal first. From the decimal part, we will repeatedly invert the fractional part. 31
CUBE ROOTS 32
INFINITE CONTINUED FRACTIONS 33
Π 1/4 34
Π 35
CUBE ROOTS We can find the cube roots using the bisection method. Easy for high school students to understand. Can be easily coded in a programming language. We have some simple Java programs to demonstrate . 36
JAVA PROGRAMS Rational Numbers Square Root Cube Root π 37
FORMULA FOR Π How do we evaluate Pi using a formula? We use an identity that came up recently in our Math club meeting. 1 1 5 − 4 arctan π = 16 arctan 239 38
RAMANUJAN Ramanujan proved two connections between π, e and φ : 39
A CONTINUED FRACTION APPROXIMATION OF THE GAMMA FUNCTION 40
REFERENCES You Tube video: Continued Fractions - Professor John Barrow https://www.youtube.com/watch?v=zCFF1l7NzVQ&t=670s The Topsy-Turvy World of Continued Fractions: https://www.math.brown.edu/~jhs/frintonlinechapters.pdf Cube Root of a Number: http://www.geeksforgeeks.org/find-cubic-root-of-a-number/ Gamma Function: http://www.sciencedirect.com/science/article/pii/S0022247X12009274 A Continued Fraction Approximation of the Gamma Function: http://www.sciencedirect.com/science/article/pii/S0022247X12009274 https://ac.els-cdn.com/S0022247X12009274/1-s2.0-S0022247X12009274-main.pdf?_tid=4981f0e4-b07a-11e7-bb6a- 00000aab0f26&acdnat=1507942672_ff44d4811825271fcf37c06314338fe1 Java Code: https://dansesacrale.wordpress.com/2010/07/04/continued-fractions-sqrt-steps/ Continued Fractions: http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/cfCALC.html 41
Recommend
More recommend