About this simulation: This modern JavaScript version recreates the original 1996 Java applet, now with realistic damping, adjustable gravity, and accurate small-angle and anharmonic period calculations. The pendulum can be repositioned by clicking and dragging the bob, and the motion restarts with a new exponential decay.
Details of Changes
1. Large‑angle (anharmonic) period correction
Real pendulums swing more slowly at larger amplitudes because the small‑angle
approximation no longer holds. The simulation now displays both the ideal
small‑angle period To and the corrected large‑angle period Tanh,
allowing direct comparison as the amplitude increases.
Small‑angle period:
$$ T_0 = 2\pi \sqrt{\frac{L}{g}} $$
Exact period:
The large‑angle period is given by the complete elliptic‑integral expression
$$ T(\theta_0) = T_0 \cdot \frac{2}{\pi} K\!\left(\sin\frac{\theta_0}{2}\right) $$
Simulation:
This simulation uses the first two terms of the large‑angle series expansion:
$$ T_{\text{anh}} \approx T_0 \left(1 + \frac{\theta_0^2}{16} + \frac{11\theta_0^4}{3072}\right) $$
At the maximum physically meaningful amplitude for a release from rest (90°),
the exact period increases by only 18% compared to the small‑angle value.
The 2‑term approximation at 90° gives a factor of 1.176 versus the exact elliptic‑integral factor 1.180,
a difference of only about 0.3%.
2. Realistic air‑drag damping
The simulation includes a small exponential damping term representing air drag
on a typical 5 cm smooth steel pendulum bob. For such a bob swinging in air,
drag mainly reduces the amplitude over time while having almost no effect on
the period. A representative damping time of about 110 s is used, corresponding
to the amplitude falling to 1/e after roughly 50–70 swings.
3. Adjustable gravitational acceleration
The gravitational constant varies slightly across Earth and significantly across
different celestial bodies. The simulation includes preset values for Earth
(sea level, mid‑latitude, polar, high elevation), the Moon, and Mars, allowing
exploration of how the pendulum period depends on local gravity.
For historical interest, the original 1996 Java applet version of this
simulation is still available here:
https://www.jensign.com/www/pendulum/
References
Kittel, Knight & Ruderman (1962)
Mechanics (Berkeley Physics Course, Vol. 1), McGraw‑Hill.
Contains an excellent “Advanced Topic” on the exact nonlinear pendulum,
including the elliptic‑integral solution.
Spiegel, Lipschutz & Liu (2017)
Mathematical Handbook of Formulas and Tables, 5th ed., McGraw‑Hill.
Provides the standard definition of \(K(k)\), series expansions, and tables
used in the anharmonic period calculation.
Marion & Thornton (2004)
Classical Dynamics of Particles and Systems, 5th ed., Cengage.
A rigorous reference on nonlinear oscillations and perturbative corrections.
Halliday, Resnick & Walker (2021)
Fundamentals of Physics, 12th ed., Wiley.
A broad, modern physics reference covering oscillations, damping, and gravity.