Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: approximation by rationals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23493] Re: [mg23487] approximation by rationals
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Sun, 14 May 2000 16:59:57 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

If you read your own statement of the theorem the answer should become
obvious. The theorem quite correctly states that if (a/b) satisfies the
inequality then (a/b) is a convergent of z, but it does not state that every
convergent of z satisfies the inequality. This is the difference between a
necessary condition and a sufficient condition. That's all. It is in fact
untrue that the necessary condition (to be a convergent) holds for Pi but
not for E. It does not hold for either. Here is a proof that it also does
not hold for Pi using Mathematica::

Load in the continued fractions package:
In[1]:=
<< NumberTheory`ContinuedFractions`

define the test:
In[2]:=
test[f_, Rational[c_, d_]] := Abs[f - c/d] < 1/(2d^2) && d >= 1

Let's take the first 30 convergents of Pi:
In[3]:=
conv = Convergents[Pi, 30];

Let's check how many satisfy the test:

In[4]:=
Length[conv1 = Select[conv, test[Pi, #] &]]
Out[4]=
21

We can see the ones that do not:

In[5]:=
Complement[conv, conv1] // InputForm
Out[5]//InputForm=
{3, 333/106, 103993/33102, 208341/66317, 833719/265381,
 4272943/1360120, 5706674932067741/1816491048114374,
 5371151992734/1709690779483, 14885392687/4738167652}
 



on 5/13/00 11:54 AM, Matt Herman at Henayni at hotmail.com wrote:

> 
> hi,
> 
> there is a number theory theorem which states that if |z-(a/b)|< 1/(2
> b^2), then a/b is a convergent of z. If this is true, then why when I go
> into mathematica and set z=E and a/b = 106/39, which is a convergent
> of E, the inequality is false? Is this a problem in mathematica's
> numerical evaluation, or a problem in the theorem? Is the theorem only
> valid when z is a quadratic irrational? Because the theorem works for
> z=Pi. Also the stronger form of the theorem is |zb-a|<1/2b^2. This is
> false when z=E. Again the same question as above.
> 
> 
> Matt




  • Prev by Date: Re: Piecewise functions
  • Next by Date: Re: RegionPlot ?
  • Previous by thread: Re: approximation by rationals
  • Next by thread: Re: approximation by rationals