Simple Pendulum
A pendulum swinging under gravity with adjustable length and initial angle.
Objective
Confirm that for small swings, the pendulum's period follows the closed-form approximation T = 2π√(L/g), which depends only on rod length and gravity — not on the bob's mass or starting angle. Identify the regime where this small-angle formula is accurate (initial angles below roughly 15–20°) and observe how the true period grows above the predicted value as the initial angle increases. The simulation integrates the full nonlinear equation θ'' = −(g/L)·sin θ, so the divergence between the linearized prediction and the measured swing time is itself part of the physics on display.
Setup
- Press Reset to return the bob to its initial angle. The Time readout shows 0.00 s; Angle, Period, and ω repopulate from the current slider values.
- Set the Length slider to 1.0 m. This is the canonical reference length and produces a clean small-angle period close to 2 seconds.
- Set the Initial Angle slider to 10°. This is well within the small-angle regime, so the linearized prediction will agree with the measured swing time to within a fraction of a percent.
- Set the Damping slider to off (0). With no damping the amplitude stays constant and the bob crosses θ = 0 at perfectly even intervals, making period measurement straightforward.
- Press Start. The bob releases from 10°, the rod traces a faint amber arc, and the readouts update continuously: Time, Angle, Period (small-angle prediction from L), and ω (angular velocity).
Analytical Prediction
For small swings, the period of an ideal simple pendulum is T = 2π√(L/g), where L is rod length and g = 9.81 m/s². The formula comes from linearizing sin θ ≈ θ in the equation of motion, valid when the initial angle is small. With L = 1.0 m:
For a 10° release, the maximum bob speed at the bottom is v_max = ω₀ · L · sin 10° ≈ 3.132 · 1.0 · 0.1736 ≈ 0.544 m/s, which corresponds to a peak |ω| of about 0.544 rad/s. After 2.006 s the bob should return to its starting angle of +10° with ω back near zero. After half a period (≈ 1.003 s) it should reach −10° at the opposite extreme.
Results Analysis
While the swing runs, the Period readout displays the small-angle prediction 2.006 s for L = 1.0 m — this number does not change with amplitude or damping because it is computed directly from the formula. To check the actual period, watch the Time readout at consecutive moments when the Angle readout returns to its starting value of +10° with ω near zero. With initial angle 10° the measured interval lands near 2.01 s, within about 0.2% of the prediction — confirming the small-angle approximation. Now repeat with the Initial Angle slider raised to 60°. The Period readout still shows 2.006 s, but the bob actually takes about 2.15 s to return — roughly 7% longer. At 85° the gap widens to near 18%. The displayed Period is the linearized formula; the swing itself obeys the full nonlinear equation, and the two visibly disagree once the amplitude leaves the small-angle window.
Source of Error
What this sim does NOT model: the string's mass and stretching, air resistance, the bob's finite size and rotational kinetic energy, and friction at the pivot. The bob is a point mass on a massless rigid rod swinging in a vacuum. The small-angle formula T = 2π·√(L/g) and the full nonlinear equation θ'' = −(g/L)·sin θ both assume the same idealizations, so they cancel rather than contributing to the residual period or energy. With damping enabled, the linear viscous term is the only dissipation modelled. The remaining gap between prediction and readouts is therefore purely numerical, not physical.
Further Exploration
- Hold Length at 1.0 m and step the Initial Angle through 5°, 15°, 30°, 45°, 60°, and 80°. At each angle, time one full swing using the Time readout and compare to the displayed Period of 2.006 s. At what angle does the discrepancy first exceed 1%?
- Test the length dependence. Predict the period at L = 4.0 m using T = 2π√(L/g), then run the simulation at 10° initial angle and compare. Is the measured period exactly double the L = 1.0 m value, as the square-root law implies?
- With Length 1.0 m and Initial Angle 30°, raise Damping to 0.20 and watch the amplitude shrink. Does the period between successive zero-crossings stay roughly constant, or does it shift as the swing decays? What does this suggest about how damping interacts with the small-angle limit?
- Set Length to 2.5 m and Initial Angle to 45°. Compute the small-angle period analytically, then estimate the true period using the next-order correction T ≈ 2π√(L/g) · (1 + θ₀²/16) with θ₀ in radians. Compare both to the measured swing time.