
What will you understand?
- Connect Hooke’s law to simple harmonic motion.
- Predict how mass and spring stiffness change oscillation period.
- Observe the exchange between kinetic and elastic potential energy.
How the simulation works
The restoring force
For an ideal Hookean spring displaced a distance x from equilibrium, F = −kx. Newton’s second law then gives m x″ = −kx, whose undamped solution is x(t) = A cos(ωt) for a mass released from rest at amplitude A.
Period and mass
Angular frequency ω equals √(k/m), and the period T equals 2π√(m/k). Increasing mass slows the oscillation; increasing stiffness makes it faster. Changing amplitude does not change the period in the ideal model.
Energy conservation
The elastic potential energy is ½kx² and the kinetic energy is ½mv². Their sum remains constant when there is no friction or damping.
Use the controls above to change the relevant parameters. All displayed values follow the assumptions stated on this page.
Three experiments to try
- Double the mass and compare the period with the original value.
- Increase the spring stiffness while keeping mass fixed; notice the spring oscillates faster.
- Watch the energy bar when the block crosses equilibrium versus the turning points.
Calculate it before you visualize it
For m = 2 kg and k = 50 N/m, ω = √(50/2) = 5 rad/s and T = 2π/5 ≈ 1.257 s. If the initial displacement is 0.40 m, total mechanical energy is ½ × 50 × 0.40² = 4 J.
Can you predict the result?
If the mass becomes four times larger while the spring stiffness stays fixed, what happens to the period?
Reveal the answer
The period doubles because T is proportional to the square root of mass.
What the model does not show
An ideal one-dimensional horizontal oscillator with a massless Hookean spring, frictionless surface and no damping, spring collisions, deformation limits or external driving. The visible spring shape is a schematic drawing.
Science sources
This teaching implementation follows idealized textbook models. It is designed for exploration and should not be used for engineering design or safety decisions.
OpenStax University Physics Vol. 1 — Simple Harmonic Motion ↗
Model implementation: MG Labs teaching model. Independent subject-matter review and classroom testing are still pending.