Simple Harmonic Motion Calculator

Calculate displacement, velocity, acceleration, and energy for simple harmonic oscillators. Supports spring-mass, pendulum, and damped systems with motion tables and energy visualization.

About the Simple Harmonic Motion Calculator

Simple harmonic motion (SHM) is the most fundamental type of periodic motion, describing any system where the restoring force is proportional to displacement from equilibrium: F = −kx. This idealized motion produces the sinusoidal oscillations that appear everywhere in physics and engineering — from the vibration of atoms in a crystal lattice to the swaying of skyscrapers in wind, from the oscillation of electrical circuits to the motion of a child on a swing.

The defining equation x(t) = A·cos(ωt + φ) encapsulates the complete motion: amplitude A sets the maximum displacement, angular frequency ω = √(k/m) determines how fast the system oscillates, and phase φ specifies the starting position. The beauty of SHM is that all these oscillators — springs, pendulums, LC circuits, molecular vibrations — share identical mathematical descriptions despite their vastly different physical mechanisms.

This calculator handles three input modes (frequency, period, and spring-mass), evaluates position, velocity, and acceleration at any time, tracks the kinetic-potential energy exchange, and supports damping. The motion table with visual position indicators brings the abstract equations to life, showing how the oscillator moves through one complete cycle.

Why Use This Simple Harmonic Motion Calculator?

SHM is the foundation of wave physics, oscillation analysis, and vibration engineering. This calculator lets students verify homework calculations, engineers characterize spring-mass systems, and anyone explore how changing mass, stiffness, damping, or initial conditions affects oscillatory behavior. Keep these notes focused on your operational context. Tie the context to the calculator’s intended domain. Use this clarification to avoid ambiguous interpretation.

How to Use This Calculator

  1. Select a preset scenario or choose an input mode (frequency, period, or spring-mass).
  2. Enter the amplitude of oscillation in meters.
  3. Enter the frequency/period or spring constant and mass.
  4. Set the evaluation time (t), phase shift (φ), and damping coefficient (b).
  5. Review displacement, velocity, acceleration, and energy values.
  6. Examine the energy distribution bar to see kinetic vs potential balance.
  7. Study the motion table to trace the oscillator through one full period.

Formula

x(t) = A·cos(ωt + φ). v(t) = −Aω·sin(ωt + φ). a(t) = −Aω²·cos(ωt + φ). ω = 2πf = √(k/m). T = 1/f = 2π√(m/k). KE = ½mv². PE = ½kx². Total E = ½kA². Damping ratio: ζ = b / (2√(km)).

Example Calculation

Result: x(0.1) = 0.04045 m, v = −0.1465 m/s, a = −1.012 m/s²

ω = √(50/2) = 5 rad/s, f = 0.796 Hz. x(0.1) = 0.05·cos(5 × 0.1) = 0.05·cos(0.5) = 0.04388 m. Total energy = ½ × 50 × 0.05² = 0.0625 J, exchanged continuously between kinetic and potential.

Tips & Best Practices

SHM in Nature and Technology

| System | Spring-like Restoring Force | Period/Frequency | |---|---|---| | Mass on spring | F = −kx | T = 2π√(m/k) | | Simple pendulum | F = −mg sin θ ≈ −(mg/L)x | T = 2π√(L/g) | | LC circuit | V = −q/C | T = 2π√(LC) | | Molecular bond vibration | F = −k_bond·Δr | f ~ 10¹³–10¹⁴ Hz | | Floating object | F = −ρgAx | T = 2π√(m/(ρgA)) |

Damping Regimes

Underdamped (ζ < 1): The system oscillates with exponentially decaying amplitude. Most musical instruments and mechanical systems operate here. Critically damped (ζ = 1): The fastest return to equilibrium without overshooting. Used in measuring instruments and shock absorbers. Overdamped (ζ > 1): Sluggish return to equilibrium without oscillation. Used in heavy door closers and some electrical circuits.

Forced Oscillations and Resonance

When an external periodic force F₀cos(ω_d·t) drives the oscillator, the steady-state amplitude depends on how close ω_d is to ω₀. At resonance (ω_d = ω₀), amplitude becomes A = F₀/(bω₀) — limited only by damping. The famous Tacoma Narrows Bridge collapse (1940) demonstrated the destructive power of resonance when wind vortices matched the bridge's torsional frequency.

Frequently Asked Questions

What makes motion "simple harmonic"?

The restoring force must be linearly proportional to displacement: F = −kx. This linear relationship produces purely sinusoidal motion. When the restoring force is nonlinear (e.g., large-angle pendulums), the motion is periodic but not simple harmonic.

What is the difference between SHM and damped oscillation?

Pure SHM oscillates forever with constant amplitude. Damped oscillations lose energy to friction/drag, causing amplitude to decay exponentially. The damping ratio ζ determines the behavior: ζ < 1 (underdamped, oscillates with decay), ζ = 1 (critically damped), ζ > 1 (overdamped, no oscillation).

Why does the period of a pendulum not depend on amplitude?

For small angles (< ~15°), sin(θ) ≈ θ, making the pendulum a simple harmonic oscillator with T = 2π√(L/g), independent of amplitude. For large angles, the period increases with amplitude — this is the "non-harmonic" correction.

How does energy exchange in SHM?

Total energy is constant. At maximum displacement (x = A), all energy is potential (½kA²) and velocity is zero. At equilibrium (x = 0), all energy is kinetic (½mv²_max) and displacement is zero. The exchange is continuous and sinusoidal.

What is resonance?

Resonance occurs when a periodic driving force matches the natural frequency of the oscillator. At resonance, even small driving forces produce large amplitudes. Damping limits the peak amplitude and broadens the resonance curve.

Is the planetary orbit SHM?

No. Circular orbits have constant radius (no oscillation). However, if a planet is slightly perturbed from a circular orbit, it oscillates about the circular path in a way that approximates SHM (epicyclic motion).

Related Pages