Lesson 13 of 15

Pendulum Period

The Simple Pendulum

A mass on a string of length LL, swinging under gravity, oscillates with period:

T=2πLgT = 2\pi\sqrt{\frac{L}{g}}

where g=9.81g = 9.81 m/s².

Historical Importance

Galileo noticed that pendulum period is independent of amplitude (for small angles). This led to pendulum clocks — the most accurate timekeepers for 300 years, from Huygens (1656) to quartz oscillators (1920s).

The Small-Angle Approximation

This formula holds when the angle is small (15°\lesssim 15°). For large angles, the true period is longer and requires an elliptic integral to compute exactly.

Period vs Spring-Mass

Spring-MassPendulum
Formula2πm/k2\pi\sqrt{m/k}2πL/g2\pi\sqrt{L/g}
Restoring forceSpring: F=kxF = kxGravity: FmgθF \approx mg\theta
Effective "k"kkmg/Lmg/L

For the pendulum, the "spring constant" is mg/Lmg/L — so mass cancels out and period is mass-independent.

Examples

LL (m)TT (s)
1.0002.0061
4.0004.0122
9.8106.2832 =2π= 2\pi
0.2480.9990 1\approx 1 s (a seconds pendulum)

Your Task

Implement pendulumPeriod(L) returning the period in seconds.

TCC compiler loading...
Loading...
Click "Run" to execute your code.