The pendulum formula everyone memorizes,
contains no amplitude, and that absence is an approximation, not a property of pendulums. The equation of motion is nonlinear; only after replacing by does the period detach from the swing. The true period exceeds by 0.19% at an amplitude of 10°, by 1.74% at 30°, and by 18% at 90°. Released almost inverted, at 179°, the pendulum takes nearly four to complete a cycle.
None of this requires numerics to pin down. The exact period is a complete elliptic integral, a classical special function, and an algorithm of Gauss evaluates it with astonishing efficiency: each iteration doubles the number of correct digits, so machine precision arrives in about five steps.
The exact period
Let be the length, the amplitude, and measure from the vertical. Conservation of energy between angle and the turning point gives
and separating variables over a quarter swing (bottom to turning point),
The half-angle identity turns the radicand into with
and the substitution , which maps onto , produces
is the complete elliptic integral of the first kind. At zero amplitude and the formula collapses to ; everything beyond the textbook is the growth of as runs from 0 toward 1.
The size of the correction
Expanding the integrand of by the binomial series and integrating term by term gives
and substituting and re-expanding in the amplitude,
The leading correction already tells the practical story: a pendulum clock’s error is quadratic in the swing, so halving the amplitude quarters the error. The exact values, computed by the method of the next section:
| 10° | 30° | 60° | 90° | 120° | 150° | 179° | |
|---|---|---|---|---|---|---|---|
| 1.0019 | 1.0174 | 1.0732 | 1.1803 | 1.3729 | 1.7622 | 3.9010 |
The divergence at the far end has its own closed form: as the modulus and with , so
At 179° this gives 3.901, matching the table to every digit shown. The logarithm is the signature of the unstable equilibrium at the top: a pendulum released ever closer to inverted spends ever longer creeping away from the apex, and the period grows without bound while the release point is still a fraction of a degree from vertical.
Gauss’s iteration
Take two positive numbers , and repeatedly replace them by their arithmetic and geometric means:
Both sequences converge to a common limit, the arithmetic–geometric mean , and they converge violently fast: the gap obeys , which is quadratic in the previous gap, so the number of correct digits doubles at every step.
Gauss’s discovery is that this iteration computes exactly the integral we need. For define
A substitution devised by Gauss (and equivalent to Landen’s earlier transformation of elliptic integrals) shows the integral is invariant under one step of the iteration, ; Cox’s survey works out the change of variables in full. Iterating to the common limit freezes the integrand at . Since (put , and use ),
and the pendulum result becomes a single tidy formula:
For the iteration starts from and and proceeds
agreeing to 16 digits by the fifth step, with . The widget runs exactly this iteration at any amplitude; the table below the plot shows the digits locking in, roughly twice as many per row:
A little history
Galileo took the circular pendulum to be isochronous, its period independent of amplitude; the table above measures how wrong that is, and the error mattered as soon as pendulums were asked to keep time. Huygens understood the defect and, in the Horologium Oscillatorium (1673), cured it outright: a bob constrained to swing along a cycloid rather than a circle has a period exactly independent of amplitude. That construction, and the reason the cycloid is the unique curve with this property, is the tautochrone story told in the post on the curve of fastest descent; the present post is about living with the circle instead.
The integral itself waited a century for its theory. Landen (1775) found the transformation relating elliptic integrals of different moduli, and Legendre systematized the subject. The decisive step came from Gauss, who had been iterating arithmetic and geometric means since his teens: in a diary entry dated 30 May 1799 he recorded that agrees to eleven decimal places with , where is the lemniscate constant, and wrote that the observation would surely open a whole new field of analysis. It did: the identity and its descendants sit at the root of the theory of elliptic functions and modular transformations. Cox’s 1984 survey reconstructs the whole episode from Gauss’s notebooks.
The iteration’s quadratic convergence also earned it a modern career: the Salamin–Brent algorithm (1976) computes by essentially the same AGM identities, doubling the number of correct digits per iteration, and AGM-based formulas held the -computation records for decades. A three-century-old pendulum integral and record-scale computation run on the same two lines of arithmetic.
References
- David A. Cox. The arithmetic-geometric mean of Gauss. L’Enseignement Mathématique, 30:275–330, 1984. The history and the full proof of the AGM–elliptic integral identity.
- Jonathan M. Borwein, Peter B. Borwein. Pi and the AGM: A Study in Analytic Number Theory and Computational Complexity. Wiley, 1987. The AGM as an algorithmic object.
- E. T. Whittaker, G. N. Watson. A Course of Modern Analysis. Cambridge University Press, 4th edition, 1927. Elliptic integrals and Landen’s transformation.
- Christiaan Huygens. Horologium Oscillatorium. Paris, 1673. The cycloidal pendulum as the fix for amplitude dependence.
- Eugene Salamin. Computation of π using arithmetic-geometric mean. Mathematics of Computation, 30:565–570, 1976. Quadratically convergent π from the AGM.
- Richard P. Brent. Fast multiple-precision evaluation of elementary functions. Journal of the ACM, 23(2):242–251, 1976. The companion result, same year, found independently.