Skip to content

Pendulum period

Posted on:

A pendulum is a bob hanging from a fixed pivot by a rod of length LL, free to swing in a vertical plane. Its position at any instant is the single angle θ\theta between the rod and the vertical, and the amplitude θ0\theta_0 is the largest angle the swing reaches: released from rest at θ0\theta_0, the bob oscillates between θ0-\theta_0 and +θ0+\theta_0.

released from rest at the amplitude θ₀ L θ θ₀ g

Gravity pulls the bob back toward the vertical: the component of gravity along the bob’s circular track is mgsinθ-mg\sin\theta, the position along the track is s=Lθs = L\theta, and Newton’s second law, with the mass canceling, gives the equation of motion

θ¨=gLsinθ,\ddot\theta = -\frac{g}{L} \sin\theta,

where gg is the gravitational acceleration. The way this is taught in secondary and high school, most of the time, is to assume the swing is small, replace sinθ\sin\theta by θ\theta, and recognize a harmonic oscillator with angular frequency g/L\sqrt{g/L}, hence with period

T0=2πLg.T_0 = 2\pi \sqrt{\frac{L}{g}}.

No amplitude appears in T0T_0, but that absence belongs to the approximation, not to pendulums. The full equation is nonlinear, and the true period grows with the swing: it exceeds T0T_0 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 T0T_0 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

Conservation of energy between the angle θ\theta and the turning point θ0\theta_0 gives

12L2θ˙2=gL(cosθcosθ0),\tfrac{1}{2} L^2 \dot\theta^2 = g L (\cos\theta - \cos\theta_0),

and separating variables over a quarter swing (bottom to turning point),

T=4L2g0θ0dθcosθcosθ0.T = 4 \sqrt{\frac{L}{2g}} \int_0^{\theta_0} \frac{d\theta}{\sqrt{\cos\theta - \cos\theta_0}}.

The half-angle identity cosθ=12sin2(θ/2)\cos\theta = 1 - 2\sin^2(\theta/2) turns the radicand into 2(k2sin2(θ/2))2\bigl(k^2 - \sin^2(\theta/2)\bigr) with

k=sinθ02,k = \sin\frac{\theta_0}{2},

and the substitution sin(θ/2)=ksinφ\sin(\theta/2) = k \sin\varphi, which maps θ[0,θ0]\theta \in [0, \theta_0] onto φ[0,π/2]\varphi \in [0, \pi/2], produces

T=4Lg  K(k),K(k)=0π/2dφ1k2sin2φ.T = 4\sqrt{\frac{L}{g}}\; K(k), \qquad K(k) = \int_0^{\pi/2} \frac{d\varphi}{\sqrt{1 - k^2 \sin^2\varphi}}.

KK is the complete elliptic integral of the first kind. At zero amplitude K(0)=π/2K(0) = \pi/2 and the formula collapses to T0T_0; everything beyond the textbook is the growth of K(k)K(k) as kk runs from 0 toward 1.

The size of the correction

Expanding the integrand of KK by the binomial series and integrating term by term gives

TT0=2πK(k)=1+k24+9k464+=n=0[(2nn)14n]2k2n,\frac{T}{T_0} = \frac{2}{\pi} K(k) = 1 + \frac{k^2}{4} + \frac{9 k^4}{64} + \cdots = \sum_{n=0}^{\infty} \left[ \binom{2n}{n} \frac{1}{4^n} \right]^2 k^{2n},

and substituting k=sin(θ0/2)k = \sin(\theta_0/2) and re-expanding in the amplitude,

TT0=1+θ0216+11θ043072+\frac{T}{T_0} = 1 + \frac{\theta_0^2}{16} + \frac{11\,\theta_0^4}{3072} + \cdots

The leading correction θ02/16\theta_0^2/16 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:

θ0\theta_010°30°60°90°120°150°179°
T/T0T / T_01.00191.01741.07321.18031.37291.76223.9010

The divergence at the far end has its own closed form: as θ0180°\theta_0 \to 180° the modulus k1k \to 1 and K(k)ln(4/k)K(k) \sim \ln\bigl(4/k'\bigr) with k=1k2=cos(θ0/2)k' = \sqrt{1 - k^2} = \cos(\theta_0/2), so

TT0    2πln4cos(θ0/2).\frac{T}{T_0} \;\approx\; \frac{2}{\pi} \ln \frac{4}{\cos(\theta_0/2)}.

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 a0=xa_0 = x, b0=yb_0 = y and repeatedly replace them by their arithmetic and geometric means:

an+1=an+bn2,bn+1=anbn.a_{n+1} = \frac{a_n + b_n}{2}, \qquad b_{n+1} = \sqrt{a_n b_n}.

Both sequences converge to a common limit, the arithmetic–geometric mean agm(x,y)\operatorname{agm}(x, y), and they converge violently fast: the gap obeys an+1bn+1=(anbn)2/2a_{n+1} - b_{n+1} = (\sqrt{a_n} - \sqrt{b_n})^2 / 2, 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 ab>0a \ge b > 0 define

I(a,b)=0π/2dφa2cos2φ+b2sin2φ.I(a, b) = \int_0^{\pi/2} \frac{d\varphi}{\sqrt{a^2 \cos^2\varphi + b^2 \sin^2\varphi}}.

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, I(a,b)=I(a+b2,ab)I(a, b) = I\bigl(\tfrac{a+b}{2}, \sqrt{ab}\bigr); Cox’s survey works out the change of variables in full. Iterating to the common limit M=agm(a,b)M = \operatorname{agm}(a, b) freezes the integrand at I(M,M)=π/(2M)I(M, M) = \pi / (2M). Since I(1,k)=K(k)I(1, k') = K(k) (put a=1a = 1, b=kb = k' and use cos2+k2sin2=1k2sin2\cos^2 + k'^2 \sin^2 = 1 - k^2 \sin^2),

K(k)=π2agm(1,k),K(k) = \frac{\pi}{2 \operatorname{agm}(1, k')},

and the pendulum result becomes a single tidy formula:

  TT0=1agm(1,cos(θ0/2)).  \boxed{\;\frac{T}{T_0} = \frac{1}{\operatorname{agm}\bigl(1, \cos(\theta_0/2)\bigr)}.\;}

For θ0=90°\theta_0 = 90° the iteration starts from 11 and cos45°=0.70711\cos 45° = 0.70711 and proceeds

(1,  0.70711)(0.85355,  0.84090)(0.84722,  0.84721)(1,\; 0.70711) \to (0.85355,\; 0.84090) \to (0.84722,\; 0.84721) \to \cdots

agreeing to 16 digits by the fifth step, with T/T0=1/0.8472130848=1.1803405990T/T_0 = 1/0.8472130848 = 1.1803405990. 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:

θ₀ = 90°T/T₀ = 1.180341vs small angle: +18.03%

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 agm(1,2)\operatorname{agm}(1, \sqrt{2}) agrees to eleven decimal places with π/ϖ\pi/\varpi, where ϖ\varpi is the lemniscate constant, and wrote that the observation would surely open a whole new field of analysis. It did: the identity K(k)=π/(2agm(1,k))K(k) = \pi / (2\operatorname{agm}(1, k')) 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 π\pi by essentially the same AGM identities, doubling the number of correct digits per iteration, and AGM-based formulas held the π\pi-computation records for decades. A three-century-old pendulum integral and record-scale computation run on the same two lines of arithmetic.

References



Previous Post
German tank problem
Next Post
The leading digit of a power of two