SHM Explorer
A spring-mass and pendulum oscillate while a sine curve and energy bars track them.
About this simulation
Pick mass and spring constant (or pendulum length) and pull to an amplitude; the oscillator traces x = A·cos(ωt) on a live graph while a KE↔PE bar shows energy sloshing between kinetic and potential with the total held fixed. Students see directly why heavier masses swing slower and why energy — not position — is what is conserved.
How to use it
- With Oscillator set to Spring, watch the block move between the dashed ±A marks while its displacement is traced as x(t); the shaded strip on the graph is one period T.
- Raise the Mass slider, or tap Heavier mass, and see the block swing more slowly; raise the Spring constant, or tap Stiffer spring, and it speeds up. The graph holds the last four seconds, so a heavier mass draws wider waves; read T at the top of the stage or off the second ticks.
- Watch the KE and PE bars: kinetic energy peaks as the block passes equilibrium and potential energy peaks at the turning points.
- Switch Oscillator to Pendulum and change Pendulum length, or tap Long pendulum, then change Mass and notice the bob keeps the same pace.
- Increase the Damping slider, or tap Damped, and see the oscillations shrink inside the dashed decay curves on the graph.
What to notice
- Changing the Amplitude changes v_max, a_max and total energy, but not the period. On a short pendulum the swing is held to 15°, the limit of the small-angle model.
- A heavier block on the same spring oscillates more slowly: T grows as √m.
- A simple pendulum's period depends on its length and g, not on the mass of the bob.
- Energy swaps between kinetic and potential every half cycle while their sum stays fixed, until damping drains it.
The formulas
- T = 2π√(m / k)
- Period T of a mass m on a spring of spring constant k.
- T = 2π√(L / g)
- Period T of a simple pendulum of length L for small swings, with g = 9.8 m/s².
- E = ½kA², v_max = Aω
- Total energy E and maximum speed v_max for amplitude A, spring constant k and angular frequency ω = 2π/T.
Questions
Why does the time period of SHM not depend on amplitude?
In SHM the restoring force is proportional to displacement, F = −kx. Pull the mass twice as far and the force pulling it back is twice as large, so it travels twice the distance at twice the speed and takes the same time. That is why T = 2π√(m/k) has no A in it. In the simulation, change Amplitude and the block keeps the same rhythm while it travels further and faster, and the KE and PE energy figures grow.
Why does the period of a simple pendulum not depend on the mass of the bob?
The restoring force on the bob is mg sin θ, proportional to its mass, and the inertia resisting that force is also its mass. The two cancel, leaving an acceleration that depends only on g and L, so T = 2π√(L/g). In the simulation, select Pendulum and change Mass: the bob keeps the same pace, though the KE and PE energy values change.
At which position is the speed maximum and the acceleration maximum in SHM?
Speed is greatest at the equilibrium position, where all the energy is kinetic and the restoring force is zero, so the acceleration there is zero. At the extreme positions the speed is zero and the displacement, force and acceleration are greatest, a_max = ω²A. In the simulation, the KE bar is full as the block crosses the equilibrium line and the PE bar is full at the ±A marks.
What happens to the amplitude and energy of a damped oscillator?
Damping forces such as friction or air resistance remove energy every cycle, so the amplitude decreases, roughly exponentially with time for light damping. The motion still repeats at nearly the same period, slightly longer than without damping. In the simulation, set the Damping slider above zero and the x(t) trace stays inside dashed curves that close in over time, while the KE and PE bars both fade.
Why is the pendulum formula valid only for small angles?
The restoring force on a pendulum is mg sin θ. Only when θ is small is sin θ ≈ θ, which makes the force proportional to displacement and the motion simple harmonic, giving T = 2π√(L/g). At larger angles the period becomes longer than this formula predicts. The simulation uses this small-angle model, so it holds the swing to 15° or less, and says so under the pendulum when it has shortened the Amplitude you set.