THE ANALYTIC STRUCTURE OF CONSTANTS

Constants

Written by

in

Mathematics / Numerical analysis

Mathematics / Numerical analysis

Why the same number can take a million terms to approximate—or just a handful.

How hard is it to calculate π? It sounds like a reasonable question. It isn’t, until you say how you intend to do it.

One of the oldest formulas for π takes the alternating series 4 − 4/3 + 4/5 − 4/7 + … . It works, but grudgingly. Add a thousand terms and you are still some way from four correct decimal places. Another formula, discovered by John Machin in 1706, gives roughly 140 decimal places from a hundred terms. Modern formulas can produce more than fourteen new decimal digits per term.

All these formulas compute the same number. π has not changed. The mathematics used to reach it has.

There is a real principle here, and it belongs to complex analysis. Singularities constrain the convergence of power series. Analyticity governs Fourier coefficients and numerical integration. Functional identities can move a calculation from a poorly behaved representation to one that converges at extraordinary speed. But it would be a mistake to conclude that every constant has a fixed analytic speed limit. The speed belongs to the representation and the algorithm, not simply to the number.

Figure 1. One destination, very different routes
REPRESENTATION SAME DESTINATION Gregory seriesMachin identityBBP seriesChudnovsky slow tailgeometricbase-16 expansion≈14 digits/term ππππ
The diagram is conceptual. Term counts and computing costs depend on the formula and implementation; the constants at the right are identical.

1. First, decide what “fast” means

There are at least three different questions. How rapidly does the mathematical error shrink as you add terms? How much work does each term require? And how difficult is it to discover a representation with good behaviour in the first place?

These questions are easy to confuse. A series may need only ten terms but involve huge factorials and expensive high-precision divisions. Another may use simple arithmetic but require millions of terms. Sophisticated algorithms such as binary splitting can reorganise the calculation so that those factorial-like quantities are handled efficiently. Counting terms is useful, but it is not the same as counting bit operations or seconds on a computer.

We will first examine convergence: what happens to the error after N terms? Only then will we return to the cost of computation.

2. What singularities actually tell us

Complex analysis gives a clean explanation for the speed of a Taylor series. Suppose a function has an expansion around zero,

f(z) = a0 + a1z + a2z2 + ···

and is analytic on and inside a circle of radius R. If its absolute value on that circle is at most MR, Cauchy’s estimate says

|an| ≤ MRRn.

At a point |z| < R, the remainder after degree N is bounded by

|f(z) − SN(z)| ≤ MR (|z|/R)N+11 − |z|/R.

The important quantity is the ratio |z|/R. Well inside the disk, powers of that ratio fall away geometrically. Near its boundary, the estimate deteriorates. At the boundary itself it gives no useful guarantee. This is a theorem about a specific expansion centred at a specific point—not a theorem that the value of the function can never be computed faster by other means.1

That distinction makes all the difference when we come to π.

Figure 2. The singularities stay put; the evaluation point moves

The Taylor series for arctan(z) about zero has singularities at ±i. Move the point x along the real axis. The radius of convergence remains 1, but the powers of x become much smaller.

Re zIm z01i−i x = 1.00 Nearestsingularities:+i and −iDashed circle:Taylor radius R = 1
x = 1.00
Bound on the remainder after 8 terms of arctan(x)
≤ 5.88 × 10⁻²
For 0 < x ≤ 1, the alternating-series bound is |remainder| ≤ x17/17. This illustration is about the error in arctan(x), not the scaled error in Machin’s formula.

3. π is not a slow constant

The Gregory–Leibniz series is familiar:

π = 4 ∑n=0∞ (−1)n2n + 1 = 4(1 − ⅓ + ⅕ − ⅐ + ···).

It comes from the Taylor series for arctan(x), evaluated at x = 1. The nearest complex singularities of arctan(z) are at ±i, exactly on the boundary of the Taylor disk. The terms decay as 1/n, and the alternating-series bound gives an error below 4/(2N + 1) after N terms.

Now consider Machin’s identity:

π = 16 arctan15 − 4 arctan1239.

Insert the same Taylor series for arctan into this expression. The powers are now powers of 1/5 and 1/239, not powers of 1. Each extra term in the first expansion is smaller by roughly a factor of 25; terms in the second shrink faster still. No exotic new definition of π is required. An elementary identity has moved us to more favourable evaluation points.2

With N terms in each arctangent expansion, a convenient error bound is

|π − πN| ≤ 16·5−(2N+1) + 4·239−(2N+1)2N + 1.

Machin’s formula is not a trick that defeats complex analysis. Complex analysis explains why it works. What it defeats is the idea that the convergence rate of one Taylor series is a speed limit on the constant itself.

There is an even simpler reminder. The number e has the elementary expansion

e = ∑n=0∞ 1n!.

Its factorial denominators give convergence faster than any fixed geometric rate. Elementary mathematics is perfectly capable of producing a very fast series.

4. The same phenomenon appears with ζ(3)

Apéry’s constant is defined by

ζ(3) = 1 + 123 + 133 + 143 + ··· .

Its defining series is slow. After N terms the remaining positive tail is at most 1/(2N²), by the integral test. Multiplying the number of terms by ten only buys roughly two more decimal digits in the error bound.

But there is also the identity

ζ(3) = 52 ∑n=1∞ (−1)n−1n3 · C(2n,n),

where C(2n,n) = (2n)!/(n!)² is the central binomial coefficient. This is often called an Apéry-type series. Since

C(2n,n) ∼ 4n√(πn),

its terms have size proportional to 4−nn−5/2. The error therefore falls geometrically, up to a polynomial factor.3

Here the contrast is particularly useful. The underlying constant is unchanged; we have not found a simpler closed form for it. We have found a better series.

Figure 3. Compare rigorous error bounds

Select a constant and move the term slider. The graph plots −log10(a proven upper bound on the truncation error). A height of 10 means the error is certified below 10−10. Larger is better.

Gregory seriesMachin identity
Text alternative: The Gregory series improves only logarithmically in decimal digits as terms are added; Machin’s formula improves nearly linearly in digits. The same contrast holds for the naive and Apéry series for zeta(3).
12 terms
Gregory — certified error
—
Machin — certified error
—
These are mathematical truncation bounds, not results obtained by summing in machine precision. For π, N terms are used in each Machin arctangent series; for ζ(3), N terms are used in each displayed series. A negative value of −log10(bound) is displayed at zero on the chart.

5. What about the awkward constants?

Euler’s constant, γ, is a useful test. Its defining limit is

γ = limN→∞ (HN − log N),

where HN = 1 + 1/2 + ··· + 1/N. Taken literally, this converges slowly. Euler–Maclaurin corrections improve the approximation by cancelling successive powers of 1/N. Taken to higher order, they can be more powerful than the phrase “polynomial convergence” suggests.

And the defining limit is not the end of the story. The Brent–McMillan method uses Bessel functions to compute γ rapidly. A rigorously analysed version, used in arbitrary-precision software, has an error bounded by a quantity of order e−8m in its principal parameter m, after the requisite high-precision work.4 The pole of 1/x at zero does not impose a universal slow-convergence law on γ.

Catalan’s constant provides another revealing example:

G = ∑n=0∞ (−1)n(2n+1)2.

Its obvious alternating series is slow, but Ramanujan gave the much faster representation

G = π8 log(2+√3) + 38 ∑n=0∞ 1(2n+1)2 · C(2n,n).

The binomial denominator again introduces geometric decay. This is not a rare exception; it is an example of precisely the change of representation we are trying to understand.5

None of this implies that all constants are equally easy to calculate. Some have better-known methods than others, and some algorithms are much more expensive to implement. It does mean we should be cautious before treating the slowness of a traditional definition as evidence of an intrinsic obstruction.

6. Why global structure can still matter enormously

So far, elementary identities have done much of the work. There is another source of speed: structure that relates a function to itself at quite different points.

Consider the trapezoidal rule. For an arbitrary nonsmooth function, it need not be especially impressive. For a periodic function analytic in a strip around the real axis, its convergence can be geometric. The reason is that analyticity forces rapid decay of its Fourier coefficients, and the trapezoidal rule samples those coefficients in a particularly favourable way. This is an established theorem, not merely a numerical curiosity.6

Modular forms offer an even more dramatic example. They obey transformation laws connecting values at different points in the upper half-plane. Their expansions use the quantity

q = e2πiτ,   |q| = e−2π Im(τ).

When the imaginary part of τ is large, |q| is tiny. Terms containing qn then shrink geometrically at a remarkable rate. The coefficients multiplying these powers need not shrink; many grow. It is the smallness of q, together with the structure of the identity, that provides the numerical advantage.

This is the world in which Ramanujan’s and the Chudnovsky brothers’ formulas for π arise. The Chudnovsky series produces roughly fourteen decimal digits per term, a staggering improvement over Gregory’s series. Yet even here, “fourteen digits per term” is not the same thing as a total running-time estimate. Large-integer multiplication, precision management, and binary splitting determine the practical cost.7

Show the Chudnovsky formula for π

The following identity is one standard form; its sum appears in the denominator when solving for π:

1π = 1426880√10005 ∑k=0∞ (−1)k(6k)!(13591409+545140134k)(3k)!(k!)36403203k

Its convergence factor is extremely small, but it remains geometric in the series index (up to polynomial factors); it is not generally correct to describe the underlying Fourier or hypergeometric terms as superexponential.

The Bailey–Borwein–Plouffe formula for π illustrates something different again. It is a geometrically convergent base-16 series that permits the extraction of distant hexadecimal digits without calculating every preceding digit. That is not merely faster convergence; it is a different kind of computational access to the number.8

Figure 4. Where the actual improvement comes from

There is no single operation called “making a constant fast.” Several distinct mathematical steps may be involved.

Choose a representation
Find an identity or transformation
Expose faster decay
Evaluate efficiently
A transformation may improve convergence without making each term cheap. A clever implementation may improve runtime without changing the mathematical series at all.

7. The harder problem is finding the right representation

This brings us to the most interesting part of the subject. Once you have Machin’s identity, the convergence calculation is straightforward. Once you have a reciprocal-binomial identity for ζ(3), Stirling’s formula tells you how quickly its terms decrease. Once you have a modular identity in which q is tiny, its numerical potential is plain.

But where did those identities come from?

That question takes us beyond convergence estimates. It involves functional equations, algebraic transformations, special functions, number theory, and sometimes experimental mathematics. The BBP formula, for example, emerged from a search for integer relations among carefully selected constants. Its importance was not that someone had thought to add terms faster. The achievement was finding a previously hidden representation with a completely different computational property.8

One can think of the process as a change of coordinates, provided the phrase is used carefully. The same mathematical object is being described through another exact identity. Features that were concealed in one description become visible in another. A bad expansion asks the calculation to work near a boundary or through a slowly decaying tail. A good one moves it to a setting where the error collapses quickly.

This is also why numerical analysis does not reduce to complex analysis alone. Analytic structure may reveal an opportunity; an algorithm must still exploit it. The best formula on paper is not necessarily the fastest implementation at a million digits.

8. Can there be an intrinsic speed limit?

Possibly, but it would have to be a different sort of theorem.

To prove that a constant cannot be computed rapidly, you must first specify what an algorithm is allowed to do, how inputs are represented, and how computational work is measured. You would then need a lower bound applying to every algorithm in that model, not merely an upper bound on the error of one Taylor series.

Cauchy’s estimate does not deliver such a result. Neither does the distance to a singularity in one arbitrarily chosen defining function. And the existence of a slow series is no evidence that a much faster identity is impossible.

That is why it would be unsafe to predict, for example, that ζ(3) can never have an exponentially convergent elementary series. It already has one. It would be equally unsafe to infer from the definition of γ that every numerical method for it must be slow.

The solid conclusion is narrower, but more useful: analytic properties can determine the convergence of specified approximations, while exact transformations can radically alter which approximations are available.

A constant does not come with a preferred algorithm. Its difficulty can change when we learn how to describe it.

The history of π computation makes this visible because the contrasts are so large. But the underlying pattern appears across mathematics. Finding a representation that exposes the right structure can matter more than pushing the original calculation harder.

There is no general rule saying local structure is slow and global symmetry is fast. An entire function may give a superb elementary series; an unfortunate expansion of a well-behaved function may still be painfully slow. What matters is the relation between the analytic structure, the representation we choose, and the algorithm used to evaluate it.

The discovery is not that some constants are naturally fast and others naturally slow. It is that mathematical structure is often the difference between an approximation we can barely use and one that puts millions of digits within reach.

Sources and further reading

  1. Complex-analysis lecture notes on Cauchy’s formula and Taylor coefficients: Ohio State University lecture notes.
  2. Richard Evan Schwartz, “Machin’s Method of Computing the Digits of π”, Brown University.
  3. Wolfram MathWorld, “Apéry’s Constant”; includes the reciprocal-binomial series.
  4. FLINT documentation, “Mathematical constants”; Brent–McMillan method and error control for γ.
  5. Fungrim, “Catalan’s constant”; Ramanujan’s rapidly convergent identity.
  6. Lloyd N. Trefethen and J. A. C. Weideman, “The Exponentially Convergent Trapezoidal Rule”, SIAM Review 56 (2014), 385–458.
  7. MathWorks, “Computing π”, on modern algorithms, including Chudnovsky and the arithmetic–geometric mean.
  8. David H. Bailey, “The BBP Algorithm for Pi” (2006); also Harvey Mudd College’s explanation of digit extraction.

Interactive diagrams are original illustrations. Error curves show theoretical truncation bounds, not benchmark measurements.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *