Skip to content
Tutorials Center
My learning

Topics

Lesson 7 of 38 · Oscillations and Simple Harmonic Motion

The Mass-Spring System

Derive and use the period of a mass on a spring, T = 2π√(m/k). Learn how mass and stiffness change the frequency, with worked examples and code.

A mass attached to a spring is the classic example of simple harmonic motion. It is easy to picture, easy to test in a lab, and it gives a formula you can use directly: the period depends on the mass and on the stiffness of the spring, and on nothing else. This lesson shows where the formula comes from and how to use it.

Setting up

A mass m rests on a smooth horizontal surface, attached to a spring of spring constant k. When the spring is neither stretched nor compressed, the mass sits at equilibrium. Pull it a distance x and release it. The only horizontal force is the spring force F = −kx.

By Newton's second law, F = ma, so

Text
ma = −kx   →   a = −(k/m) x

Compare with the SHM condition a = −ω²x. They match when

Text
ω² = k/m     →     ω = √(k/m)

Since T = 2π/ω, the period is

Text
T = 2π √(m/k)        f = (1/2π) √(k/m)

What the formula tells you

  • A larger mass gives a longer period (slower oscillation), because heavier objects accelerate less for the same force.
  • A stiffer spring (larger k) gives a shorter period, because the force is bigger for the same stretch.
  • The amplitude does not appear, so the period is the same for small or large stretches (within Hooke's law).
  • To double the period, quadruple the mass: T ∝ √m.

Worked example 1

A mass of 0.50 kg is attached to a spring with k = 200 N/m. Find the period and frequency.

T = 2π√(0.50/200) = 2π√0.0025 = 2π × 0.050 = 0.314 s f = 1/T = 3.18 Hz

Worked example 2

A mass oscillates with period 0.80 s on a spring with k = 50 N/m. Find the mass.

Rearrange T = 2π√(m/k): m = k T² / (4π²) = 50 × 0.64 / 39.48 = 0.81 kg.

Python Mass-spring period calculator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that going from 0.50 kg to 2.00 kg (four times) only doubles the period.

Vertical springs

For a mass hanging from a vertical spring, gravity stretches the spring to a new equilibrium. Measured from that new equilibrium, the motion is still SHM with the same formula T = 2π√(m/k). Gravity only shifts the centre of the motion; it does not change the period.

Finding k in the lab (a method)

Hang masses on a spring and measure the extension each time. By Hooke's law, weight mg = kx, so the graph of weight against extension is a straight line with gradient k. Alternatively, time the oscillations of a known mass: k = 4π² m / T². In both cases, time many cycles (say 20) and divide to reduce the timing error. The numbers below are invented practice data, not a real measurement.

Python Find k from period data (practice numbers)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The values of k come out close to each other, as they should for one spring. If the numbers disagreed wildly you would suspect a timing mistake.

Springs in combination

Two springs side by side (parallel) share the load, so the effective constant is bigger: k = k₁ + k₂. Two springs end to end (series) are softer: 1/k = 1/k₁ + 1/k₂.

Arrangement Effective constant
Parallel k₁ + k₂
Series k₁k₂ / (k₁ + k₂)

Two identical 100 N/m springs in parallel behave like one 200 N/m spring; in series they behave like one 50 N/m spring.

Simulating and comparing

Python Compare oscillations for three masses

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A mass of 0.20 kg oscillates on a spring with k = 80 N/m. What is the period?

    T = 2π√(m/k) = 2π√(0.20/80) = 2π × 0.05 = 0.314 s.
  2. 2. The mass on a spring is increased by a factor of 4. What happens to the period?

    T is proportional to √m, so four times the mass gives a period twice as long.
  3. 3. Two identical springs are connected in parallel. How does the effective spring constant compare with one spring?

    In parallel the spring constants add: k = k₁ + k₂ = 2k₁.
  4. 4. A mass hangs on a vertical spring. Does gravity change the period of its oscillations?

    Gravity changes the equilibrium position but the SHM about it still has T = 2π√(m/k).

Summary

  • For a mass on a spring, ω = √(k/m), T = 2π√(m/k), f = (1/2π)√(k/m).
  • A larger mass lengthens the period; a stiffer spring shortens it; amplitude does not matter.
  • Gravity does not change the period of a vertical spring system.
  • Springs in parallel add k; in series, 1/k values add.

Next: The Simple Pendulum