Sub topic 6
A mass on a spring: ω = √(k/m)
Prerequisites and scope
This chapter assumes you know Newton's second law (F = ma), radians and basic trigonometry, and the derivatives of sine and cosine. It also assumes you have seen the SHM equation a = −ω²x and its sinusoidal solution x(t) = A cos(ωt + φ) from earlier chapters. Here we apply them to the most common physical example, a mass on a spring. The result is a formula for ω that depends only on the spring constant k and the mass m.
Setting up the system
Take a block of mass m on a horizontal, frictionless surface. It is attached to one end of an ideal spring with spring constant k. The other end of the spring is fixed to a wall. An ideal spring has negligible mass and obeys Hooke's law.
Choose the x-axis along the spring. Put x = 0 at the equilibrium position, where the spring is neither stretched nor compressed. Positive x is a stretch.
Hooke's law gives the spring force on the block:
F = −kx
The minus sign means the force always points back toward equilibrium. This is a restoring force. It is proportional to displacement, which is the condition for simple harmonic motion.
Deriving ω = √(k/m)
The only horizontal force on the block is the spring force. Gravity and the normal force cancel each other vertically, so they do not affect the motion along x. Apply Newton's second law along x:
m a = −kx
Divide by m:
a = −(k/m) x
Compare this with the SHM equation a = −ω²x. The two match if
ω² = k/m, so ω = √(k/m)
From ω you get the period and frequency:
- Period: T = 2π/ω = 2π√(m/k)
- Frequency: f = 1/T = (1/2π)√(k/m)
The units check out. The ratio k/m has units (N/m)/kg = (kg·m/s²/m)/kg = 1/s², so its square root is in rad/s (radians are dimensionless).
What the formula says
- A stiffer spring (larger k) gives a larger ω, so faster oscillation.
- A heavier mass (larger m) gives a smaller ω, so slower oscillation.
- Quadrupling the mass doubles the period. Quadrupling the stiffness halves it.
- The amplitude A does not appear. A large and a small oscillation of the same system take the same time per cycle. This property is called isochronism.
The last point comes from the force being exactly linear in x. A bigger displacement gives a proportionally bigger force and a proportionally bigger acceleration, so the block covers the larger distance in the same time.
Worked example
A 0.5 kg block is attached to a spring with k = 20 N/m. Find ω, T, and f.
ω = √(20 / 0.5) = √40 ≈ 6.325 rad/s
T = 2π / 6.325 ≈ 0.993 s
f = 1 / 0.993 ≈ 1.007 Hz
You can check this with code:
import math
k = 20.0 # spring constant, N/m
m = 0.5 # mass, kg
omega = math.sqrt(k / m)
period = 2 * math.pi / omega
frequency = 1 / period
print(f"omega = {omega:.3f} rad/s, T = {period:.3f} s, f = {frequency:.3f} Hz")The output is omega = 6.325 rad/s, T = 0.993 s, f = 1.007 Hz.
Now suppose you pull the block 0.10 m from equilibrium and release it from rest. Then A = 0.10 m and φ = 0, so
x(t) = 0.10 cos(6.325 t)
The velocity is v(t) = −Aω sin(ωt + φ), so the maximum speed is
v_max = Aω = 0.10 × 6.325 ≈ 0.632 m/s
The maximum acceleration is a_max = Aω² = 0.10 × 40 = 4.0 m/s². It occurs at the endpoints, where the spring force is largest: kA/m = 20 × 0.10 / 0.5 = 4.0 m/s². The two results agree, which confirms the derivation.
Finding k and m from measurements
The formula can be turned around. If you measure the period, you can find k when m is known:
k = 4π²m / T²
This is a practical way to measure a spring constant. Time several full oscillations (for example 10) and divide by the number of cycles. This reduces the timing error from your reaction time. A graph of T² against m is a straight line with slope 4π²/k, which gives k without needing any single measurement to be exact.
Speed from energy
Energy gives the speed at any position without solving for time. With no friction, the total mechanical energy is constant:
E = ½mv² + ½kx² = ½kA²
Solving for v:
v = ±√((k/m)(A² − x²)) = ±ω√(A² − x²)
At x = 0 the speed is ωA. At x = ±A the speed is zero. For the block above, at x = 0.06 m:
v = 6.325 × √(0.10² − 0.06²) = 6.325 × 0.08 ≈ 0.506 m/s
Common errors
- Using the wrong unit for ω. ω is in rad/s, not Hz. The frequency in Hz is f = ω/2π. If you confuse them, your period is off by a factor of 2π.
- Putting amplitude in the period formula. T depends only on m and k. If an answer depends on A, something is wrong.
- Mixing grams and kilograms. Use SI units. A mass of 500 g must be 0.5 kg before you use k in N/m.
- Calculator in degrees. In cos(ωt + φ), the argument is in radians. Set your calculator or code accordingly. Python's
math.cosexpects radians. - Treating the spring as massless when it is not. If the spring's mass is a noticeable fraction of the block's mass, the effective mass is larger. A common correction adds about one third of the spring mass to m. For a spring much lighter than the block, ignore this.
Checking the result numerically
You can test the derivation without using the sinusoidal solution. Start from a = −(k/m)x and step forward in time. The code below uses semi-implicit Euler integration. It updates the velocity first and then uses the new velocity to update the position. This variant keeps the oscillation's energy from drifting steadily, which the plain Euler method does not.
import math
k, m = 20.0, 0.5
x, v = 0.10, 0.0 # start at rest, displaced 0.10 m
dt = 0.001
steps = 1000 # simulate 1 second
for _ in range(steps):
a = -(k / m) * x
v += a * dt # update velocity first (semi-implicit Euler)
x += v * dt
t = steps * dt
analytic = 0.10 * math.cos(math.sqrt(k / m) * t)
print(f"numerical x = {x:.4f} m, analytic x = {analytic:.4f} m")The two values agree to about three decimal places. That agreement shows that a restoring force proportional to displacement produces cosine motion with ω = √(k/m).
Summary table
| Quantity | Formula | Value for m = 0.5 kg, k = 20 N/m, A = 0.10 m |
|---|---|---|
| Angular frequency | ω = √(k/m) | 6.325 rad/s |
| Period | T = 2π√(m/k) | 0.993 s |
| Frequency | f = ω/2π | 1.007 Hz |
| Maximum speed | Aω | 0.632 m/s |
| Maximum acceleration | Aω² | 4.0 m/s² |
| Total energy | ½kA² | 0.10 J |
Exercise
A spring-mass system has a period of 0.80 s with a 0.25 kg block. (a) What is the spring constant k? (b) What would the period be if you replaced the block with a 1.00 kg block on the same spring?
Show answer
(a) k = 4π²m/T² = 4π²(0.25)/(0.80)² = 9.870/0.64 ≈ 15.4 N/m. (b) Quadrupling the mass doubles the period, so T = 1.60 s. Check: T = 2π√(1.00/15.4) ≈ 1.60 s.
Exercise
A 0.50 kg block on a spring with k = 20 N/m oscillates with amplitude 0.10 m. How fast is it moving when it is 0.08 m from equilibrium?
Show answer
v = ω√(A² − x²) with ω = √(20/0.5) = 6.325 rad/s. Then v = 6.325 × √(0.0100 − 0.0064) = 6.325 × 0.06 ≈ 0.38 m/s.