🕰️ Simple Pendulum — Small-Angle vs Large-Angle Motion
Compare a real nonlinear pendulum (RK4-integrated θ'' = -(g/L)sinθ) against the small-angle approximation θ'' = -(g/L)θ. Adjust amplitude, length and gravity to see the period error grow at large swings.
About Simple Pendulum — Small-Angle vs Large-Angle Motion
A real pendulum obeys the nonlinear equation θ'' = -(g/L)sinθ, where θ is the swing angle from vertical, g is gravitational acceleration and L is the pendulum's length. This simulation integrates that exact equation numerically using fourth-order Runge-Kutta (RK4) with a small fixed time step, so the true motion — including how it slows down at large amplitude — emerges directly from the physics rather than from an approximation. Alongside it, a second pendulum follows the small-angle approximation θ'' = -(g/L)θ, obtained by replacing sinθ with θ for small angles. That simplified equation is exactly solvable: θ(t) = θ0 cos(ωt) with angular frequency ω = √(g/L) and period T = 2π√(L/g), independent of amplitude — the textbook result taught in every introductory mechanics course.
The two models agree closely for small swings, but they diverge as amplitude grows. Because sinθ is slightly smaller than θ for θ > 0, the restoring force in the real pendulum is weaker than the small-angle model assumes, so the true period is always longer, and increasingly so at large amplitude — approaching infinity as θ0 approaches 180°, where the pendulum takes forever to leave the exact top. The exact period is properly expressed with an elliptic integral, but this simulator measures it directly from the RK4 trajectory, which is more transparent and just as accurate. This period-amplitude dependence matters in real engineering: pendulum clocks are precise specifically because their escapements keep the swing amplitude small and consistent, and any small-angle assumption used far outside its valid range — in physics problem sets, seismometers or ride design — silently introduces exactly this kind of error.
Frequently Asked Questions
What does this simulation actually show?
It shows two pendulums released from rest at the same starting angle, swinging from the same pivot. One follows the exact nonlinear equation of motion, numerically integrated with RK4; the other follows the small-angle approximation, which has a simple closed-form solution. As time passes you can watch them fall out of phase, and the telemetry panel reports the exact period, the small-angle period and the percentage error between them.
Why does the small-angle approximation break down at large amplitude?
The approximation replaces sinθ with θ, which is only accurate when θ is small (in radians). At larger angles sinθ is noticeably smaller than θ, so the true restoring force is weaker than the approximation predicts. A weaker restoring force means slower acceleration back toward vertical, so the real pendulum swings more slowly and its period grows — an effect the small-angle model, by construction, cannot capture.
Why is RK4 used instead of a simpler method?
Fourth-order Runge-Kutta integrates the equations of motion with much higher accuracy per time step than simpler methods like Euler's method, and it conserves energy far better over long integration times. Since this simulation measures a precise period and percentage error, an inaccurate integrator would introduce numerical error on top of the physical effect being demonstrated, muddying the comparison.
What do the controls change?
The amplitude slider sets the initial release angle θ0 from 5° to 170°, which both pendulums start from at rest. The length slider sets the pendulum's length L from 0.3 m to 3 m, which changes both periods together. The gravity buttons switch between Earth (9.81 m/s²), the Moon (1.62 m/s²) and Mars (3.71 m/s²), showing how weaker gravity stretches both periods out.
Why does length not affect the percentage error?
The percentage error between the exact and small-angle periods depends only on the amplitude θ0, not on the pendulum's length or the local gravity. Length and gravity both scale the small-angle period T = 2π√(L/g) uniformly, and they scale the exact period by the same factor, so the ratio between them — and hence the percentage error — is unchanged. Only the shape of sinθ versus θ, which depends purely on the angle, determines the error.
How is the exact period actually measured here?
Rather than relying on a series approximation or a full elliptic-integral formula, the simulator integrates the real RK4 trajectory starting from rest at θ0 and detects the moment the angle crosses zero, which is exactly a quarter of a full swing. Multiplying that quarter-period time by four gives the true period directly from the physics, with the crossing time refined by linear interpolation for extra precision.
Why does the pendulum take forever to swing near 180 degrees?
At θ0 close to 180°, the pendulum starts almost balanced upside down, where the restoring force from gravity is nearly zero. It accelerates away from that point only very slowly, so the time to complete even a quarter swing grows without bound. In the idealised limit of exactly 180°, the period becomes infinite — the pendulum would balance there forever, at least mathematically.
Does this simulation include friction or air resistance?
No. Both pendulums are undamped so that the period can be measured cleanly over many swings without energy being lost — damping would cause the amplitude, and therefore the period, to change over time, making a fair "same amplitude, same time" comparison much harder to read from the animation.
Where does the small-angle approximation actually get used in real physics?
It underlies the standard pendulum-clock period formula taught in introductory mechanics, the small-oscillation analysis of springs, gates and simple harmonic oscillators generally, and the linearised equations used in early seismometer and pendulum-based sensor designs. It is accurate to within about 1% up to roughly 20-23 degrees of amplitude, which is why real pendulum clocks are engineered to keep their swing that small.
Why do grandfather clocks assume small-angle motion?
A pendulum clock's timekeeping accuracy depends on the period staying constant regardless of small variations in swing amplitude caused by winding, temperature or friction in the escapement. That constancy is only true in the small-angle regime, where the period is independent of amplitude. Clockmakers deliberately keep the swing to just a few degrees so that any drift in amplitude barely changes the period, keeping the clock accurate.
Compare a real nonlinear pendulum (RK4-integrated θ'' = -(g/L)sinθ) against the small-angle approximation θ'' = -(g/L)θ. Adjust amplitude, length and gravity to see the period error grow at large swings.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install