The real equation, and the approximation everyone remembers
A simple pendulum — a point mass on a massless rod of length L — obeys one equation from torque and Newton's second law for rotation:
θ'' = -(g/L) · sin(θ) ← the real, nonlinear equation for small θ, sin(θ) ≈ θ, so: θ'' ≈ -(g/L) · θ ← simple harmonic motion, solvable exactly T = 2π√(L/g) ← the famous formula, valid only in this limit
That substitution, sinθ ≈ θ, is what turns an unsolvable nonlinear equation into the clean linear one everyone learns first. It's an excellent approximation for small swings — and a genuinely wrong one for large ones.
Why there's no closed-form solution
sinθ is a nonlinear function of θ, and that nonlinearity is what breaks the usual algebra. The exact period of the real pendulum can be written down, but only in terms of the complete elliptic integral of the first kind, K — a special function that itself has no elementary closed form:
T(θ₀) = 4 √(L/g) · K( sin(θ₀/2) ) θ₀ → 0 ⇒ T → 2π√(L/g) (the small-angle formula, recovered exactly) θ₀ → 180° ⇒ T → ∞ (a pendulum balanced upright never quite falls)
The small-angle formula is exactly the θ₀ → 0 limit of the true answer — not a different, competing formula, but the leading term of a series expansion of K. Every additional term in that series is a correction that grows with amplitude.
How much the period actually grows
Expanding K in powers of the amplitude gives a series correction to the naive period:
T(θ₀) ≈ T₀ · [ 1 + (1/16)θ₀² + (11/3072)θ₀⁴ + ... ] (θ₀ in radians) θ₀ = 10° → period ≈ 0.19% longer than T₀ θ₀ = 30° → period ≈ 1.7% longer than T₀ θ₀ = 90° → period ≈ 18% longer than T₀
Real pendulums swing slower than the textbook formula predicts, and the gap grows quickly once you go past about 20-30 degrees — a pendulum clock built for small swings will visibly lose time if someone gives it a big push.
Solving it numerically: RK4
Rather than evaluate elliptic integrals, the practical route — and the one this site's simulation uses — is to integrate the real equation directly with a fourth-order Runge-Kutta step. Splitting the second-order ODE into two coupled first-order ones (angle θ and angular velocity ω) and stepping forward:
state = [θ, ω] f(state) = [ω, -(g/L) * sin(θ)] k1 = f(state) k2 = f(state + h/2 * k1) k3 = f(state + h/2 * k2) k4 = f(state + h * k3) state += h/6 * (k1 + 2*k2 + 2*k3 + k4)
RK4's fourth-order accuracy makes the numerical period converge to the true elliptic-integral answer to well within floating-point precision at any reasonable step size, which is why the simulation can show the small-angle prediction visibly drifting apart from the real swing as the amplitude grows — two pendulums released together, one obeying the linear approximation and one obeying physics.
Frequently asked questions
At what angle does the small-angle approximation stop being good enough?
It depends how much error you'll accept, but as a rule of thumb the period error is under 1% for amplitudes below about 23°, and under 0.1% below about 7-8°. Grandfather clocks are deliberately built to swing only a few degrees specifically to stay inside this regime.
Why can't you just solve the pendulum equation with algebra?
Because sinθ is a nonlinear function of θ, the differential equation θ'' = -(g/L)sinθ isn't a linear ODE and has no solution in terms of elementary functions. Its exact solution involves elliptic integrals — special functions defined by the very integral this problem produces, which is why numerical integration is the practical route.
Why use RK4 instead of just plugging numbers into the small-angle formula?
The small-angle formula T = 2π√(L/g) is a fixed approximation that ignores amplitude entirely, so it's simply wrong once swings get large. RK4 numerically integrates the real nonlinear equation step by step, so it reproduces the true period at any amplitude, including the sharp growth as the pendulum approaches a full 180° swing.
Try it live
Everything above runs in your browser — open Simple Pendulum and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Simple Pendulum simulation