Simple Harmonic Motion
A mass on a spring with live position, velocity and energy graphs
Drag the block left or right to set the starting displacement, then let go. The dot on the circle moves at a constant angular speed ω; its horizontal shadow is the block's position.
Energy
What is simple harmonic motion?
A spring pulls back on a mass with a force proportional to how far it is stretched or squashed. This is Hooke's law, F = −kx. The minus sign means the force always points back toward equilibrium. Combine it with Newton's second law and you get a = −(k/m)x: the acceleration is proportional to the displacement and opposite to it.
Any system that obeys this rule oscillates sinusoidally, x(t) = A cos(ωt + φ). The amplitude A depends on how you start the motion, but the period does not: a stiffer spring (bigger k) makes it faster, and a heavier mass (bigger m) makes it slower. Doubling the amplitude does not change the period at all.
Velocity and acceleration are also sinusoids. Velocity is a quarter cycle ahead of position, so the mass is fastest as it passes through x = 0. Acceleration is exactly opposite to position, so it is largest at the turning points where the mass momentarily stops.
The reference circle under the spring shows why the motion is a cosine. A point going round a circle of radius A at constant angular speed ω has a horizontal coordinate A cos(ωt). Its shadow on the horizontal axis moves exactly like the mass, which is why ω is called the angular frequency even though nothing is rotating.
Key formulas
Equation of motion
F = −kx ⇒ a = −(k/m) x = −ω²x
- k
- spring constant (N/m)
- m
- mass (kg)
Solution
x(t) = A cos(ωt + φ)
- A
- amplitude (m)
- φ
- phase constant, set by the starting conditions
Angular frequency, period and frequency
ω = √(k/m), T = 2π√(m/k), f = 1/T
Velocity, acceleration and energy
vmax = Aω, amax = Aω², E = ½mv² + ½kx² = ½kA²
How to use this visualizer
- 1Drag the blue block left or right to set the starting displacement, then let go. It is released from rest, so that displacement is the amplitude.
- 2Change the mass and spring constant and watch ω, T and f update. Quadruple the mass and the period doubles.
- 3Compare the graph traces: v (green) peaks a quarter period before x (blue), and a (orange) is always the mirror image of x.
- 4Watch the energy bars. Kinetic and spring potential energy trade places twice per cycle while the total stays at ½kA².
- 5Follow the dot on the reference circle. Its horizontal position always matches the block.
Real-world applications
Clocks and watches
Buildings and bridges
Musical instruments
Vehicle suspension
Practice problems
Problem 1: Period of a spring
Show solutionHide solution
ω = √(k/m) = √(200 / 0.50) = √400 = 20 rad/s
T = 2π/ω = 2π / 20 = 0.314 s
f = 1/T = 3.18 Hz
ω = 20 rad/s, T ≈ 0.31 s, f ≈ 3.2 Hz
Problem 2: Maximum speed from energy
Show solutionHide solution
Total energy: E = ½kA² = ½ × 50 × 0.10² = 0.25 J
At x = 0 all of it is kinetic: ½mvmax² = 0.25 J
vmax = √(2 × 0.25 / 2.0) = 0.50 m/s (check: Aω = 0.10 × √(50/2) = 0.50 m/s)
At x = 0.06 m: ½mv² = 0.25 − ½ × 50 × 0.06² = 0.25 − 0.09 = 0.16 J
v = √(2 × 0.16 / 2.0) = 0.40 m/s
vmax = 0.50 m/s, v(0.06 m) = 0.40 m/s
Discussion
Questions, ideas or a different approach? Join the conversation.