Skip to main content
Sandbox Physics

M061 · Timing a spring

Mass–Spring Oscillator

What sets the period of a mass bouncing on a spring? Mass and spring stiffness set the period: four times the mass doubles it. Amplitude does not change it. Hanging the spring vertically only moves the equilibrium point down; gravity leaves the stiffness, and with it the period, unchanged.

Set a frictionless cart or a hanging mass oscillating on the same calibrated spring, and view it from any angle in three dimensions. Drag the mass or give it a kick, time its crossings through equilibrium in the positive direction, and compare the measured period with the exact solution. A phase-space plot with equal scales shows what amplitude and gravity really change.

Interactive modelMass–Spring Oscillator
Signed spring force along motion0 N0\,N
Acceleration along motion0 m/s20\,\mathrm{m/s^2}
Instantaneous actuator power0 W0\,W
Instantaneous dissipated power0 W0\,W
Elapsed time0 s0\,\mathrm{s}
Displacement from equilibrium0 m0\,\mathrm{m}
Velocity0 m s−10\,\mathrm{m\,s^{-1}}
Undamped reference period0 s0\,\mathrm{s}
Mechanical energy relative to equilibrium0 J0\,\mathrm{J}
Integrated dissipation0 J0\,\mathrm{J}
Integrated drive work0 J0\,\mathrm{J}
Energy balance defect0 J0\,\mathrm{J}
Position error against exact solution0 m0\,\mathrm{m}
Endpoint change with half step0 m0\,\mathrm{m}
Actual integration step0 ms0\,\mathrm{ms}
Period from positive-going crossingsCollecting\text{Collecting}
Gravity-induced static extension0 m0\,\mathrm{m}
Amplitude from the release state0.3 m0.3\,\mathrm{m}

Physics tutorial

A spring as a clock

BackgroundA linear spring pulls back with a force proportional to its stretch. Its motion repeats with a steady period, so it can serve as a clock: with a known mass it measures the stiffness, and with a known spring it measures the mass. Comparing the horizontal cart with the hanging mass shows directly what gravity changes.

Why it mattersSection 15.1 of OpenStax University Physics Volume 1 gives the ideal simple harmonic solution. This Lab shows that exact solution next to a crossing timer, a phase-space plot and a numerical trajectory solved on its own.

Start with the essentials

Focus question
Does a larger amplitude, a heavier mass or a stronger gravity change the period?
One-sentence intuition
Measure the period from the motion itself before comparing it with theory. Gravity shifts where a hanging spring rests, but not its stiffness around that point.

Core mathematical model

Where the spring rests, and the equation of motion

ℓeq−ℓ0=mgk,mx¨+kx=0\ell_{\mathrm{eq}}-\ell_0=\frac{mg}{k},\qquad m\ddot x+kx=0

Gravity shifts the equilibrium of a vertical spring, but the equation for displacement from equilibrium stays the same. Displacement is positive downward when hanging and to the right on the track.

Period and the solution for any release

ω0=km,T0=2πω0,x(t)=x0cos⁡(ω0t)+v0ω0sin⁡(ω0t)\omega_0=\sqrt{\frac{k}{m}},\quad T_0=\frac{2\pi}{\omega_0},\quad x(t)=x_0\cos(\omega_0t)+\frac{v_0}{\omega_0}\sin(\omega_0t)

Mass and stiffness set the period. In the ideal linear model, amplitude and release phase have no effect on it.

Energy and the phase-space circle

E=12mv2+12kx2=12kA2,x2+(vω0)2=A2E=\frac12mv^2+\frac12kx^2=\frac12kA^2,\qquad x^2+\left(\frac v{\omega_0}\right)^2=A^2

Dividing velocity by the natural angular frequency gives both phase-space axes units of length. With equal scales the path is a circle; plotting raw position against velocity generally gives an ellipse.

Measuring the period from zero crossings

T^=t↑,N−t↑,1N−1,N≥2\widehat T=\frac{t_{\uparrow,N}-t_{\uparrow,1}}{N-1},\qquad N\ge2

The clock times each moment the numerical trajectory crosses zero in the positive direction, locating it by linear interpolation; it never reads the known period. A mass at rest has no crossings, so it has no measured period.

Why gravity drops out for a hanging spring

ΔUs=12kx2+mgx,ΔUg=−mgx,Fs+mg=−kx\Delta U_s=\tfrac12kx^2+mgx,\quad\Delta U_g=-mgx,\quad F_s+mg=-kx

Measure the spring and gravitational energy changes from equilibrium, and their linear terms cancel. The spring force by itself is not the net force.

Common difficulties

Amplitude does not set the period

Typical misconceptionIf I pull it farther, it must swing more slowly.

Better mental modelCompare two amplitudes with the same mass and stiffness. In this linear model the periods are equal.

Equilibrium is not the natural length

Typical misconceptionA hanging spring oscillates around its unstretched length.

Better mental modelThe spring stretches until it holds up the weight. Measure displacement from that lower equilibrium point.

No motion, no measured period

Typical misconceptionThe clock should show the theoretical period even when nothing moves.

Better mental modelSet both the release displacement and the velocity to zero. The theoretical period is still defined, but the timer has no crossings to time and reports that the mass is stationary.

Run the experiment

  1. 01

    Time the horizontal cart

    Choose the horizontal preset and measure eight periods.

    What to observe: The measured period agrees with the exact period, and the total energy stays constant.
  2. 02

    Change the mass and the release

    Double the mass, then compare a larger release with a kick at equilibrium.

    What to observe: The mass changes the period. Amplitude and release phase change the size of the circle or where it starts.
  3. 03

    Move the equilibrium point

    Choose vertical suspension and vary gravity. Use energy review and fine steps to compare the forces during the same motion.

    What to observe: The static stretch changes, but the period and the energy relation measured from equilibrium stay the same.
  4. 04

    Check the numerical solution

    Reduce the maximum step, then look at the error against the exact position and at how much the endpoint moves when the step is halved.

    What to observe: The step in use may already be capped for stability. The refinement test halves that actual step.
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy