The approximate regular nonagon in Wikipedia

An Infinite Sequence
of Approximate Angle Trisections
France Dacar, Jožef Stefan Institute
[email protected]
January 14, 2011
We begin with the simple-minded approximate trisection described in Underwood Dudley’s
“The Trisectors” on pp. 116–118:
B
D
C
O
A
The angle to trisect is α = AOB,1 where |OA| = |OB|,
and points C and D trisect the
line segment AB. The angle τ (α) = AOC = arctan (sin α)/(2 + cos α) approximates one
third of the angle α. The approximation is not very good, as is apparent from the diagram of
err (α) = α/3 − τ (α):
err minutes
200
150
100
50
10
20
30
40
50
60
70
80
90
Α degrees
Both τ (α) and err (α) are analytic functions of α on the interval (−π . . π). The power series
expansion of err (α) at 0 begins as follows:
err (α) =
α5
7 α7
443 α9
1291 α11
α3
+
+
+
+
+ O α13 .
81
972
87 480
79 361 856
3 968 092 800
Bad as the approximation τ (α) is on the whole interval [0 . . 90◦ ] (and it is much worse on
the interval [90◦ . . 180◦ ]), it is becoming better when α is approaching 0. For example, the error
is less than 2 37 for |α| 22.5◦ . We can achieve this precision for any angle α whatsoever
by a simple trick: we first reduce α modulo 45◦ to the interval [−22.5◦ . . 22.5◦ ), representing
it (uniquely) as α = k · 45◦ + , where −22.5◦ < 22.5◦ , and then approximate α/3
with k · 15◦ + τ (). The trick works because the angle 45◦ /3 = 15◦ is constructible with
straightedge and compass. We can use this trick with any constructible angle δ instead of 15◦ ,
reducing the angle we want to trisect to the interval [−3δ/2 . . 3δ/2); for example, by choosing
δ = 3◦ we cut down the maximum error to less than 1.24 . With δ ridiculously small, say
1
For any points P = Q = R of the oriented Euclidean plane, we denote by PQR the measured angle ϕ
−→
−→
(measured in radians) from the vector QP to the vector QR, lying in the range −π < ϕ π.
1
δ = 3◦ /2m , where m is a large positive integer, we can get excellent approximations. We will
use the reduction trick with other approximate trisections, but we shall avoid ridiculously
small angles δ and will instead stick to δ = 15◦ , always reducing angles modulo 3δ = 45◦ .
Now we extend our first approximate trisection construction, adding an arc and some lines
and points based on it. We draw the arc AB with center O, extend the line segments OC
and OD to the points E resp. G on the arc, and construct the point F on the arc EG so
that |GF| = |GB| (and hence also |GF| = |AE|). The point Ω on the arc AB exactly trisects
this arc, that is, AOΩ = α/3; this point is of course not constructible by straightedge and
compass (in general); we put it there to mark the place of the unattainable ideal, and to draw
attention to the fact that Ω trisects also the arc EF, since EOΩ = 13 EOF.
B
G
D
F
E
C
O
A
Construction of the point F can be simplified by noting that the line segment CF is parallel
(in the same direction) to the line segment OD: we just draw the parallel to OD through C,
producing it to the point F on the arc AB. To help us prove CF parallel to OD, we first draw
the line segment FD. Since FDG = GDB = ODC = DCO, we have CDF = COD;
since |FD| = |CD|, the triangle CFD is similar to the triangle CDO, whence FCD =
DCO = GDB, which completes the proof. As a bonus we have obtained the identity
|OC| · |CF| = |CD|2 . An obvious (but useful) consequence is that τ (α) < 13 α for 0 < α π.
In the second approximate trisection we just repeat the first approximate trisection on the
gap EOF left after the first approximate trisection has been applied to AOB. This makes
perfect sense, because the exact trisection point Ω of the arc AB exactly trisects the arc EF.
B
D
F
T
E
C
O
A
The points C and D trisect the line segment AB, the line CF is parallel to the line OD, and
the point T is on the line segment EF, |ET| = |EF|/3; the line segment EF is actually drawn
in the figure, though it is almost indistinguishable from the arc EF. The angle τ2 (α) = AOT
2
is our second approximation of one third of the angle α = AOB. (The subscript 2 indicates
the second approximation; the first approximation is τ1 (α) = τ (α).) The error of the second
construction, err 2 (α) = α/3 − τ2 (α), is considerably smaller then the error err 1 (α) = err (α):
err2 seconds
14
12
10
8
6
4
2
10
20
30
40
50
60
70
80
90
Α degrees
Both τ2 (α) and err 2 (α) are analytic functions of α on the interval (−π . . π), and the power
series expansion of err 2 (α) at 0 begins as follows:
α9
α11
29 α13
6479 α15
90 211 α17
+
+
+
+
+ O α19 .
13
13
15
20
21
3
4·3
80 · 3
560 · 3
22 400 · 3
The absolute value err 2 (α) of the error for |α| 22.5◦ is less than 0.000 03 ; we can mantain this precision for any angle by reducing it modulo 45◦ to the remainder in the interval
[−22.5◦ . . 22.5◦ ), and approximately trisecting the remainder; the error on a circle with the
radius that of Earth is then less than 1 mm.
err 2 (α) =
Applying, once again, the first approximate trisection to the gap left after the second
approximate trisection, we obtain the third approximate trisection. In the following figure we
renamed the points appearing in the construction to highlight the phases of the construction:
in the k-th phase we trisect the line segment Ak Bk at the points Ck and Dk .
B B1
B3
C3
A3
D1
C1
O
B2 D
2
C2
A2
C2
A A1
We are forced to observe the third phase of the construction under a microscope if we want
to tell apart the constructed points. The right panel of the figure shows the construction of
the points A3 , B3 , and C3 , magnified 900-fold: the downward-slanted lines on lower left and
upper right are tiny fragments of the segment A2 B2 resp. the arc A2 B2 ; the segment C2 A3 is
a continuation of the segment OC2 , the segment C2 B3 is parallel to the segment OD2 , and the
point C3 is at one third of the line segment A3 B3 . The approximations of one third of the given
angle α = AOB after successive construction’s phases are τ1 (α) = AOC1 , τ2 (α) = AOC2 ,
and τ3 (α) = AOC3 .
The power series expansion of err 3 (α) = α/3 − τ3 (α) at 0 begins
err 3 (α) =
α27
α29
37 α31
150 089 α33
543 671 α35
+
+
+
+
+ O α37 .
40
39
41
46
47
3
4·3
40 · 3
2240 · 3
11 200 · 3
3
The maximum error |err3 (α)| for |α| 22.5◦ is less than 2.1 · 10−25 ; on a circle with the
radius that of the Milky Way galaxy (50 000 light years), this maximum error amounts to less
than 5Å, which is less than five diameters of a hydrogen atom.
If we repeat the first approximate trisection on the gap left after the third approximate
trisection, then the power series expansion of the resulting error err 4 (α) begins
α81
α83
209 α85
141 871 α87
1 049 759 α89
+
+
+
+
+ O α91 ,
121
119
121
126
127
3
4·3
80 · 3
280 · 3
1120 · 3
and the maximum error |err 4 (α)| for |α| 22.5◦ is less than 7.131 · 10−86 . While we
still managed to somehow visualise maximum errors of the first three approximate trisections
(with the compulsory reduction modulo 45◦ ), the smallness of the maximum error of the
fourth approximate trisection is already beyond our comprehension. Nevertheless, try to
imagine a circle whose radius is the radius of the observable universe (currently estimated
at about 46 billion light years); then the error on the circle this large is only 1.5 · 10−64 m,
which is less than 1042 -th part of the (quantum-theoretic) electron’s diameter (2 · 10−22 m);
or, put differently, if the true radius of our universe were a million billion billion billion billion
times larger than the presumed radius of that tiny tiny tiny dot in it which we can observe
(or so we believe), then the maximum error on a circle with the radius equal to the radius of
this huge universe would be less than the diameter of an electron.
err 4 (α) =
—∗—∗—∗—
And so it goes on: we keep applying the first, basic approximate trisection to the gap left
after each trisection to obtain the next, (much much) more precise approximate trisection.
The power series expansion of the error err n (α) of the n-th approximate trisection starts with
n
n+1
n
n
the term α3 /3(3 −1)/2 , followed by bn α3 +2 + cn α3 +4 + . . . .2
We are entering the second part of this essay. In the first part we actually looked at the first
three approximate trisections, and commented on the magnitude of error of the fourth one.
From here on we shall study the behavior of the sequence of errors err n (α), n = 1, 2, 3, . . . .
We shall denote by γn (α) the gap left after the n-th approximate trisection. With the
basic approximate trisection we have the following formulas for the approximate third τ (α),
the gap γ(α) = γ1 (α), and the error err (α):
τ (α) = arctan
sin α
,
2 + cos α
γ(α) = α − 3τ (α) ,
err (α) =
γ(α)
.
3
The gap, the error, and the approximate third for the n-th approximate trisection are then
γn (α) = γ n (α) ,
err n (α) =
γn (α)
,
3
τn (α) =
α
− err n (α) ,
3
where γ n denotes the n-th iterate (composition power)
of the function γ, defined
for any
integer n 0: γ 0 (α) = α, γ 1 (α) = γ(α), γ 2 (α) = γ γ(α) , . . . , γ n+1 (α) = γ γ n (α) .3
The function τ (α) is defined for all real α; it is an analytic function of a real variable, and
it is odd and periodic with the period 2π. The power series expansion of τ (α) at 0 begins
τ (α) =
α3
α5
7 α7
α
−
−
−
+ O α9 .
3
81
972
87 480
n+1
n+1
+7)/2−n
Where bn = 1 4 · 3(3 +3)/2−n and cn = 5 · 3n + 13
160 · 3(3
.
3
We shall write the n-th powers of, say, sin θ or ln x, as (sin θ)n and (ln x)n , never as sinn θ or lnn x, since
the latter will always denote iterates: sin3 θ = sin sin sin θ, ln2 x = ln ln x.
2
4
What is the convergence radius of this power series? The easiest way to answer this question is
to observe τ (z) as a function of complex variable and to locate its singularity in the complex
plane that is nearest to the origin. The arctan(z) function has logarithmic singularities at
z = ± i. Solving (sin z)/(2 + cos z) = ± i for z gives us the locations (2k + 1)π ± i ln 2, k ∈ Z,
of (logarithmic)
of the function τ (z). The convergence radius of the power series
singularities
4
2
2
is therefore π + (ln 2) . The diagram of the real part of three branches of τ (z) clearly
shows the logarithmic character of the singularities at −π + i ln 2 and π + i ln 2:
3Π
2
Π
Π
2
0
Π
2
Π
3Π
2
3Π
2
Π
Π
2
0
Π
2
Π
4
3Π
2
3
2
1
ln 2
0
The imaginary part of τ (z) is a single value,
1
0
1
3Π
2
2
4
Π
Π
2
3
0
2
Π
2
1
ln 2
Π
3Π
0
2
which decreases to −∞ as z approaches a singularity.
Next, we examine the gap γ(z) as a function of a complex variable z. Let us start by
4
Here they meet again, as if by accident, the mathematical constants π and ln 2. They will have to be more
careful, or people will start talking.
5
determining all zeros of γ(z).5 We have γ(z) = 3kπ for some k ∈ Z if and only if
z
sin z
=
.
(1)
3
2 + cos z
Set w = z/3. Substituting sin z = 4(cos w)2 − 1 sin w and cos z = 4(cos w)3 − 3 cos w into
the equation (1), we get the equation
4(cos w)2 − 1 sin w
sin w
=
(2)
cos w
2 + 4(cos w)3 − 3 cos w
tan
When the denominator cos w on the left hand side is 0, the denominator on the right hand side
is 2, thus the two denominators are never both zero, and hence the two sides of (2) are never
both infinite. After simple manipulation the equation (2) simplifies to the equivalent equation
(1 − cos w) sin w = 0 ,
which has the solutions w = kπ, k ∈ Z, whence z = 3kπ, k ∈ Z, are all the zeros of γ(z).
function γ(z) are glued together along the branch cuts
The branches of the multi-valued
(2k + 1)π ± i(t + ln 2) t 0 , k ∈ Z; the principal branch is the one on which γ(0) = 0.
Let S be the open strip {z ∈ C | −π < z < π}. From now on we shall observe only the
restriction of the principal branch of γ to S, which we shall continue to denote γ. So now we
have γ ∈ H(S), where H(S) denotes the set of all functions holomorphic on S.
Let R(3.1, 5.1) be the rectangle in the complex plane consisting of all z with |z| 3.1
and |z| 5.1. Here we see how γ maps the first quadrant of this rectangle:
5i
5i
4i
4i
3i
3i
2i
2i
i
i
0
1
2
3Π
1
2
3Π
Since γ(z) is real for z real, it preserves complex conjugation, that is, γ z = γ(z); since γ(z) is
an odd function, it also preserves mirroring across the imaginary axis, that is, γ(−z) = −γ(z);
we conclude that γ maps the rectangle R(3.1, 5.1) into itself. Now we are going to trust what
we can see with our mind’s eyes and state the following fact: for every a, 0 < a < π, there
exists A = A(a) > 0, so that γ maps the rectangle R(a, A), consisting of all z with |z| a
and |z| A, into itself; moreover, A(a) → +∞ as a → π. (It would take us a day or so
of drudgery to prove this fact, but we will not bother to actually do it. Anyway, we know
5
The function γ(z) is multi-valued: if w is one of its values at z, then w + 3kπ, k ∈ Z, are all its values at z.
We consider z0 a zero of γ(z) if 0 is one of its values at z0 .
6
n
that
whatwe claim is true.) It follows that for any n ∈ N the iterate γ maps the rectangle
R a, A(a) into itself.
Another simple, but important, consequence is that γ maps the strip S into itself, and
therefore every iterate γ n , n ∈ N, is defined and holomorphic on S, from which it follows that
the functions err n (z) = γ n (z)/3 and τn (z) = z/3 − err n (z) (with the restricted function γ)
are defined and holomorphic on S. Since γ can be analytically continued (a little) across
the line segments (−π − i ln 2 - - −π + i ln 2) and (π − i ln 2 - - π + i ln 2), and since −π and π
are fixed points of the continued γ, we see that power series expansions at 0 of the functions
γ n (z), err n (z), and τn (z) have convergence radii greater than π.
The function γ has (in the strip S) a single zero 0; we now remove it. There is a unique
1 3
function ϕ ∈ H(S) such that γ(z) = 27
z ϕ(z) for every z ∈ S. The function ϕ has no zeros,
it is even, and ϕ(0) = 1. Since S is a simply connected domain, ϕ(z) has a unique logarithm
with the value 0 at z = 0, which
means
that there is a unique function ln ϕ ∈ H(S) such that
ln ϕ(0) = 0 and ϕ(z) = exp ln ϕ(z) for every z ∈ S.6
We retreat, for a while, from the complex plane
to the real axis. Given an angle α,
0 α π, we can visualise the sequence α, γ(α), γ γ(α) , . . . , in the usual way:
Π
Π2
0
ΓΓΑ
Π2
ΓΑ
Α
Π
The sequence in the figure starts at α = 165◦ ; we can follow it up to the second iteration, while
all further iterations are hidden in the thick line representing the diagram of γ. The sequence
α, γ(α), γ 2 (α), γ 3 (α), . . . is constant when α = 0 or α = π, and is strictly decreasing
if 0 < α < π because 0 < γ(ξ) < ξ for every ξ in the range 0 < ξ < π.
Let us express γ(α), γ 2 (α), γ 3 (α), . . . in terms of the function ϕ:
1 3
α ϕ(α) ,
3
γ 2 (α) = γ γ(α) =
γ(α) =
1
33+32
γ 3 (α) = γ γ 2 (α) =
···
···
2
α3 ϕ(α)3 ϕ γ(α) ,
1
3+32 +33
3
3 3
2 α3 ϕ(α)3 ϕ γ(α) ϕ γ 2 (α) ,
···
The general formula is
γ n (α) =
6
For every z ∈ S, ln ϕ(z) =
1
3
3 n
(3 −1)
2
z
0
n
α3
n−1
3n−k−1
ϕ γ k (α)
,
n ∈ N.
(3)
k=0
ϕ (w)/ϕ(w) dw, where the integration is along any curve in S from 0 to z.
7
Glancing at the diagrams of ϕ (left panel) and its derivative ϕ (right panel),
27Π2
1.5
2.5
1
2
0.5
1.5
1
Π2
0
0
Π
Π2
0
Π
we see that ϕ(ξ) strictly increases for 0 ξ π, and so we have the estimates
n−1
n−1
3n−k−1
n−k−1
n
ϕ γ k (α)
ϕ(α)3
= ϕ(α)(3 −1)/2 ,
k=0
k=0
n
3/2
γ (α) < 3
−1/2
ϕ(α)
·
α·
ϕ(α)
33
1/2 3n
.
This gives us the following upper bound for the error err n (α):
3n
0 α π,
err n (α) D(α) · α d(α) ,
where
n 1,
ϕ(α)
d(α) =
.
27
√
3 to π/3 while d(α) increases from
When
α
increases
from
0
to
π,
D(α)
decreases
from
√
1/ 27 to 1/π. At α = 22.5◦ = π/8 we estimate D(π/8) < 2 and (π/8) d(π/8) < 1/13 and
thus obtain the upper bound
n
err n (π/8) < 2 · 13−3 .
D(α) =
3
,
ϕ(α)
How good (or bad) are the upper bounds we have obtained? Let us define
3n
n
rn = 2 · 13−3 err n (π/8) ,
err n (π/8) ,
qn = D(π/8) · (π/8) d(π/8)
and calculate err n (π/8), qn , and rn for 1 n 8:
n
1
2
3
4
5
6
7
8
err n (π/8)
7.574 · 10−4
1.448 · 10−10
1.012 · 10−30
3.457 · 10−91
1.377 · 10−272
8.709 · 10−817
2.202 · 10−2449
3.557 · 10−7347
qn
1
1.013
1.053
1.183
1.677
4.776
1.104 · 102
1.362 · 106
rn
1.202
1.302
1.657
3.411
2.977 · 101
1.979 · 104
5.810 · 1012
1.471 · 1038
Can we do better than this? We can. We use (3) to obtain a tighter upper bound of γ n (α):
3n
α 3n n−1
α 3n 3−k−1
3n
n
3/2
k
3/2
ϕ
γ
(α)
3
·
ψ(α)
,
γ (α) = 3
33/2
33/2
k=0
where
ψ(α) =
∞
3−k−1
ϕ γ k (α)
.
k=0
8
(4)
The infinite product in (4) converges, and it does so uniformly, on the interval [0 . . π], because
3−k−1
−k−1
3−k−1 = ϕ(π)1/2 = 33/2/π. The product ψ(α) is
1 ϕ γ k (α)
ϕ(π)3
and ∞
k=0 ϕ(π)
therefore a continuous function on [0 . . π], strictly increasing from ψ(0) = 1 to ψ(π) = 33/2/π:
332 Π
1.6
Ψ
1.4
1.2
1
Π2
0
Now we have an upper bound of err n (α),
√ 3n
err n (α) εn (α) := 3 αb(α) ,
b(α) =
Π
ψ(α)
√ ,
3 3
0 α π, n 1,
which is tight indeed, because
0 < α < π;
εn (α) err n (α) = ψ γ n (α) → 1 as n → ∞ ,
moreover, εn (α) err n (α) converges to 1 very fast because
2·3n ,
ψ γ n (α) = 1 + O γ n(α) 2 = 1 + O αb(α)
where αb(α) < 1 if 0 α < π. Fix an α, 0 < α < π. The upper bound εn (α) of err n (α) is
3n with C > 0 and c > 0, meaning that if
the best upper bound of err n (α)
√ of the form C · 3(αc)
n
(αc) is not an upper bound of err n (α) for all n.
c < b(α), or c = b(α) and C < 3, then C ·
In particular, b(α) d(α), that is, ψ(α) ϕ(α),
332 Π
1.6
1.4
Ψ
1.2
1
Π2
0
Π
3−k−1
−k−1
which we could derive directly, noting that ϕ γ k (α)
ϕ(α)3
for every k ∈ N.
We have introduced the function ψ(α) only for positive α up to π, but it is in fact defined
for every α in the interval (−π . . π); it is an even function on this interval. Is ψ(α) an analytic
function? We have defined it by a uniformly convergent infinite product of analytic functions, which, however, does not make it analytic. To exhibit a counterexample, think Fourier
−2 sin(2k t) uniformly converges on R to a continuous nowhere difanalysis: the series ∞
k=1 k
−2
sin(2k t) therefore uniformly converges
ferentiable function; the infinite product ∞
k=1 exp k
to a nowhere differentiable function.
The main purpose of our foray into the realm of complex numbers was to prepare grounds
for the proof that the function ψ(α), as it is defined on the interval (−π . . π), extends to
a holomorphic function ψ(z) defined on the strip S. We define ψ(z) as
ψ(z) :=
∞
∞
3−k−1
ϕ γ k (z)
=
exp 3−k−1 ln ϕ γ k (z) ,
k=0
k=0
9
z ∈S.
(5)
We claim that the infinite product in (5) converges uniformly on compact subsets of S ; when
we prove this, it will follow that
Let K be a compact subset of S. The set K is
ψ ∈ H(S).
contained in some rectangle R a, A(a) ; since uniform convergence of the product in (5) on
the rectangle implies its uniform convergence on K, we can assume that K is the rectangle,
and therefore that γ(K) ⊆ K. Since the function |ln ϕ| is continuous on S, its restriction to K
attains
value M at some point of K. If z ∈ K, then γ k (z) ∈ K, and therefore
ka maximum
ln ϕ γ (z) M , for every k ∈ N, which shows that the infinite sum ∞ 3−k−1 ln ϕ γ k (z)
k=0
uniformly converges on K, and the same is then true for the infinite product in (5). Done.
We can determine the coefficients of the power series expansion of ψ(z) at 0,
∞
ck z 2k ,
(6)
ψ(z)3 = ϕ(z) ψ γ(z)
(7)
ψ(z) = 1 +
k=1
as many as we wish, from the functional equation
that ψ(z) satisfies. Equating the power series coefficients on the two sides of (7) gives us
recurrence relations
ck = fk (c1 , . . . , ck−1 ) ,
k 1,
1
7
and f2 (c1 ) = 3240
− c12 , while for k > 2, fk (c1 , . . . , ck−1 ) is a cubic polynomial
where f1 () = 36
in c1 , . . . , ck−1 with rational coefficients. The power series expansion of ψ(z) begins
ψ(z) = 1 +
1 4
109
1811
264 629
1 2
z +
z +
z6 +
z8 +
z 10 + · · · .
36
720
1 377 810
396 809 280
1 047 576 499 200
Not all coefficients are positive; of the first hundred coefficients ck , the coefficients with
indices k in the ranges 22 k 26, 33 k 40, and 79 k 100 are negative.
The convergence radius of the power series (6) is at least π. In fact it is exactly π: a little thought (with an ingredient of mathematical intuition) tells us that ψ(z) (or, to be precise, its analytic continuation) has rather nasty singularities at ±π ± ism , m ∈ N, where
s0 = ln 2 > s1 > s2 > · · · > 0 and sn → 0 as n → ∞, thus ψ(z) has extremely nasty singularities at −π and π. We may not have a formula for the
general coefficient ck , but one thing we
do know about the coefficients is that lim supk→∞ 2k |ck | = 1/π.
Let us use the tight upper bound εn (α) of err n (α) to obtain better upper bounds of
err n (π/8) than we obtained before. Denoting by ψm (α) the product of the first m factors
(those with 0 k m − 1) of the infinite product in (4), we find by direct calculation
that ψ1 (π/8), ψ2 (π/8), ψ3 (π/8), and ψ4 (π/8) are precise, respectively, to 7, 21, 62, and 183
significant decimal places. Using ψ2 (π/8), we compute (π/8) b(π/8) to 21 significant decimal
places; rounding the eighth significant digit upwards, we get the upper bound
√
n
n 1.
err n (π/8) 3 · 0.075 901 2323 ,
√
n
Setting pn := 3 · 0.075 901 2323 errn (π/8), we have
n
1
2
3
4
5
6
7
8
pn
1.000 000 181
1.000 000 112
1.000 000 336
1.000 001 009
1.000 003 026
1.000 009 079
1.000 027 237
1.000 081 713
10
and we see that the new upper bounds are indeed an improvement on the ones we produced
before. However, further along we get p17 = 4.994, p18 = 124.6, and p19 = 1.933·106 , and after
that things soon become very much worse. But this is in the nature of the fixed precision of
the upper bound 0.075 901 232 > (π/8) b(π/8): if we have c = α b(α) · eη , with η > 0 no matter
√ √
3n
n
n
n
how small, then 3 · c3 = 3 · α b(α) · eη 3 err n (α) · eη 3 , where η 3n will sooner or later
n
become arbitrarily large, growing very fast, and eη3 will be growing faster still.
Suddenly, we are struck with a horrible suspicion: is it possible that our function ψ(α) is
only a sleek theoretical chimera, which, however, is completely useless for actual numerical
computations? Fortunately, it is not so. To illustrate numerical utility of ψ(α), suppose that
for some strange reason we urgently need to know err 100 (π/8) to ten significant decimal places
(perhaps because, when written in scientific notation, it will give us the one-off decryption
key for some extremely important encrypted communication).
We fire up Mathematica to do it.
values of the function γ
First we try to calculate err 100 (π/8) = 13 γ 100 (π/8), computing
using its definition γ(α) = α − 3 arctan (sin α)/(2 + cos α) , and notice that after a couple
of iterations we start loosing precision at an alarming rate. The reason is that for very small α
we compute γ(α) as the difference of two quantities that are very close together, relative to
.
their size, and the smaller α is, the closer they are. To compute, say, err 8 (π/8) = 3.557·10−7347
to ten significant decimal places, we have to begin the calculation with the precision of 7359
significant decimal places. To remedy this absurd loss of precision, we massage the formula
for γ(α) into a numerically more stable form. We introduce shorthands c = cos(α/3) and
s = sin(α/3), rewrite α as 3 arctan(s/c), express sin α and cos α by c and s as sin α = (4c 2−1)s
and cos α = 4c3 − 3c, convert
the difference of arctans into a single arctan using the identity
arctan x − arctan y = arctan (x − y)/(1 + xy) , then simplify the fraction in the argument of
the resulting arctan while replacing any s2 we encounter with 1 − c 2 , to obtain, finally,
2 4 sin 13 α sin 16 α
2s(1 − c)
.
= 3 arctan
γ(α) = 3 arctan
2c 2 + 2c − 1
cos 23 α + 2 cos 13 α
This new formula for γ(α) is much better suited for numerical calculations:
decimal places
0.65
precision loss
0.60
0.55
0.50
Π4
Π2
3Π4
Π
Α
Mathematica loses less than half a decimal place of precision for any positive α up to π/4.
We start computing the errors err n (π/8) afresh, with the initial precision of 65 significant
decimal places (to be on the safe side). All goes well up to the seventeenth step, where we
.
still manage to obtain err 17 (π/8) = 2.061 584 . . . · 10−144 604 850 , but when we try to compute
err 18 (π/8), Mathematica reports underflow. Mathematica has an upper limit for the size
of the exponent even for arbitrary-precision real numbers; in particular, no arbitrary-precision
real number can be smaller than 6.423 · 10−323 228 430 . There is no way to adapt the formula
for γ(α) to circumvent this obstacle. We must try something different.
And here is where the function ψ(α) and the tight upper bounds εn (α) come to the rescue.
The upper bound ε100
(π/8) is an extremely precise approximation of err 100 (π/8). Recall that
εn (α) = err n (α) · ψ γ n (α) , where ψ(α) = 1 + O(α2 ). To remove the uncertainty about the
size of the constant multiplier hidden in the bigoh term, we made this multiplier explicit:
looking at the diagram of the quotient ψ(α) − 1 α2 for 0 < α π,
11
1
15
ΨΑ 1
Α2
1
36
Π4
Π2
3Π4
Π
Α
we see that it attains the maximum value at α = π; since ψ(π) − 1 π 2 < 1/15, we have
ε100 (π/8) instead of err 100 (π/8),
1 ψ(α) 1 + α2 /15 for 0 α π. If we
2 compute
then the relative error we make is less than γ 100 (π/8) 15, which is certainly less than
2
2 .
γ (π/8) 15 = 1.258 · 10−20 . Since we need to know err 100 (π/8) only to ten significant decimal places, we will surely get that precision (and much larger precision, too, if we wished so)
by calculating ε100 (π/8) instead. We shall not ask Mathematica to evaluate the formula
√ 3100
3 (π/8)b(π/8)
for ε100 (π/8), because this would cause underflow. We avoid the undeflow problem by evaluating the base 10 logarithm of ε100 (π/8):
log10 ε100 (π/8) = 12 log10 3 + 3100 · log10 (π/8) + log10 ψ(π/8) − 32 log10 3 .
To estimate the necessary working precision, we first calculate log10 ε100 (π/8) as a double
precision floating-point value (using ψ2 in place of ψ), and get −5.77 · 1047 . We therefore need
48 decimal places for the integer part of the logarithm, and 10, or better 11, decimal places
for the mantissa; to be on the safe side, we calculate the logarithm to 65 significant decimal
places (using ψ4 in place of ψ). And here we proudly present the desired error, in its full glory:
.
err 100 (π/8) = 7.690 351 655 · 10−577 094 587 063 832 397 881 269 698 762 985 632 406 213 034 261 .
12