Physics
Verified OpenLabs Publication

Simple Harmonic Motion Explained: Pendulums, Springs, and Why Everything Oscillates

Simple Harmonic Motion governs pendulums, springs, guitar strings, and atoms. Here's what it actually means, why students consistently get it wrong, all the formulas you need, and how to see it working in a live simulation.

OP
OpenLabs TeamPublished on Aug 27, 2026 • 12 min read
Simple Harmonic Motion Explained: Pendulums, Springs, and Why Everything Oscillates
Executive Summary & Key Takeaways
  • Topic Overview: Essential insights on physics principles, computational experiments, and pedagogical methodologies.
  • Hands-on Application: Translate theoretical derivations into verifiable real-time simulation readings on OpenLabs.
  • Interactive Mastery: Explore parameters, transient graphs, and error diagnostics directly in your web browser.

Simple Harmonic Motion is one of the most important concepts in all of physics. It describes the motion of pendulums, springs, guitar strings, atoms in a crystal lattice, electrical circuits, and ocean waves. It appears in every physics syllabus from high school through university. And yet it's consistently misunderstood — not because it's inherently complex, but because students encounter it as a set of formulas before they understand what's actually happening physically.

This guide covers everything: what Simple Harmonic Motion actually is, the mathematics behind it, the specific misconceptions that cost marks, how pendulums and springs demonstrate it differently, energy in SHM, damping, resonance, and how to use an interactive simulation to build genuine understanding rather than surface familiarity.


What Is Simple Harmonic Motion?

Simple Harmonic Motion (SHM) is a specific type of periodic motion — meaning the object repeats the same motion over and over — where the restoring force acting on the object is:

  1. Always directed toward the equilibrium position
  2. Directly proportional to the displacement from equilibrium

The mathematical definition: F = -kx

Where:

  • F is the restoring force (N)
  • k is the spring constant or restoring force constant (N/m)
  • x is the displacement from equilibrium (m)
  • The negative sign means force and displacement always point in opposite directions

That negative sign is the entire physical story of SHM. Displace an object to the right — the force pulls it left. Displace it to the left — the force pushes it right. The further the object moves from equilibrium, the stronger the force pulling it back. This creates oscillation: the object overshoots equilibrium, slows down, gets pulled back, overshoots the other way, and repeats.

Not every oscillating motion is SHM. A ball bouncing, a swing pushed very high, or a pendulum with large amplitude — these don't qualify because the restoring force isn't proportional to displacement. SHM requires a linear restoring force. This is why the small angle approximation matters for pendulums, which we'll cover later.


The Two Classic SHM Systems

System 1: Mass on a Spring

A mass attached to a spring on a frictionless surface is the purest demonstration of SHM. Pull the mass to one side, release it, and it oscillates back and forth.

The restoring force is Hooke's Law: F = -kx

The period (time for one complete oscillation): T = 2π√(m/k)

The angular frequency: ω = √(k/m)

The frequency: f = 1/T = (1/2π)√(k/m)

Key insight: The period depends on mass and spring constant — but not on amplitude. Double the amplitude and the period stays exactly the same. This is the defining characteristic of SHM. A larger displacement creates a proportionally larger restoring force, which produces proportionally larger acceleration, which compensates exactly so the journey takes the same time.

This is why mechanical clocks using springs keep accurate time regardless of how tightly the spring is wound — within the elastic range.

System 2: Simple Pendulum

A pendulum bob on a massless string swinging through a small angle also exhibits SHM — but for a different reason, and with a different period formula.

For small angles (less than approximately 15°), the restoring force is approximately: F ≈ -mg(x/L)

Where x is horizontal displacement and L is string length. This is proportional to displacement — hence SHM.

The period: T = 2π√(L/g)

The angular frequency: ω = √(g/L)

Critical observation: Mass appears nowhere in the pendulum period formula. A 1kg bob and a 10kg bob on identical strings have identical periods. This is directly analogous to why heavy and light objects fall at the same rate — more mass means more gravitational force, but also more inertia, and these cancel exactly.

The small angle approximation: The pendulum only behaves as SHM for small angles (under ~15°). At larger angles the restoring force is no longer proportional to displacement — the motion is still periodic but not simple harmonic. The period becomes longer and amplitude-dependent. At 30° the error in using the SHM formula is about 4%. At 90° it's about 18%.


The Complete Set of SHM Equations

For a system undergoing SHM starting from maximum displacement:

Displacement: x(t) = A cos(ωt + φ)

Velocity: v(t) = -Aω sin(ωt + φ)

Acceleration: a(t) = -Aω² cos(ωt + φ) = -ω²x

Where:

  • A = amplitude (maximum displacement)
  • ω = angular frequency (rad/s)
  • t = time (s)
  • φ = phase constant (depends on initial conditions)

Maximum values: Maximum displacement: xₘₐₓ = A Maximum velocity: vₘₐₓ = Aω (at equilibrium) Maximum acceleration: aₘₐₓ = Aω² (at maximum displacement)

The relationship between velocity and position: v² = ω²(A² - x²) v = ω√(A² - x²)

This is one of the most useful equations — it lets you find velocity at any position without knowing time.


Energy in Simple Harmonic Motion

Energy in SHM continuously converts between kinetic and potential forms. The total mechanical energy is constant (assuming no damping): E = ½kA² (total energy, constant)

Kinetic energy at displacement x: KE = ½mv² = ½k(A² - x²)

Potential energy at displacement x: PE = ½kx²

At equilibrium (x = 0):

  • Potential energy = 0
  • Kinetic energy = maximum = ½kA²
  • Velocity = maximum = Aω

At maximum displacement (x = ±A):

  • Potential energy = maximum = ½kA²
  • Kinetic energy = 0
  • Velocity = 0

At any position: KE + PE = ½kA²

This energy interchange is why SHM continues indefinitely in the absence of damping. No energy is lost — it just converts forms continuously.


The Misconceptions That Cost Students Marks

1. "The object slows down as it approaches equilibrium"

This is exactly backwards. The object accelerates toward equilibrium — that's what the restoring force does — and is moving fastest at equilibrium. It decelerates after passing through equilibrium as it moves toward maximum displacement.

At equilibrium: maximum velocity, zero acceleration, zero potential energy, maximum kinetic energy. At maximum displacement: zero velocity, maximum acceleration, maximum potential energy, zero kinetic energy.

2. "Mass affects the pendulum period"

Mass does not appear in T = 2π√(L/g). A heavier bob and a lighter bob on the same length string have identical periods. More mass means more gravitational force — but also more inertia — and these cancel exactly. Galileo demonstrated this from the Tower of Pisa; the pendulum formula confirms it mathematically.

3. "Larger amplitude means longer period"

For true SHM, amplitude has no effect on period. Double the amplitude, the period stays the same. This is because larger amplitude means larger maximum restoring force, which produces larger acceleration, which exactly compensates for the longer distance traveled.

This fails at large amplitudes for a pendulum (beyond ~15°) because the motion is no longer truly SHM — the restoring force is no longer proportional to displacement.

4. "The spring constant k is just about stiffness"

k determines both the period and the total energy. A stiffer spring (larger k) gives shorter period and for the same amplitude stores more energy. Understanding k as the proportionality constant in F = -kx — not just a "stiffness number" — is key to using it correctly.

5. "Acceleration is zero at equilibrium"

Since F = -kx and x = 0 at equilibrium, F = 0 and therefore a = 0 at equilibrium. But velocity is maximum there — the object is passing through at full speed. Zero acceleration doesn't mean zero velocity. Students confuse the two constantly.

6. "SHM only applies to springs and pendulums"

SHM applies to any system with a linear restoring force. This includes:

  • Molecules vibrating in a solid
  • Electrical LC circuits (charge oscillates like displacement)
  • Sound waves (air pressure oscillates about equilibrium)
  • The up-and-down motion of a floating object
  • Atoms in a crystal lattice

Understanding SHM as a general principle — not just a spring-and-pendulum topic — is the difference between surface knowledge and real understanding.


Comparing Springs and Pendulums Side by Side

PropertySpring-MassSimple Pendulum
Restoring forceF = -kxF ≈ -mg(x/L)
PeriodT = 2π√(m/k)T = 2π√(L/g)
Depends on mass?YesNo
Depends on amplitude?No (true SHM)No (small angles only)
Depends on gravity?NoYes
What changes period?Increase m (longer), increase k (shorter)Increase L (longer)

This comparison table is worth memorizing — the differences between the two systems are a common exam question.


Damped Oscillations — What Happens in the Real World

Real oscillating systems always lose energy to friction, air resistance, or internal damping. This is called damped SHM.

Three types of damping:

Underdamped — the system oscillates with decreasing amplitude. This is what you see with a pendulum in air — it keeps swinging but gradually slows down. The period remains approximately the same while amplitude decays exponentially.

Critically damped — the system returns to equilibrium as fast as possible without oscillating. Car shock absorbers aim for this — you want the car to return to level quickly after a bump without bouncing.

Overdamped — the system returns to equilibrium slowly without oscillating. A door closer mechanism is often overdamped — the door closes without bouncing but takes longer than critically damped.

The decay of amplitude in underdamped oscillation follows: A(t) = A₀e^(-γt)

Where γ is the damping coefficient and A₀ is the initial amplitude.


Resonance — When Frequency Matters

If an external force drives an oscillating system at its natural frequency (ω₀ = √(k/m) for a spring), the amplitude grows dramatically. This is resonance.

The natural frequency of a spring-mass system: f₀ = (1/2π)√(k/m)

When the driving frequency matches f₀, energy transfers efficiently into the system and amplitude builds up.

Real-world examples:

  • A child on a swing pumped at the right frequency builds amplitude
  • The Tacoma Narrows Bridge collapsed in 1940 partly because wind drove it at its resonant frequency
  • MRI machines use resonance of hydrogen nuclei in a magnetic field
  • Musical instruments are designed so resonance amplifies specific frequencies

Anti-resonance is equally important in engineering — structures are deliberately designed to avoid resonance with common vibration sources (engines, wind, footsteps).


How to Use the OpenLabs Simulations for SHM

OpenLabs has two labs that directly demonstrate SHM — the Simple Pendulum and Hooke's Law lab. Here's how to use them to build real understanding:

Simple Pendulum Lab

Experiment 1 — Confirm that mass doesn't affect period Set a fixed length. Run the simulation with a small bob mass. Note the period. Double the mass. The period should be identical. This is the single most surprising result in SHM for most students — see it rather than just reading it.

Experiment 2 — Find the relationship between length and period Set mass constant. Try lengths of 0.25m, 1m, 4m. Record the periods. You should find T doubles when L quadruples — confirming T ∝ √L.

Experiment 3 — Test the small angle limit Start with a 5° amplitude and note the period. Increase to 30°, then 60°, then 90°. Watch the period increase at large angles as the motion deviates from true SHM.

Experiment 4 — Daily challenge The daily challenge in the pendulum lab gives you a specific target period to achieve by adjusting length and gravity. This forces you to apply T = 2π√(L/g) quantitatively under exam-like conditions.

OpenLabs Simple Pendulum Lab

Hooke's Law Lab

Experiment 1 — Verify F = kx Apply different forces and measure extension. Plot F vs x — it should be a straight line through the origin. The gradient is k.

Experiment 2 — Find the spring constant Use the gradient from Experiment 1. Then use T = 2π√(m/k) to predict the period of oscillation for a given mass. Set the mass oscillating and check your prediction.

Experiment 3 — Energy conservation Note the amplitude. Calculate total energy as ½kA². At equilibrium, calculate ½mv² and verify it equals ½kA². Energy should be conserved.

OpenLabs Hooke's Law Lab


Worked Examples

Example 1 — Spring Period

Problem: A 0.5kg mass is attached to a spring with k = 200 N/m. Find the period, frequency, and angular frequency of oscillation.

Solution: ω = √(k/m) = √(200/0.5) = √400 = 20 rad/s T = 2π/ω = 2π/20 = 0.314s f = 1/T = 1/0.314 = 3.18 Hz

Verify with simulation: Set m = 0.5kg, k = 200 N/m in the Hooke's Law lab. The period displayed should match 0.314s.

Example 2 — Pendulum Length

Problem: A pendulum has a period of 2 seconds on Earth (g = 9.8 m/s²). Find its length.

Solution: T = 2π√(L/g) 2 = 2π√(L/9.8) 1/π = √(L/9.8) 1/π² = L/9.8 L = 9.8/π² = 9.8/9.87 = 0.993 m ≈ 1 m

A 1-metre pendulum has a period of almost exactly 2 seconds — this is why 1-metre pendulums were historically used in clocks to mark seconds.

Example 3 — Velocity at a Position

Problem: A mass oscillates with amplitude A = 0.1m and ω = 10 rad/s. Find the velocity when x = 0.06m.

Solution: v = ω√(A² - x²) v = 10√(0.01 - 0.0036) v = 10√(0.0064) v = 10 × 0.08 v = 0.8 m/s

Example 4 — Energy Split

Problem: A spring (k = 500 N/m) oscillates with amplitude 0.04m. Find the kinetic and potential energy when x = 0.02m.

Solution: Total energy = ½kA² = ½ × 500 × 0.04² = ½ × 500 × 0.0016 = 0.4 J PE at x = 0.02m: ½kx² = ½ × 500 × 0.02² = ½ × 500 × 0.0004 = 0.1 J KE = Total - PE = 0.4 - 0.1 = 0.3 J

Check: at x = A/2, PE = ¼ of total energy, KE = ¾ of total energy. ✓


Common Exam Mistakes

Writing T = 2π√(m/k) for a pendulum. This is the spring formula. Pendulum period is T = 2π√(L/g). The formulas look similar but use completely different variables.

Forgetting the negative sign in F = -kx. The negative sign is physically meaningful — it indicates the restoring nature of the force. Leaving it out changes the direction of force.

Using the SHM pendulum formula for large angles. T = 2π√(L/g) is only valid for small angles (under ~15°). At larger angles the period is longer.

Confusing amplitude with displacement. Amplitude A is the maximum displacement — a fixed property of the oscillation. Displacement x varies continuously from -A to +A.

Thinking maximum velocity occurs at maximum displacement. Maximum velocity is at equilibrium (x = 0). Maximum acceleration is at maximum displacement (x = ±A).

Ignoring phase in calculations. x(t) = A cos(ωt + φ) — the phase φ depends on initial conditions. If the object starts from equilibrium moving right, φ = -π/2. If it starts from maximum displacement, φ = 0.


Why SHM Matters Beyond the Exam

Simple Harmonic Motion is the foundation of:

Wave mechanics — all waves (sound, light, water) can be understood as coupled SHM oscillators passing energy along

Quantum mechanics — the quantum harmonic oscillator is one of the most important models in quantum physics, governing atomic vibrations and photon emission

Engineering — structural analysis, vibration isolation, acoustic design, and seismic engineering all depend on SHM principles

Electronics — LC circuits oscillate exactly like mechanical SHM, with charge playing the role of displacement and current playing the role of velocity

Medical imaging — MRI uses resonance of hydrogen nuclei, a direct application of driven SHM at resonant frequency

Understanding SHM properly — not just memorizing the formulas — gives you the foundation to understand all of these fields.


Explore Simple Harmonic Motion in the OpenLabs Physics Labs — Simple Pendulum and Hooke's Law, free, no download required.


Have a specific SHM problem you're stuck on? Open either lab and ask the AI assistant — it understands which experiment you have open and can walk you through the physics in context.

Deep Dive Q&A

Frequently Asked Questions

Direct answers to core concepts discussed in this publication.

What is Simple Harmonic Motion in simple terms?
Simple Harmonic Motion is the back-and-forth oscillation of an object where the force pulling it back toward the centre is proportional to how far it has moved away. The further it moves from the middle, the stronger the pull back. This creates a smooth, repetitive motion that repeats with exactly the same period regardless of how far the object swings — as long as the motion stays within SHM conditions.
What is the difference between SHM and periodic motion?
All SHM is periodic motion, but not all periodic motion is SHM. Periodic motion just means the motion repeats at regular intervals. SHM is a specific type where the restoring force is proportional to displacement (F = -kx). A pendulum with small amplitude is SHM. A pendulum with large amplitude is periodic but not SHM. A bouncing ball is periodic but definitely not SHM.
Does mass affect the period of a pendulum?
No. The period of a simple pendulum is T = 2π√(L/g), which contains no mass term. A heavier bob and a lighter bob on the same length string have identical periods. This is because heavier objects have more gravitational force acting on them but also more inertia — the two effects cancel exactly, just as in free fall.
Why does a pendulum only show SHM at small angles?
For SHM, the restoring force must be proportional to displacement. For a pendulum, the restoring force is mg sin(θ). For small angles, sin(θ) ≈ θ (in radians), so the force is approximately proportional to displacement — SHM holds. At larger angles, sin(θ) is no longer proportional to θ, the approximation breaks down, and the motion is no longer simple harmonic. The period becomes longer and amplitude-dependent.
What happens to the period if you double the amplitude of a spring-mass system?
Nothing — the period stays exactly the same. This is a defining property of SHM. Doubling the amplitude doubles the maximum displacement and doubles the maximum restoring force, which doubles the maximum acceleration. The object moves further but accelerates proportionally harder, so the time for one complete oscillation is unchanged.
What is the relationship between SHM and waves?
Waves are essentially SHM propagating through a medium. Each point in a wave oscillates in simple harmonic motion, and the wave pattern you see is the result of many SHM oscillators with different phases. This is why the equations for SHM (sinusoidal displacement, velocity, acceleration) look identical to the equations for wave motion. Sound waves, light waves, and water waves all involve SHM at the particle level.
What is resonance in the context of SHM?
Resonance occurs when an external force drives a system at its natural frequency — the frequency at which it naturally oscillates. At resonance, energy transfers efficiently into the system and amplitude builds dramatically. A swing pumped at the right rhythm, a wine glass shattering from a singer's note, and the Tacoma Narrows Bridge collapse are all resonance phenomena.
What is damped SHM?
Damped SHM is oscillation where energy is gradually lost to friction or air resistance, causing amplitude to decrease over time. The period remains approximately constant while the oscillations die away. There are three types: underdamped (oscillates with decreasing amplitude), critically damped (returns to equilibrium as fast as possible without oscillating), and overdamped (returns to equilibrium slowly without oscillating).
How do you find velocity at a specific position in SHM without knowing time?
Use the energy equation: v = ω√(A² - x²), where A is amplitude, x is current displacement, and ω is angular frequency. This gives you velocity directly from position without needing to know where in the cycle the object is time-wise. It comes from energy conservation: total energy = KE + PE → ½kA² = ½mv² + ½kx².
Where can I see Simple Harmonic Motion in action interactively?
The OpenLabs Simple Pendulum and Hooke's Law labs both demonstrate SHM with real-time parameter control. Adjust length, mass, spring constant, and amplitude and watch period, velocity, and energy respond instantly. Both labs also feature daily AI-generated challenges that give you specific targets to hit — bridging the gap between visual understanding and exam-level calculation.
Interactive Science Sandbox

Experience The Science Live In Your Browser

Put this theory into practice. Explore 94 free virtual STEM simulations with real-time numerical graphs.

Sponsored Recommendations
Continue Reading

Related Publications

View All Articles