How to calculate simple harmonic motion

Compute period T, frequency f, position x(t), velocity, acceleration of simple harmonic motion. Spring-mass T = 2π√(m/k), pendulum T = 2π√(L/g). Total energy ½kA². Galileo Hooke Newton.

Calculation parameters
Was this calculator useful?

How to calculate simple harmonic motion (SHM): the spring-mass system has period T = 2π·√(m/k), where m is mass and k the spring constant. The simple pendulum (small oscillations) has T = 2π·√(L/g) with L length and g gravity. Position is x(t) = A·cos(ωt + φ) with ω = 2π/T angular frequency and A amplitude. Total energy of spring-mass system: E = ½·k·A².

Formula and physical principles

SHM arises whenever the restoring force is proportional and opposite to displacement: F = -k·x (Hooke's law). Equation of motion m·ẍ + k·x = 0, harmonic solution x(t) = A·cos(ωt + φ) with ω = √(k/m). Velocity v(t) = -A·ω·sin(ωt+φ), acceleration a(t) = -A·ω²·cos(ωt+φ) = -ω²·x. Kinetic and potential energies oscillate out of phase keeping total constant: E = ½kA² = ½mv²_max. SHM is the foundation of all vibration and wave physics.

History and scientific context

Galileo Galilei in 1583, observing the chandelier in Pisa Cathedral, discovered pendulum isochronism (period independent of amplitude for small oscillations). Christiaan Huygens in 1656 built the first reliable pendulum clock and formulated T = 2π·√(L/g). Robert Hooke published F = -k·x in 1678. Newton (1687) integrated these results in Principia. Lord Kelvin extended theory to damped systems. SHM underlies mechanical clocks, quantum mechanics (quantum oscillator), LC circuits, crystallography, and structural vibrations (ASCE 7-22, IBC, Eurocode 8 seismic zones).

Examples and parameters table

  • 1 m pendulum: T = 2.006 s (classic seconds-beat clock)
  • 25 cm pendulum: T = 1.003 s
  • Car spring: k = 30,000 N/m, m = 250 kg → T = 0.57 s, f = 1.75 Hz
  • Atom in crystal: f = 10¹² Hz (lattice vibrations, Debye mode)
  • Tuning fork: A 440 Hz (concert pitch)
  • Foucault pendulum: T ~ 16 s (latitude dependent)
  • Quartz crystal: 32,768 Hz (quartz watches)
  • Small oscillation limit: angle < 15° for < 1% pendulum error

Worked numerical examples

Example 1 — spring-mass. m = 1 kg, k = 100 N/m, A = 0.1 m. ω = 10 rad/s. T = 0.628 s. f = 1.59 Hz. v_max = 1 m/s. a_max = 10 m/s². E = 0.5 J. At t = 0.5 s with φ = 0: x = 0.0284 m. v = 0.959 m/s.

Example 2 — simple pendulum. L = 1 m, g = 9.81 m/s². T = 2.006 s, f = 0.498 Hz. For L = 25 cm: T = 1.003 s. For L = 4 m: T = 4.01 s. Period scales with √L.

Example 3 — auto suspension. Car m = 1500 kg, 4 shocks. Per shock m = 375 kg. k = 30,000 N/m. T = 0.70 s, f = 1.43 Hz. Comfort range 1-1.5 Hz.

Example 4 — physical pendulum. Uniform rod L = 1 m hanging from one end. I = mL²/3. d = L/2. T = 2π·√(I/(mgd)) = 1.64 s. Slower than simple pendulum (2.006 s) because mass distributed.

Example 5 — finding angular frequency. 0.5 kg mass on spring. Stretch 0.098 m under gravity → k = mg/Δx = 50 N/m. T = 0.628 s, f = 1.59 Hz. Measurable timing 10 oscillations in 6.28 s.

Model limitations

  1. Small angle approximation for pendulum: error < 1% for θ < 15°, beyond use nonlinear model.
  2. Damping: real oscillators dissipate energy (viscous friction, air drag); motion exponentially decreases.
  3. External forcing: forced oscillators F(t) = F_0·cos(ω_d·t) resonate at ω_d = ω_n.
  4. Anharmonicity: for nonlinear springs (k = k(x)) period depends on amplitude.
  5. Spring mass: for heavy springs add m_spring/3 to effective mass.
  6. Quantum limit: at low T and small mass quantum oscillator E_n = ℏω(n + ½).
  7. Relativistic effects: for v → c (irrelevant in practice).
  8. Dry friction (Coulomb): generates linearly decreasing amplitude, not pure SHM.

Common errors

  1. Confusing period T (s) with frequency f (Hz) or angular frequency ω (rad/s): f = 1/T, ω = 2πf.
  2. Using ω·t in radians vs degrees: in calculations ω·t is in radians; phase shift φ to convert.
  3. Applying pendulum T = 2π·√(L/g) at large angles (> 30°) — error > 5%.
  4. Confusing amplitude A (max displacement) with peak-to-peak amplitude (2A).
  5. Forgetting spring mass term (for non-light springs).
  6. Computing energy with E = mgh for pendulum vs E = ½kA² for spring.
  7. Mixing SI with cgs units (N/m vs dyne/cm).
  8. Ignoring damping in real systems.

Practical applications

  1. Clockmaking: pendulum clocks, quartz (32,768 Hz), atomic (cesium).
  2. Auto suspensions: shocks for comfort 1-1.5 Hz.
  3. Earthquake engineering: seismic isolators, ASCE 7-22, IBC, Eurocode 8.
  4. Musical instruments: vibrating strings, organ pipes, tuning forks.
  5. Crystallography: lattice vibrations, phonons, Debye model.
  6. IR spectroscopy: molecular vibrations (4000-400 cm⁻¹).
  7. LC circuits: radio oscillators, resonant filters, telecom.
  8. Vibration analysis: machinery (ISO 10816), structural monitoring.
  9. Bridge engineering: Tacoma Narrows, stability balance (Eurocode 1-1-4).
  10. Quantum physics: harmonic oscillator, foundation of quantum mechanics.

Support

Questions: info@calcoi.com. Educational tool for SHM. For structural vibrations and seismic analysis consult licensed PE per ASCE 7-22, Eurocode 8.

Updated July 2026

Frequently Asked Questions

What is simple harmonic motion?

It is the oscillatory motion that occurs when the restoring force is proportional and opposite to the displacement, according to Hooke's law F = -kx. The solution is x(t) = A cos(omega t + phi), a sinusoidal oscillation of constant amplitude A, with angular frequency omega and phase phi. It is the basic model of every physical oscillation.

How is the period computed?

It depends on the system. For a mass on a spring the period is T = 2 pi sqrt(m/k), with m mass and k spring constant. For a simple pendulum at small oscillations it is T = 2 pi sqrt(L/g), with L length and g gravitational acceleration. For a physical pendulum T = 2 pi sqrt(I/(m g d)).

What are amplitude, frequency and phase?

The amplitude A is the maximum displacement from equilibrium. The frequency f = 1/T is the number of oscillations per second (in hertz), linked to the angular frequency by omega = 2 pi f. The phase phi sets the initial position of the oscillation at time t = 0. Together they fully describe the motion.

How do velocity and acceleration vary?

The velocity is v(t) = -A omega sin(omega t + phi), maximal when passing through equilibrium (v_max = A omega). The acceleration is a(t) = -A omega^2 cos(omega t + phi), maximal at the extremes (a_max = A omega^2) and always directed toward the center. Velocity and acceleration are a quarter-period out of phase.

How is energy conserved in harmonic motion?

The total energy stays constant and equals E = (1/2) k A^2 for the mass-spring system. It is continuously exchanged between kinetic (1/2) m v^2, maximal at the center, and potential (1/2) k x^2, maximal at the extremes. Their sum always equals the total energy, in the absence of friction.

Why is harmonic motion so widespread?

Because any system near a minimum of potential energy oscillates harmonically: the Taylor expansion of the potential around the minimum is parabolic, giving a linear restoring force. So the same equations describe springs, pendulums, atoms in crystals, LC circuits and the quantum oscillator.

What is damping?

It is the gradual loss of energy due to friction or resistance, which makes the amplitude decay exponentially until it stops. Ideal harmonic motion ignores damping, but in real systems it is always present. It is desirable, for example, in car suspensions to absorb oscillations quickly.

What is resonance?

It is the amplification of oscillation when an external periodic force has a frequency equal to the system's natural frequency: each push adds in phase and the amplitude grows enormously. It is useful for tuning radios and in magnetic resonance, but dangerous: it can destroy structures, like the Tacoma Narrows bridge in 1940.

Formula

T_{spring} = 2\pi \sqrt{\frac{m}{k}}, \quad T_{pendulum} = 2\pi \sqrt{\frac{L}{g}}, \quad x(t) = A\cos(\omega t + \varphi)

Comments (0)

No comments yet. Be the first!