Simulation

Simple Pendulum

OscillationsSimple and physical pendulums

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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:

T=2π · √(L/g)
=2π · √(1.0 / 9.81)
2π · 0.3193
2.006 s
ω₀=√(g/L)
=√9.81
3.132 rad/s

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