Spring Pendulum — Oscillation Simulator | Physlabo
Loading...

Spring Pendulum: Why the Mass Swings and What Sets the Period

Pull the mass and let go — the spring swings it along a sinusoid. Turn the stiffness and the mass, fly to the Moon or into weightlessness, switch on the drag of the medium — and see the main thing: the period T = 2π√(m/k) depends neither on the size of the swing nor on the acceleration of gravity.

The idea in 30 seconds

1

The spring pulls back

Pull the mass — the spring resists and pulls it back; compress it — the spring pushes it out. The farther you pull, the harder it pulls: F = −kx. The “minus” means that the force always points to the equilibrium position, where the mass “wants” to return.

2

Speeding up, flying through, slowing down

Toward equilibrium the mass speeds up, and at equilibrium the force is zero — but the speed is greatest there, so the mass flies on by inertia. Now the spring brakes it from the other side, it stops at the extreme point (force greatest, speed zero) and goes back. Meanwhile the energy flows: Ep ⇄ Ek.

3

The period — only k and m

The time of one swing T = 2π√(m/k) does not depend on how far the mass was pulled: pulled farther, it speeds up more, and the time is the same. A heavy mass swings slower, a stiff spring faster. The period does not depend on g either: on the Moon and in weightlessness it is the same.

Try it yourself

  1. Press “A ×2”: the mass travels twice as far, but the period stays the same — look at the time marks on the strip and at the T(A) graph: the point slides along a horizontal line.
  2. Press “m ×4”: the mass is 4 times heavier, yet it swings only 2 times slower — that is the root in T = 2π√(m/k). The same with “k ×4”.
  3. Switch between “Earth”, “Moon”, “Jupiter” and “Weightlessness”: the spring sags differently (Δl = mg/k), but the period is the same. A mathematical pendulum is different — its period T = 2π√(l/g) depends on g.
  4. Choose “Air”, “Oil”, “Honey”: watch the red column (heat Q) grow and the sinusoid die out. In honey there is no oscillation at all — the mass just creeps to equilibrium.
  5. Press “Compare”: a second mass with half the amplitude hangs next to the first. It is slower in speed, yet both reach equilibrium and the extreme points at the same time.

Where you meet it in life

  • A car suspension: a spring plus a shock absorber. The spring gives oscillations, the shock absorber (a viscous medium, like “Oil”) damps them — otherwise the car would keep rocking after every bump.
  • Space “scales”: on a station everything is weightless, so an astronaut cannot be weighed. They sit on a spring seat and the period T = 2π√(m/k) is measured — the mass is found from it.
  • A trampoline and bungee jumping: the elastic net or cord is the same spring with the force F = −kx. The stiffer it is and the lighter the jumper, the more often they bounce.

Graphs: the same in numbers

The curves are built from exact formulas. The bright part is what has already happened, the pale one is what will happen; the vertical dashed line is “now”. The colours match the scene: orange is Ep, green is Ek, red is the heat Q.

Where is the mass at each moment? x(t)
How fast does it move? v(t)
Where does the energy go? E(t)
The energy “well” Ep(x): the mass rolls on a parabola
How does the period depend on k? T(k)
How does the period depend on the amplitude? T(A)
20 N/m
1,0 kg
0,15 m
Where is the experiment? (acceleration g)
Medium (resistance)
0,00
Quick experiments
1×
Show

Any change of the parameters releases the mass from rest again. The motion is computed from exact formulas, so the period and the amplitude never drift, whatever the frame rate.

KEY FORMULAS

Period of a spring pendulum

$$T = 2\pi\sqrt{\frac{m}{k}}$$

The time of one full swing depends only on the mass and the stiffness — not on the amplitude and not on g

▶ Detailed Explanation
The period is the time of one full oscillation. It is proportional to the square root of the mass and inversely proportional to the square root of the stiffness: the heavier the mass, the slower; the stiffer the spring, the faster. Numbers from the simulator: k = 20 N/m, m = 1 kg → T = 2π√(1/20) ≈ 1.40 s, f = 1/T ≈ 0.71 Hz. Mass ×4 — period ×2 (T ≈ 2.81 s); stiffness ×4 — period ÷2 (T ≈ 0.70 s). The amplitude A and the acceleration g are not in the formula: pull the mass by 5 cm or by 25 cm, run the experiment on Earth, on the Moon or in weightlessness — T stays 1.40 s. This is isochronism. Note the difference from a mathematical pendulum, where T = 2π√(l/g) depends on g.

Angular frequency and frequency

$$\omega = \sqrt{\frac{k}{m}} = 2\pi f = \frac{2\pi}{T}$$

ω is how many radians the phase covers per second; f is how many full swings per second

▶ Detailed Explanation
ω shows how fast the phase changes: in one period the phase covers 2π, hence ω = 2πf = 2π/T. Units: ω in rad/s, f in Hz (1/s). For a spring pendulum ω = √(k/m) depends on just two parameters: k ×4 → ω ×2, m ×4 → ω ÷2. For k = 20 N/m, m = 1 kg: ω ≈ 4.47 rad/s. The greatest speed of the mass is vmax = Aω, the greatest acceleration amax = Aω²: for A = 0.15 m these are 0.67 m/s and 3.0 m/s². These are the numbers the simulator shows in the “Measurements” tab, and the readings at equilibrium and at the extreme points can be checked against them.

The law of harmonic oscillations

$$\begin{aligned} x(t) &= A\cos\omega t \\ v(t) &= -A\omega\sin\omega t \\ a(t) &= -A\omega^{2}\cos\omega t \end{aligned}$$

Displacement follows a cosine, velocity a sine (a quarter of a period ahead), acceleration is the displacement with the opposite sign

▶ Detailed Explanation
The mass is pulled by A and released without a push — then x(t) = A·cos(ωt). The velocity is the derivative of the displacement: v = −Aω·sin(ωt); the acceleration is the derivative of the velocity: a = −Aω²·cos(ωt) = −ω²x. When |x| is greatest (the extreme points), v = 0; when x = 0, |v| is greatest. The chart-recorder strip in the simulator draws exactly this cosine: the mass leaves a trace while the paper moves sideways. The simulator computes the motion by these formulas rather than by integration, so the period and the amplitude accumulate no error, and the moments of passing equilibrium (ωt = π/2 + nπ) and the extreme points (ωt = nπ) are known exactly.

Elastic (restoring) force

$$F = -kx,\qquad ma = -kx \;\Rightarrow\; a = -\frac{k}{m}\,x$$

The force is proportional to the displacement and always points toward the equilibrium position

▶ Detailed Explanation
Hooke's law: F = −kx. The minus is the whole point: the force points against the displacement. Pull the mass down (x > 0) — the force pulls up (F < 0); lift it up (x < 0) — the force pulls down. That is why it is called restoring: it does not let the mass fly away. Substitute into ma = F: a = −(k/m)x — the acceleration is proportional to the displacement and opposite in sign; this is the definition of harmonic oscillation. Example: k = 20 N/m, x = 0.15 m → F = 3.0 N. In the simulator this is the orange arrow F: near the extreme points it is the longest, at equilibrium it vanishes. With gravity taken into account F is the net force of the spring and gravity (see the formula Δl = mg/k).

Equilibrium under gravity: Δl = mg/k

$$\begin{aligned} mg &= k\,\Delta l \;\Rightarrow\; \Delta l = \frac{mg}{k} \\ F_{\text{net}} &= mg - k(\Delta l + x) = -kx \end{aligned}$$

Gravity only shifts the equilibrium position: oscillations about it obey the same law F = −kx

▶ Detailed Explanation
A vertical spring with a mass is stretched by gravity until the spring force balances mg: kΔl = mg. This is the equilibrium position, and x is measured from it. For m = 1 kg, k = 20 N/m: on Earth Δl = 9.8/20 = 0.49 m; on the Moon (g = 1.62 m/s²) Δl ≈ 0.081 m; on Jupiter (g = 24.8 m/s²) Δl ≈ 1.24 m; in weightlessness Δl = 0. Displace the mass by x from equilibrium — the net force is mg − k(Δl + x) = −kx: g has cancelled out. So T = 2π√(m/k) is the same on the Moon, on Earth and in weightlessness. On space stations an astronaut's mass is measured exactly this way: by the period of oscillation on a spring, because weighing is impossible in weightlessness.

Energy exchange in oscillations

$$E = \frac{kA^2}{2} = \underbrace{\frac{kx^2}{2}}_{E_{\text{p}}} + \underbrace{\frac{mv^2}{2}}_{E_{\text{k}}} = \text{const}$$

The total energy of the oscillation is constant: potential turns into kinetic and back

▶ Detailed Explanation
The potential energy Ep = kx²/2 depends only on the displacement, the kinetic energy Ek = mv²/2 only on the velocity, and their sum equals the energy invested by pulling the mass to the amplitude: E = kA²/2. At the extreme points x = ±A, v = 0 — all the energy is potential; at equilibrium x = 0, |v| = Aω — all of it is kinetic. For k = 20 N/m, A = 0.15 m: E = 0.225 J, vmax = 0.67 m/s — exactly the numbers the simulator shows. On a vertical spring Ep is the elastic energy and the energy in the gravity field together, counted from the equilibrium position. On the graphs the orange curve is Ep, the green one is Ek, the dashed line is their sum. On the “well” Ep(x) the mass rolls on a parabola, and the gap up to the level E is Ek.

Damped oscillations

$$\begin{aligned} x(t) &= A\,e^{-\gamma t}\!\left(\cos\omega_d t + \frac{\gamma}{\omega_d}\sin\omega_d t\right) \\ \gamma &= \zeta\omega,\quad \omega_d = \omega\sqrt{1-\zeta^2},\quad \zeta = \frac{b}{2\sqrt{km}} \end{aligned}$$

The drag of the medium damps the oscillations: the swing decays exponentially and the energy goes into heat

▶ Detailed Explanation
The force of a viscous medium is F = −bv. The number ζ = b/(2√(km)) shows how “thick” the medium is. For ζ < 1 the mass swings, the swing decays as e^(−γt), and the frequency is slightly lower: ωd = ω√(1−ζ²). For k = 20 N/m, m = 1 kg and ζ = 0.25 (the “Oil” setting): ωd ≈ 4.33 rad/s, Td ≈ 1.45 s (instead of 1.40 s), and the energy halves every ≈ 0.31 s. At ζ = 1 the damping is critical: the mass reaches equilibrium fastest without oscillating (b = 2√(km) ≈ 8.9 kg/s). For ζ > 1 (the “Honey” setting) there is no oscillation — the mass creeps to equilibrium. The lost energy does not vanish: Ep + Ek + Q = E₀, where the heat is Q = ∫bv²dt. In the simulator all three regimes are computed by exact formulas, and Q is accumulated as an integral over the exact v(t) — the balance holds to 10⁻¹² J.

A spring pendulum is a mass m on a spring of stiffness k. Pull the mass away from the equilibrium position by a distance x — and the spring pulls it back with the force F = −kx (Hooke's law). The minus sign means the force always points toward equilibrium, and its size grows with the displacement. By Newton's second law ma = −kx, that is a = −(k/m)·x: the acceleration is proportional to the displacement and opposite in sign. Such motion is called simple harmonic motion, and its solution is x(t) = A·cos(ωt), where ω = √(k/m).

Why does the swing happen about the equilibrium position and not about the free length of the spring? Because gravity mg acts on the mass too. It stretches the spring by Δl = mg/k, and the mass rests where mg = kΔl — that is the equilibrium position. Displace the mass by a further x: the net force is mg − k(Δl + x) = −kx. Gravity has “hidden” inside the equilibrium position, and the oscillation obeys the same law as without it. This is why the period does not depend on g: on the Moon the spring sags less, on Jupiter more, in weightlessness not at all — and the mass swings with the same T.

In the simulator you can see how the force and the velocity “swap places”. At the extreme points x = ±A the force F = kA is greatest and the velocity is zero — all the energy is stored in the spring, Ep = kA²/2. At the equilibrium position x = 0 the force is zero, but the velocity is greatest — |v| = Aω — and all the energy is kinetic, Ek = mv²/2. The mass flies through equilibrium by inertia, the spring starts braking it from the other side — and everything repeats. The sum Ep + Ek = kA²/2 never changes (Ep = kx²/2 is the energy of the spring and gravity together, counted from the equilibrium position).

The key fact of this page is isochronism: the period T = 2π√(m/k) does not depend on the amplitude. Pull the mass twice as far — it travels twice as far, but its speed is twice as big too, and one swing takes the same time. The “Compare” mode shows this literally: two masses with amplitudes A and A/2 reach equilibrium and the extreme points at the very same instant. A mass four times bigger makes the period twice as long, a stiffness four times bigger makes it twice as short: that is the root in the formula. The motion on this page is computed not by numerical integration but by exact formulas, so the period cannot drift at any frame rate.

If the medium resists (air, oil, honey), the oscillation dies out. The amount of damping is described by the dimensionless number ζ = b/(2√(km)). For ζ < 1 the mass swings but the swing shrinks — the energy goes into the heat Q. At ζ = 1 (critical damping) the mass returns to equilibrium fastest without overshooting it — this is how door closers and car shock absorbers work. For ζ > 1 there is no oscillation at all: the mass creeps slowly to equilibrium. The balance Ep + Ek + Q = E₀ holds at every moment.

For comparison open the “Energy conservation: mathematical pendulum” simulator: there the period T = 2π√(l/g) depends on g, and at large angles on the amplitude too. A spring pendulum is different: neither g nor the amplitude affects the period.