Simple Harmonic Motion: Mass on a Spring

April 12, 2026

Problem

A 2 kg mass attached to a spring with k = 50 N/m oscillates. Show position, velocity, and acceleration over time.

Explanation

A mass on a spring is the canonical example of simple harmonic motion (SHM). Hooke's law gives a restoring force proportional to displacement, and Newton's Second Law turns that into the harmonic equation:

mx¨=kxm\,\ddot x = -k\,x

The solutions are pure sinusoids with angular frequency:

ω=km\omega = \sqrt{\dfrac{k}{m}}

This ω\omega depends only on the mass and spring constant — not on the amplitude. That's the beautiful and surprising property of SHM: a small swing and a large swing complete in the same time.

The Position, Velocity, Acceleration

If you release the mass from rest at x=Ax = A, the motion is:

x(t)=Acos(ωt)x(t) = A\cos(\omega t)

v(t)=Aωsin(ωt)v(t) = -A\omega\sin(\omega t)

a(t)=Aω2cos(ωt)=ω2x(t)a(t) = -A\omega^{2}\cos(\omega t) = -\omega^{2}\,x(t)

The position and acceleration are 180° out of phase: when xx is at its maximum, aa is at its minimum (most negative). The velocity is 90° out of phase with both — maximum when xx is zero, zero when xx is at its extremes.

Step-by-Step Solution

Given: m=2  kgm = 2\;\text{kg}, k=50  N/mk = 50\;\text{N/m}, amplitude A=0.2  mA = 0.2\;\text{m}, released from rest at x=Ax = A.

Find: ω\omega, TT, ff, and the maximum velocity and acceleration.


Step 1 — Compute the angular frequency.

ω=km=502=25=5  rad/s\omega = \sqrt{\dfrac{k}{m}} = \sqrt{\dfrac{50}{2}} = \sqrt{25} = 5\;\text{rad/s}

Step 2 — Compute the period and frequency.

T=2πω=2π51.257  sT = \dfrac{2\pi}{\omega} = \dfrac{2\pi}{5} \approx 1.257\;\text{s}

f=1T=11.2570.796  Hzf = \dfrac{1}{T} = \dfrac{1}{1.257} \approx 0.796\;\text{Hz}

So the mass completes about 0.796 cycles per second — or one cycle every 1.26 seconds.

Step 3 — Compute the maximum velocity.

The maximum speed occurs at the center (x=0x = 0), where all the energy is kinetic:

vmax=Aω=(0.2)(5)=1.000  m/sv_{\max} = A\omega = (0.2)(5) = 1.000\;\text{m/s}

Step 4 — Compute the maximum acceleration.

The maximum acceleration occurs at the extremes (x=±Ax = \pm A), where the spring is most stretched/compressed:

amax=Aω2=(0.2)(25)=5.000  m/s2a_{\max} = A\omega^{2} = (0.2)(25) = 5.000\;\text{m/s}^{2}

Step 5 — Verify with energy conservation.

The total energy is 12kA2=12(50)(0.04)=1.0  J\tfrac{1}{2}kA^{2} = \tfrac{1}{2}(50)(0.04) = 1.0\;\text{J}.

At the center, all of that is kinetic: 12mvmax2=12(2)(1)=1.0  J\tfrac{1}{2}m v_{\max}^{2} = \tfrac{1}{2}(2)(1) = 1.0\;\text{J}. ✓

Step 6 — A surprise: ω\omega doesn't depend on amplitude.

If you doubled the amplitude (released from x=0.4  mx = 0.4\;\text{m} instead), the period would be the same T1.257  sT \approx 1.257\;\text{s}. The mass moves twice as fast at the center but has twice as far to go — those exactly cancel.

This isochronism is what made pendulum clocks possible: a clock's accuracy doesn't depend on whether you wind it tightly or loosely.


Answer:

  • ω=k/m=5  rad/s\omega = \sqrt{k/m} = 5\;\text{rad/s}
  • T=2π/ω1.257  sT = 2\pi/\omega \approx 1.257\;\text{s}
  • f=1/T0.796  Hzf = 1/T \approx 0.796\;\text{Hz}
  • vmax=Aω=1.000  m/sv_{\max} = A\omega = 1.000\;\text{m/s}
  • amax=Aω2=5.000  m/s2a_{\max} = A\omega^{2} = 5.000\;\text{m/s}^{2}

The mass oscillates back and forth, completing one full cycle every 1.257 seconds. Position, velocity, and acceleration are all sinusoidal but shifted in phase from each other.

Try It

  • Adjust the mass, spring constant, and amplitude sliders.
  • Watch the spring physically oscillate and the three sinusoidal traces (position cyan, velocity pink, acceleration yellow) drawn beside it.
  • Notice that changing the amplitude does not change the period — that's the SHM signature.
  • Doubling k with same m shrinks the period by 2\sqrt{2}.
  • Doubling m with same k stretches the period by 2\sqrt{2}.

Interactive Visualization

Parameters

2.00
50.00
0.20
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Simple Harmonic Motion: Mass on a Spring | MathSpin