> # ictm_ply.mws

Speaker: John B. Cosgrave.

Address: Mathematics Department,
St. Patrick's College,
Drumcondra,
Dublin 9,
IRELAND.

e-mail: [email protected] (College)
[email protected] (Home)

Web: http://www.spd.dcu.ie/johnbcos

Note . The Maple file of this talk (and many other Maple worksheets)
may be accessed at my Web site.

Title of talk :

Using Maple programming to investigate

L- and R-approximations to quadratic irrationalities

Comment on lecture title . Later you may agree that I could just as easily given

my talk the title Using L- and R-approximations to quadratic irrationalities to

introduce Maple programming .

A brief synopsis of my talk .

  • Rational numbers, and classic examples of irrational numbers
  • Rational approximations to sqrt(2), sqrt(3), sqrt(5), sqrt(6) , ...
  • Formulating the notions of L- and R-approximations to sqrt(2), sqrt(3), sqrt(5), sqrt(6) , ...
  • Easily observed relationships between hand computed successive approximations,
  • leading to precise formulations and search for proofs
  • Surprises in store ...
  • When hand computation appears to let one down, what can one do to
    attempt to find some L- and/or R-approximations [this is where Maple
    really makes itself felt ... ]
  • Doable projects ... [also some deep, very advanced topics ( en passant )]

A statement of my basic philosophy . Ideally one would like ones students to be

more than passive absorbers of mathematical ideas. One would like ones students

to experience the thrill of making a mathematical discovery. The difficulty is to

identify topics that are neither trivial nor too advanced.

Some motivating questions .

Question(s) 1 .

  • What is the value of sqrt(2) ? [Students should see sqrt(2) , should think of it as being
    - e.g. - the length of the diagonal of the unit square.]
  • Is it (perhaps) 1.414213562 (the value given by a 10-digit calculator)?
  • Is it (perhaps) the 1000-place decimal given below?:

> evalf(sqrt(2), 10);

1.414213562

> evalf(sqrt(2), 1000);

1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...
1.4142135623730950488016887242096980785696718753769...

>

My experience is that I always receive from several students an argument

(perhaps not formulated exactly precisely, but at least in the right direction)

that sqrt(2) does not have a terminating decimal value [I assume that the reason

for that immediately occurs to all of my readers. Requiring ones students to write

out of a formal proof of that simple (but non-trivial) result, is an interesting exercise.]

Observation . Every terminating decimal is [trivially] a rational number of a certain kind ,

that is, every terminating decimal is a rational number whose denominator is a power of 10 .

Question(s) (going back to classical times) . Could it be that sqrt(2) has a rational value?

That is, could there be integers m and n such that sqrt(2) = m/n ?

Let's have a look at the following rational number:

> r := 152139002499/107578520350;

r := 152139002499/107578520350

>

whose square is:

> r^2;

23146276081390728245001/11573138040695364122500

>

Its decimal value to 10 palces is:

> evalf(r^2);

2.000000000

>

perhaps it is 2?

> evalf(r^2, 20);

2.0000000000000000000

> evalf(r^2, 30);

2.00000000000000000000008640699

>

O.k., that ' r^2 ' isn't 2, but it is pretty close to it, and so ' r ' itself is pretty close to sqrt(2) .

There is agreement to at least 20 places:

> evalf(r, 20);

1.4142135623730950488

> evalf(sqrt(2), 20);

1.4142135623730950488

>

Look at what we get if we lower the numerator of r^2 by 1:

> 23146276081390728245000/11573138040695364122500;

2

>

Definition 1 . Let p and q be natural numbers, then p/q is said to be

  • an L-approximation to sqrt(2) if (p/q)^2 = 2-1/(q^2) ,

    equivalently if
    p^2 = 2*q^2-1 ,

    equivalently if
    p^2-2*q^2 = -1 .
  • an R-approximation to sqrt(2) if (p/q)^2 = 2+1/(q^2) ,

    equivalently if
    p^2 = 2*q^2+1 ,

    equivalently if
    p^2-2*q^2 = 1 .

>

Hand computations to find some L- and R-approximations to sqrt(2) :

eventually leads to finding that the numbers 1/1, 3/2, 7/5 and 17/12 are alternately

L- and R-approximations to sqrt(2) .

The start of real progress . Some bright students will invariably call out that they

see some connections [I always try to play the innocent and say something like:

oh yes, like what ? ...].

And what are those connections?

Well they simply jump out at you!!

  • The sum of numerator and denominator for a given term of the sequence
    (appear to) produce the denominator of the
    next rational in the sequence
  • The sum of denominators of two consecutive terms of the sequence
    (appear to) produce the numerator of the
    second of those terms

Question(s) 2 .

  • Does that continue to happen (perhaps it is just a fluke on those early ones?)
  • Are there any missing L- and R-approximations to sqrt(2) ? ['missing' in the sense
    that ... ]

Students can form some more by hand ... , but let's move quickly along to

some simple programs. Let's denote the alternating L- and R-approximations

to sqrt(2) by p[1]/q[1], p[2]/q[2], p[3]/q[3] , ... , p[n]/q[n] , ...

A formulation of the apparent connection between the p 's and q 's:

  • It appears as though q[k] = p[k-1]+q[k-1] (for k = 2, 3, 4 , ... )
  • It appears as though p[k] = q[k-1]+q[k] (for k = 2, 3, 4 , ... )

Students are easily introduced to the following simple Maple program

(but one has to devote TIME to explaining all the elements involved):

> p[1] := 1:
q[1] := 1:
for k from 2 to 50 do
q[k] := p[k-1] + q[k-1]:
p[k] := q[k-1] + q[k]
od:
seq(p[k]/q[k], k=1..50);

1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408,...
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408,...
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408,...
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408,...
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408,...
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408,...
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408,...

> p[30]/q[30]; # The 'r' from earlier is:

152139002499/107578520350

>

Question . But are those rationals alternating L- and R-approximations to sqrt(2) ?

Students should do some by hand and calculator before being exposed to:

> seq(p[k]^2 - 2*q[k]^2, k=1..50);

-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, -1, 1, -1...

>

Computation on its own is not enough .

Happily a proof of the following elementary theorem is within

the reach of a good second level student (indeed finding a proof

is a really good test, and not an unreasonable one):

Theorem 1 . Let p/q be an L-approximation to sqrt(2) ,

then (p+2*q)/(p+q) is an R-approximation to sqrt(2) ,

and

if p/q is an R-approximation to sqrt(2) ,

then (p+2*q)/(p+q) is an L-approximation to sqrt(2) .

Proof . First, suppose that p/q is an L-approximation to sqrt(2) ;

then p^2-2*q^2 = -1 .

Thus (p+2*q)^2-2*(p+q)^2

= p^2+4*p*q+4*q^2-2*(p^2+2*p*q+q^2)

= -p^2+2*q^2 = -1*(p^2-2*q^2)

= -(-1) = 1 ,

and it follows that (p+2*q)/(p+q) is an R-approximation to sqrt(2) .

A similar argument [exercise for students] establishes the other half of theorem 1. [ end of proof ]

Comments .

Question (s) .

  • What happens when one similarly investigates sqrt(3) ?
  • Does sqrt(3) have L- and R-approximations?
  • Are those L- and R-approximations related to each other in
    some
    similar fashion?

First, let's get our definitions [one should first have discussed a proof of the

irrationality of sqrt(3) - or at the very least alluded to the probability that

straightened out:

Definition 2 . Let p and q be natural numbers, then p/q is said to be

  • an L-approximation to sqrt(3) if (p/q)^2 = 3-1/(q^2) ,

    equivalently if
    p^2 = 3*q^2-1 ,

    equivalently if
    p^2-3*q^2 = -1 .
  • an R-approximation to sqrt(3) if (p/q)^2 = 3+1/(q^2) ,

    equivalently if
    p^2 = 3*q^2+1 ,

    equivalently if
    p^2-3*q^2 = 1 .

With ones students one could do some hand computations [in fact that

is what I do with mine], along the lines of:

1. When q = 1 then 3*q^2-1 = 2 is not a square, but 3*q^2+1 = 4 = 2^2 ,

and so 2/1 is an R-approximation to sqrt(3) .

2. When q = 2 then 3*q^2-1 = 11 is not a square,

nor is 3*q^2+1 = 13 a square.

Thus sqrt(3) has no L- or R-approximation with denominator 2.

etc.

Here, students are in for a surprise .

First I will redo to sqrt(2) search for L- and R-approximations,

but using a simple Maple program (below).

First, some preliminaries:

> ### WARNING: persistent store makes one-argument readlib obsolete
readlib(issqr);

proc (n) option `Copyright (c) 1990 by the Universi...

>

Testing to see if 2*q^2-1 is a square when q = 4 :

> issqr(2*4^2 - 1);

false

>

And so it isn't.

Testing to see if 2*q^2-1 is a square when q = 5 :

> issqr(2*5^2 - 1);

true

>

And what is it the square of?:

> sqrt(2*5^2 - 1);

7

>

Now we are ready to systematically look for L- and R-approximations

to sqrt(2) . We limit ourselves to testing denominators up to 100:

> for q to 100 do
if issqr(2*q^2 - 1)
then print(L, sqrt(2*q^2 - 1)/q)
elif issqr(2*q^2 + 1)
then print(R, sqrt(2*q^2 + 1)/q)
fi
od;

L, 1

R, 3/2

L, 7/5

R, 17/12

L, 41/29

R, 99/70

>

Now let's do the same for sqrt(3) :

> for q to 100 do
if issqr(3*q^2 - 1)
then print(L, sqrt(3*q^2-1)/q)
elif issqr(3*q^2 + 1)
then print(R, sqrt(3*q^2+1)/q)
fi
od;

R, 2

R, 7/4

R, 26/15

R, 97/56

>

So, a surprise!! sqrt(3) would appear to have no L-approximations.

A question . Is that true ? [Now that is a really good problem for students.]

An observation and another question . sqrt(3) certainly has some R-approximations, but

  • how many does it have?
  • can one find (and prove) any connection between them?

>

>

>

>

Contact details 

After August 31st 2007 please use the following Gmail address: jbcosgrave at gmail.com


This page was last updated 18 February 2005 15:09:13 -0000