Skip to main content
🎓 Need a physics tutor?Book a free intro call →
← BlogClassical Mechanics

What Is Simple Harmonic Motion? x = A cos(ωt) Explained

Physics Fundamentals Editorial TeamPhysics FundamentalsUpdated Sep 20, 202616 min read
Simple harmonic motion — pendulum tracing a sinusoidal oscillation pattern

Simple harmonic motion (SHM) is oscillation in which the restoring force is proportional to the displacement from equilibrium and directed towards it (F = −kx). The acceleration is then a = −ω²x, and the motion is sinusoidal with period T = 2π/ω.

Pull a pendulum to one side and release it. Stretch a spring and let go. Disturb almost any stable system slightly and it will oscillate — and if that oscillation is simple harmonic motion, you can describe the entire future behaviour of the system with a single equation. That's not an oversimplification; for pendulums, springs, LC circuits, and sound waves, SHM is the exact description.

SHM turns up everywhere in physics because the mathematics of restoring forces that are proportional to displacement is extremely common. Once you understand SHM properly, you have the foundation for acoustics, optics, quantum mechanics, and electrical circuits — they all use the same underlying mathematical structure.

In this guide
  • The defining condition for SHM: acceleration proportional and opposite to displacement
  • Pendulums and springs, including the physical (compound) pendulum T = 2π√(I/(mgd))
  • The equations for displacement, velocity, and acceleration as functions of time
  • Period, frequency, and amplitude — what affects them and what doesn't
  • Energy in SHM: how kinetic and potential energy trade off through each cycle

What Makes Motion "Simple Harmonic"?

SHM has a precise definition: the restoring force must be proportional to displacement and opposite in direction. In equation form:

F = −kx

The negative sign is critical — it means the force always pushes or pulls the object back toward equilibrium (x = 0), not away from it. The greater the displacement, the stronger the restoring force. This produces the characteristic sinusoidal oscillation: the object overshoots equilibrium, the force reverses direction, it's pulled back, overshoots in the other direction, and the cycle repeats indefinitely (in the absence of damping).

Applying Newton's second law, F = ma = m(d²x/dt²), gives the equation of motion:

d²x/dt² = −(k/m)x = −ω²x

where ω = √(k/m) is the angular frequency (rad/s). The solution to this differential equation is:

x(t) = A cos(ωt + φ)

where A is the amplitude (maximum displacement in metres), ω is angular frequency (rad/s), t is time (s), and φ is the initial phase (rad, determined by initial conditions).

Key SHM Quantities

Quantity Symbol Formula Unit
Amplitude A Maximum displacement from equilibrium m
Period T T = 2π/ω = 1/f s
Frequency f f = 1/T = ω/(2π) Hz
Angular frequency ω ω = 2πf = √(k/m) rad/s
Maximum velocity v_max v_max = Aω (at equilibrium) m/s

The Simple Pendulum

A simple pendulum — a mass m on a string of length L, swinging through small angles — is the classic SHM example. For small angles (θ < ~15°), the restoring force along the arc is approximately F = −mg sinθ ≈ −mgθ, which is proportional to displacement. This gives SHM with period:

T_pendulum = 2π √(L/g)

where L is string length (m) and g = 9.8 m/s² is gravitational acceleration. Note what does not appear: mass. The period of a pendulum is independent of the mass of the bob. A 1 kg bob and a 10 kg bob on the same length string swing with identical periods. This was one of Galileo's great discoveries, made (allegedly) by watching a chandelier swing in Pisa Cathedral.

The period does depend on g — a pendulum beats slightly faster at the poles (where g is larger) than at the equator. This effect is significant enough to require correction in precision pendulum clocks used in different latitudes.

Worked example: pendulum period

A pendulum has length L = 1.00 m. Find its period on Earth (g = 9.8 m/s²).

T = 2π √(1.00 / 9.8) = 2π × 0.3194 = 2.007 s ≈ 2.0 s

A 1-metre pendulum has a period of almost exactly 2 seconds. This is why "seconds pendulums" — used in grandfather clocks — have lengths of about 1 metre.

For the full derivation, the small-angle approximation and more worked examples, see the simple pendulum article, or check a result with the Pendulum Period Calculator.

Real pendulums: the physical pendulum

Most real pendulums are extended bodies rather than a point mass on a string. For a rigid body pivoted about a horizontal axis, the small-swing period is T = 2π√(I/(mgd)), where I is the moment of inertia about the pivot and d is the distance from the pivot to the centre of mass. A uniform 1.00 m rod pivoted at one end, for example, has T = 2π√(2L/(3g)) = 2π√(2 × 1.00/(3 × 9.8)) = 1.64 s. The simple pendulum article derives the formula and works through rod, disc and rolling-disc examples.

Mass-Spring System

A mass m attached to a spring of spring constant k (where Hooke's law F = −kx applies) undergoes SHM with period:

T_spring = 2π √(m/k)

Here, mass does matter: a heavier mass oscillates more slowly (larger T); a stiffer spring (larger k) oscillates faster (smaller T). A 0.5 kg mass on a spring with k = 200 N/m:

T = 2π √(0.5 / 200) = 2π × 0.0500 = 0.314 s

For more on spring constants and the force law behind this result, read Hooke's law and springs, or try the Hooke's Law Calculator.

Energy in SHM

Energy continuously exchanges between kinetic and potential forms throughout SHM — a perfect illustration of conservation of energy.

At maximum displacement (amplitude A): velocity = 0 → KE = 0; PE = maximum = ½kA²

At equilibrium (x = 0): velocity = maximum (v_max = Aω) → KE = maximum = ½mω²A²; PE = 0

Total mechanical energy at any point:

E_total = ½mv² + ½kx² = ½kA² = constant

This energy is independent of time — it depends only on amplitude A and spring constant k. Doubling the amplitude quadruples the energy (E ∝ A²).

Worked Example: Energy in SHM

A 0.5 kg mass oscillates on a spring (k = 200 N/m) with amplitude 0.05 m. Find the total energy, and the kinetic and potential energy when the displacement is 0.03 m.

E_total = ½kA² = 0.5 × 200 × 0.05² = 0.25 J
PE at x = 0.03 m: ½kx² = 0.5 × 200 × 0.03² = 0.09 J
KE = E_total − PE = 0.25 − 0.09 = 0.16 J

At every point in the cycle, KE + PE always sums to the same 0.25 J — energy shifts between the two forms but the total never changes.

Why Period Is Independent of Amplitude (for SHM)

A larger amplitude means the object travels further in each cycle — but it also moves faster (because it starts from a higher PE, converting more to KE). These two effects exactly cancel: larger distance but proportionally higher speed gives the same period. This amplitude-independence is a defining property of SHM and does not hold for large-angle pendulums or nonlinear oscillators.

Velocity and Acceleration in SHM

Velocity and acceleration as functions of time in SHM:

x(t) = A cos(ωt)
v(t) = −Aω sin(ωt)
a(t) = −Aω² cos(ωt) = −ω²x

Velocity is 90° out of phase with displacement (maximum velocity when displacement is zero). Acceleration is 180° out of phase with displacement (maximum acceleration when displacement is maximum, directed oppositely). Acceleration is always proportional to displacement and directed toward equilibrium — the defining property of SHM.

Real-World Examples of SHM

Musical strings: A guitar string vibrates in SHM (approximately). The restoring force is the string tension. The frequency determines the pitch; the amplitude determines the loudness.

Quartz watches: A quartz crystal oscillates at 32,768 Hz under an applied voltage (piezoelectric effect). The circuit counts oscillations to keep time. The stability of the SHM frequency makes quartz clocks far more accurate than pendulum clocks.

LC circuits: An inductor (L) and capacitor (C) in a circuit exchange energy between magnetic field (inductor) and electric field (capacitor) in an exactly analogous way to a mass-spring system. The "natural frequency" is f = 1/(2π√LC) — the direct analogue of the spring formula. For example, a circuit with L = 10 mH and C = 100 nF: f = 1/(2π√(0.01 × 100×10⁻⁹)) ≈ 5,033 Hz — this is the same mathematical structure that tunes radio receivers to a specific station frequency.

Molecular vibrations: Atoms in molecules oscillate about their equilibrium bond lengths. For small displacements, the restoring force is approximately harmonic (F ≈ −kx), so molecular vibrations are approximately SHM. The frequencies, typically in the infrared range, are the basis of infrared spectroscopy.

Damped and Forced Oscillations

Real oscillators lose energy to friction and air resistance — they are damped. In underdamped systems, amplitude decreases exponentially with time while the frequency remains approximately the same. In overdamped systems, the object returns slowly to equilibrium without oscillating. In critically damped systems (the engineering ideal for shock absorbers), the object returns to equilibrium as quickly as possible without oscillating.

Resonance occurs when an oscillator is driven at its natural frequency. The amplitude grows — potentially to destructive levels. The Tacoma Narrows Bridge collapsed in 1940 partly due to wind-induced resonance. Microwave ovens exploit resonance: the 2.45 GHz microwaves are close to the natural rotational frequency of water molecules.

Worked Examples

Example 1: Spring. 0.5 kg mass on spring (k = 200 N/m). T = 2π√(0.5/200) = 2π × 0.0500 = 0.314 s. f = 1/0.314 = 3.18 Hz.

Example 2: Pendulum. Find length for T = 2.0 s. T = 2π√(L/g) → L = g(T/2π)² = 9.8 × (2/2π)² = 9.8 × 0.1013 = 0.993 m ≈ 1.0 m. (Grandfather clocks have ~1 m pendulums that tick once per second.)

Example 3: Velocity and position. A = 0.10 m, ω = 5 rad/s. Maximum speed = Aω = 0.10 × 5 = 0.50 m/s (at x = 0). Speed at x = 0.08 m: v = ω√(A² − x²) = 5√(0.01 − 0.0064) = 5 × 0.060 = 0.30 m/s.

Frequently Asked Questions

What is simple harmonic motion?
Simple harmonic motion (SHM) is oscillatory motion where the restoring force is proportional to displacement from equilibrium and directed toward it: F = −kx, giving a = −ω²x. This produces sinusoidal motion x = A cos(ωt + φ), where A is amplitude (maximum displacement), ω = √(k/m) is angular frequency, and φ is phase. SHM examples include mass-spring systems, pendulums (small angles), floating objects displaced vertically, and LC electrical circuits. The period T = 2π/ω is independent of amplitude — small and large oscillations take the same time.
What is the period of a simple pendulum?
For a simple pendulum (point mass on massless string of length L, small angles): T = 2π√(L/g). Period depends on length and gravitational field strength but not on mass or amplitude (for small oscillations up to ~15°). At g = 9.8 m/s²: L = 1.0 m → T = 2.0 s; L = 0.25 m → T = 1.0 s. This independence of mass explains why Galileo reportedly observed pendulums of the same length swinging together regardless of their bobs' materials. The approximation breaks down for large angles, where the true period is longer than T = 2π√(L/g).
What is the period of a mass-spring system?
T = 2π√(m/k), where m is mass (kg) and k is spring constant (N/m). Unlike a pendulum, the period of a spring system depends on mass. A heavier mass oscillates more slowly; a stiffer spring oscillates faster. Period does not depend on amplitude in SHM.
What is the velocity in SHM?
Velocity in SHM: v = −Aω sin(ωt + φ), or in terms of position: v = ω√(A² − x²). Maximum velocity is v_max = Aω, occurring at x = 0 (equilibrium — all energy is kinetic). Velocity is zero at x = ±A (turning points — all energy is potential). The ± sign indicates direction: positive when moving toward positive equilibrium side, negative when returning. Speed increases as displacement decreases toward zero, then decreases as the object passes through and moves toward the opposite amplitude.
Why is SHM amplitude-independent?
Larger amplitude means both greater distance and proportionally greater speed (from larger energy), so the two effects exactly cancel and period remains constant. This amplitude-independence holds only for true SHM (linear restoring force). A pendulum is only approximately SHM — for large angles, the period increases with amplitude.
What is the difference between frequency and period in SHM?
Period (T) is the time for one complete oscillation, measured in seconds. Frequency (f) is the number of complete oscillations per second, measured in hertz (Hz). They are reciprocals: f = 1/T. Angular frequency ω = 2πf = 2π/T, measured in rad/s.
What is resonance in SHM?
Resonance occurs when the driving frequency of an external periodic force matches the system's natural frequency f₀ = ω/(2π) = (1/2π)√(k/m). At resonance, the oscillation amplitude increases dramatically — for an undamped system, theoretically to infinity. Damping limits the peak amplitude to A = F₀/(2γmω₀) where γ is the damping coefficient. Resonance causes Tacoma Narrows Bridge collapse (1940, wind-driven oscillation at bridge's natural frequency), but is exploited in MRI (radio waves at hydrogen resonance frequency), musical instruments (resonance boxes amplify sound), and quartz watches (piezoelectric crystal resonance for timekeeping).
What is damped oscillation?
Damped oscillation is SHM where a resistive force (drag, friction) removes energy over time, reducing amplitude. For a damping force proportional to velocity (F_d = −bv): x(t) = Ae^(−bt/2m) cos(ω_d t + φ), where ω_d = √(ω₀² − (b/2m)²) is the damped angular frequency. Three cases: underdamped (b < 2mω₀) — oscillates with decreasing amplitude; critically damped (b = 2mω₀) — returns to equilibrium fastest without oscillating; overdamped (b > 2mω₀) — returns slowly without oscillating. Car suspension is critically or slightly overdamped to stop the car bouncing after bumps.

Share this article

Written by

Physics Fundamentals Editorial Team

Written and reviewed by our team of physics educators. Content is aligned with A-Level, GCSE, AP Physics, and undergraduate curricula.

About Physics Fundamentals →

Discussion

Comments

Leave a comment

Have a question about this article? Spot a mistake? Or just want to share your thoughts? We'd love to hear from you.

0/2000

Comments are moderated and appear after review. Be respectful and constructive.

Keep learning physics fundamentals

Get new articles and platform updates delivered to your inbox.

Physics Fundamentals

Channel · Updates only

👋 Get concise physics updates — new articles, calculators, and tools. Your number stays private. No spam. No group chats. Just worthy content.

Your number is never shared or visible to others
Join the Channel