Lesson 12 of 15

Spring-Mass Period

Period of a Spring-Mass System

A mass mm on a spring with constant kk oscillates with angular frequency:

ω=km\omega = \sqrt{\frac{k}{m}}

The period (time for one complete oscillation):

T=2πω=2πmkT = \frac{2\pi}{\omega} = 2\pi\sqrt{\frac{m}{k}}

Units: seconds.

Hooke's Law

The spring force: F=kxF = -kx. The spring constant kk (N/m) measures stiffness — a stiffer spring (larger kk) oscillates faster.

Key Observations

  • Period increases with mass: heavier objects oscillate more slowly (TmT \propto \sqrt{m})
  • Period decreases with stiffness: stiffer springs oscillate faster (T1/kT \propto 1/\sqrt{k})
  • Period is independent of amplitude: whether you stretch the spring 1 cm or 10 cm, the period is the same (for ideal springs)

Examples

mm (kg)kk (N/m)TT (s)
116.2832 =2π= 2\pi
4112.5664 =4π= 4\pi
143.1416 =π= \pi
283.1416 =π= \pi

Your Task

Implement springPeriod(m, k) returning the oscillation period in seconds.

TCC compiler loading...
Loading...
Click "Run" to execute your code.