# Harmonic oscillator

A harmonic oscillator is any physical system in which a restoring force proportional to displacement from equilibrium produces oscillation, so that the equation of motion takes the form \( \ddot{x} = -\omega_0^2 x \). The standard example is a mass \( m \) on a spring of force constant \( k \) on a frictionless surface, where the spring force obeys [Hooke's law](https://www.edgepedia.org/hookes-law) \( F = -kx \): the net force is proportional to the displacement and acts opposite to it.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup> The resulting motion, called simple harmonic motion (SHM), is sinusoidal in time, and the same mathematics describes pendulums, torsion pendulums, vibrating molecules, lattice vibrations, and electrical circuits.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup><sup> • </sup><sup>[2](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)</sup>

| Key fact | Detail |
|---|---|
| Defining force law | Restoring force proportional to displacement and opposite to it, \( F = -kx \) (Hooke's law); \( k \) has units of N/m and measures stiffness.<sup>[3](https://openstax.org/books/physics/pages/5-5-simple-harmonic-motion)</sup> |
| Equation of motion | \( m\ddot{x} = -kx \), or \( \ddot{x} + \omega_0^2 x = 0 \) with \( \omega_0 = \sqrt{k/m} \).<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup> |
| Period and frequency | \( T = 2\pi\sqrt{m/k} \) and \( f = (1/2\pi)\sqrt{k/m} \); they depend only on mass and force constant, not on amplitude.<sup>[4](https://openstax.org/books/university-physics-volume-1/pages/15-summary)</sup> |
| Energy | Potential energy \( U = \tfrac{1}{2}kx^2 \); in undamped SHM the energy oscillates between kinetic and potential forms with constant total.<sup>[5](https://openstax.org/books/university-physics-volume-1/pages/15-2-energy-in-simple-harmonic-motion)</sup> |
| Damping regimes | With damping \( \ddot{x} + 2\lambda\dot{x} + \omega_0^2 x = 0 \), the motion is underdamped for \( \lambda < \omega_0 \), overdamped for \( \lambda > \omega_0 \), and critically damped at \( \lambda = \omega_0 \).<sup>[6](https://ocw.mit.edu/courses/8-223-classical-mechanics-ii-january-iap-2017/28aa8cf5df03a89f87142885af1bd10b_MIT8_223IAP17_Lec12.pdf)</sup> |
| Resonance | A sinusoidally driven damped oscillator responds with steady-state amplitude \( A(\omega_d) = f_0/\sqrt{(\omega_0^2 - \omega_d^2)^2 + \omega_d^2\Gamma^2} \), largest near the natural frequency.<sup>[7](https://openlearninglibrary.mit.edu/courses/course-v1%3AMITx%2B8.03x%2B1T2020/courseware/week%3Aweek2/seq-lect_04a/)</sup> |
| Universality | Any system with a stable equilibrium (positive second derivative of its potential) oscillates harmonically for small displacements, with \( \omega_0^2 = V''(x_0)/m \).<sup>[2](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)</sup> |

## Motion of the undamped oscillator

Applying Newton's second law to the mass–spring system gives \( m\,d^2x/dt^2 = -kx \), so the acceleration is proportional to the displacement and directed toward equilibrium.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup> The position is a cosine function of time,

\[ x(t) = A\cos(\omega t + \varphi), \]

where \( A \) is the amplitude (the maximum displacement from equilibrium), \( \varphi \) is the phase shift set by initial conditions, and \( \omega = 2\pi/T = 2\pi f \) is the angular frequency.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup> Differentiating gives the velocity \( v(t) = -A\omega\sin(\omega t + \varphi) \), so the maximum speed is \( v_{\max} = A\omega \), reached as the mass passes through equilibrium; the maximum acceleration is \( a_{\max} = A\omega^2 \), reached at the turning points.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup>

The period is independent of amplitude: a guitar string oscillates at the same frequency whether plucked gently or hard.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup> Only two factors change the period: a stiffer system (larger \( k \)) has a shorter period, and a more massive system has a longer one.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup> For a vertical spring, gravity merely shifts the equilibrium position; the oscillation about that new equilibrium is still simple harmonic with the same \( \omega_0 \).<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup>

## Energy

The spring stores potential energy \( U = \tfrac{1}{2}kx^2 \), measured from the equilibrium position where the stored energy is zero.<sup>[5](https://openstax.org/books/university-physics-volume-1/pages/15-2-energy-in-simple-harmonic-motion)</sup> Because the spring force is conservative, this energy is fully recoverable as work.<sup>[5](https://openstax.org/books/university-physics-volume-1/pages/15-2-energy-in-simple-harmonic-motion)</sup> In undamped SHM the total energy \( E = \tfrac{1}{2}mv^2 + \tfrac{1}{2}kx^2 \) is constant, and it passes completely back and forth between kinetic and potential forms as the mass moves; at the turning points all energy is potential, and at equilibrium all of it is kinetic.<sup>[5](https://openstax.org/books/university-physics-volume-1/pages/15-2-energy-in-simple-harmonic-motion)</sup>

## Damping

Real systems lose mechanical energy to friction, which converts it to thermal energy. Modeling the dissipative force as \( -b\dot{x} \) gives the damped oscillator equation

\[ \ddot{x} + 2\lambda\dot{x} + \omega_0^2 x = 0, \qquad 2\lambda = \frac{b}{m}. \]<sup>[6](https://ocw.mit.edu/courses/8-223-classical-mechanics-ii-january-iap-2017/28aa8cf5df03a89f87142885af1bd10b_MIT8_223IAP17_Lec12.pdf)</sup>

The solution takes three forms depending on the ratio of \( \lambda \) to \( \omega_0 \). In the underdamped case (\( \lambda < \omega_0 \)) the mass still oscillates, but with an exponentially decaying envelope,

\[ x(t) = a\,e^{-\lambda t}\cos(\omega t + \varphi), \qquad \omega = \sqrt{\omega_0^2 - \lambda^2}. \]

In the overdamped case the motion decays without oscillating, and at critical damping (\( \lambda = \omega_0 \)) the solution is \( x(t) = e^{-\lambda t}(a_1 + a_2 t) \), the fastest return to rest without oscillation.<sup>[6](https://ocw.mit.edu/courses/8-223-classical-mechanics-ii-january-iap-2017/28aa8cf5df03a89f87142885af1bd10b_MIT8_223IAP17_Lec12.pdf)</sup> The rate of energy loss is given by the dissipation function, \( dE/dt = -2D \), which is the rate of work done by the friction force.<sup>[6](https://ocw.mit.edu/courses/8-223-classical-mechanics-ii-january-iap-2017/28aa8cf5df03a89f87142885af1bd10b_MIT8_223IAP17_Lec12.pdf)</sup>

## Driving and resonance

Adding a sinusoidal driving force \( f\cos(\omega t) \) to the damped oscillator produces a solution with two parts: a transient that depends on the initial conditions and decays on the timescale \( 1/\lambda \), and a steady-state response at the driving frequency,<sup>[6](https://ocw.mit.edu/courses/8-223-classical-mechanics-ii-january-iap-2017/28aa8cf5df03a89f87142885af1bd10b_MIT8_223IAP17_Lec12.pdf)</sup>

\[ x(t) \to a_2\cos(\omega t + \theta), \qquad a_2 = \frac{f_0}{\sqrt{(\omega_0^2 - \omega^2)^2 + 4\lambda^2\omega^2}}. \]

After the transient dies away, the motion is entirely the drive response.<sup>[6](https://ocw.mit.edu/courses/8-223-classical-mechanics-ii-january-iap-2017/28aa8cf5df03a89f87142885af1bd10b_MIT8_223IAP17_Lec12.pdf)</sup> The amplitude peaks near the natural frequency, a phenomenon called resonance: a sinusoidally varying force produces the largest amplitude motion when it oscillates slightly slower than the un-driven frequency of the damped oscillator.<sup>[8](https://www.studocu.com/row/document/united-states-international-university-africa/physical-mechanics/mitres-8-009su17-lec5-examination-aid/92145240)</sup> The phase lag \( \theta \) between driver and oscillator also varies with frequency, differing above and below resonance.<sup>[7](https://openlearninglibrary.mit.edu/courses/course-v1%3AMITx%2B8.03x%2B1T2020/courseware/week%3Aweek2/seq-lect_04a/)</sup> Resonant response can select one frequency from a broad spectrum of driving frequencies; classroom demonstrations include breaking a glass with sound and a driven cart on an air track.<sup>[9](https://ocw.mit.edu/courses/8-03sc-physics-iii-vibrations-and-waves-fall-2016/pages/part-i-mechanical-vibrations-and-waves/lecture-3/)</sup>

## Why the model appears everywhere

The harmonic oscillator's ubiquity follows from calculus. Expanding any smooth potential energy \( V(x) \) in a [Taylor series](https://www.edgepedia.org/taylor-series) about a stable equilibrium point \( x_0 \), where \( V'(x_0) = 0 \) and \( V''(x_0) > 0 \), gives

\[ V(x) \approx V(x_0) + \tfrac{1}{2}V''(x_0)(x - x_0)^2, \]

because the linear term vanishes at an extremum and higher-order terms are negligible for small displacements.<sup>[2](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)</sup> The effective spring constant is \( k = V''(x_0) \), and the natural frequency is \( \omega_0^2 = V''(x_0)/m \).<sup>[2](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)</sup> The potential does not have to be quadratic in \( x \); it only needs to be close to quadratic near the equilibrium point.<sup>[2](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)</sup> The approximation fails when the potential is not smooth enough at equilibrium to admit a Taylor expansion, or when the second derivative of the potential vanishes there, so that higher-order terms dominate for sufficiently small displacements.<sup>[10](https://ocw.mit.edu/courses/8-03sc-physics-iii-vibrations-and-waves-fall-2016/d0253416dabaf95ea866e046e63a8e74_MIT8_03SCF16_Text_Ch1.pdf)</sup><sup> • </sup><sup>[15](https://phys.libretexts.org/Bookshelves/Waves_and_Acoustics/The_Physics_of_Waves_(Goergi)/01:_Harmonic_Oscillation/1.02:_1.2_Small_Oscillations_and_Linearity)</sup>

## Examples

- **Mass on a spring.** The archetype, with \( \omega_0 = \sqrt{k/m} \); a vertical spring behaves identically about its shifted equilibrium.<sup>[1](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)</sup>
- **Simple pendulum.** For displacements of less than 15 degrees, the restoring force is proportional to displacement and the pendulum undergoes SHM with period \( T = 2\pi\sqrt{L/g} \), independent of mass and amplitude but dependent on gravitational acceleration.<sup>[3](https://openstax.org/books/physics/pages/5-5-simple-harmonic-motion)</sup>
- **Torsion pendulum.** A disc on a wire obeys \( I\,\ddot{\theta} + k_t\theta = 0 \) with \( \omega_0^2 = k_t/I \) and \( I = \tfrac{1}{2}mR^2 \), fully analogous to the mass–spring system.<sup>[2](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)</sup>
- **LC circuit.** Charge sloshing between a capacitor \( C \) and inductor \( L \) satisfies the same oscillator equation, with the capacitor voltage \( V_C = Q_C/C \) playing the role of the restoring force.<sup>[2](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)</sup> Adding resistance gives an [RLC circuit](https://www.edgepedia.org/rlc-circuit) whose equation of motion is exactly that of a damped mass–spring system, with the same three solution forms.<sup>[11](https://openstax.org/books/university-physics-volume-2/pages/14-6-rlc-series-circuits)</sup>
- **Coupled oscillators.** Systems of connected oscillators decompose into normal modes, patterns in which all parts move sinusoidally at a common frequency. For two equal masses joined by springs, the mode frequencies are \( \sqrt{k/m} \) and \( \sqrt{3k/m} \); general motion is a mix of the modes.<sup>[12](https://phys.libretexts.org/Courses/University_of_California_Davis/UCD%3A_Physics_9HA__Classical_Mechanics/8%3A_Small_Oscillations/8.4%3A_Coupled_Oscillators_and_Normal_Modes)</sup>

## Quantum harmonic oscillator

In quantum mechanics the harmonic oscillator is one of the few systems that can be solved exactly, and it serves as a good approximation for many systems near equilibrium.<sup>[13](https://ocw.mit.edu/courses/8-04-quantum-physics-i-spring-2013/808334d09369e3a726f6f20d82315c20_MIT8_04S13_Lec08.pdf)</sup> Expanding a potential in a Taylor series about equilibrium and keeping only the second-order term yields the quantum harmonic oscillator Hamiltonian, just as in the classical case.<sup>[13](https://ocw.mit.edu/courses/8-04-quantum-physics-i-spring-2013/808334d09369e3a726f6f20d82315c20_MIT8_04S13_Lec08.pdf)</sup> Its energy eigenstates form a family labeled by a quantum number \( n \), and the model underlies descriptions of molecular vibrations and lattice vibrations in the harmonic approximation.<sup>[13](https://ocw.mit.edu/courses/8-04-quantum-physics-i-spring-2013/808334d09369e3a726f6f20d82315c20_MIT8_04S13_Lec08.pdf)</sup><sup> • </sup><sup>[14](https://eng.libretexts.org/Bookshelves/Materials_Science/Supplemental_Modules_%28Materials_Science%29/Electronic_Properties/Lattice_Vibrations)</sup>

## References

1. [Simple Harmonic Motion, University Physics Volume 1, OpenStax](https://openstax.org/books/university-physics-volume-1/pages/15-1-simple-harmonic-motion)
2. [Oscillations, Classical Mechanics & Special Relativity for Starters, TU Delft](https://interactivetextbooks.tudelft.nl/classical-mechanics-and-special-relativity/content/Ch9_Oscillations.html)
3. [Simple Harmonic Motion, Physics, OpenStax](https://openstax.org/books/physics/pages/5-5-simple-harmonic-motion)
4. [Ch. 15 Summary, University Physics Volume 1, OpenStax](https://openstax.org/books/university-physics-volume-1/pages/15-summary)
5. [Energy in Simple Harmonic Motion, University Physics Volume 1, OpenStax](https://openstax.org/books/university-physics-volume-1/pages/15-2-energy-in-simple-harmonic-motion)
6. [Classical Mechanics II, Lecture 12: Forced Oscillations, MIT OpenCourseWare](https://ocw.mit.edu/courses/8-223-classical-mechanics-ii-january-iap-2017/28aa8cf5df03a89f87142885af1bd10b_MIT8_223IAP17_Lec12.pdf)
7. [Damped, Driven Oscillation, 8.03x Courseware, MIT Open Learning Library](https://openlearninglibrary.mit.edu/courses/course-v1%3AMITx%2B8.03x%2B1T2020/courseware/week%3Aweek2/seq-lect_04a/)
8. [MIT 8.009 Physics III, Lecture 05: Driven Oscillations notes](https://www.studocu.com/row/document/united-states-international-university-africa/physical-mechanics/mitres-8-009su17-lec5-examination-aid/92145240)
9. [Lecture 3: Driven Oscillators, Transient Phenomena, Resonance, 8.03SC, MIT OpenCourseWare](https://ocw.mit.edu/courses/8-03sc-physics-iii-vibrations-and-waves-fall-2016/pages/part-i-mechanical-vibrations-and-waves/lecture-3/)
10. [MIT 8.03SC Fall 2016 Textbook Chapter 1: Harmonic Oscillation, MIT OpenCourseWare](https://ocw.mit.edu/courses/8-03sc-physics-iii-vibrations-and-waves-fall-2016/d0253416dabaf95ea866e046e63a8e74_MIT8_03SCF16_Text_Ch1.pdf)
11. [RLC Series Circuits, University Physics Volume 2, OpenStax](https://openstax.org/books/university-physics-volume-2/pages/14-6-rlc-series-circuits)
12. [Coupled Oscillators and Normal Modes, Physics LibreTexts](https://phys.libretexts.org/Courses/University_of_California_Davis/UCD%3A_Physics_9HA__Classical_Mechanics/8%3A_Small_Oscillations/8.4%3A_Coupled_Oscillators_and_Normal_Modes)
13. [Lecture 8: Quantum Harmonic Oscillator, 8.04 Quantum Physics I, MIT OpenCourseWare](https://ocw.mit.edu/courses/8-04-quantum-physics-i-spring-2013/808334d09369e3a726f6f20d82315c20_MIT8_04S13_Lec08.pdf)
14. [Lattice Vibrations, Engineering LibreTexts](https://eng.libretexts.org/Bookshelves/Materials_Science/Supplemental_Modules_%28Materials_Science%29/Electronic_Properties/Lattice_Vibrations)
15. [1.2: Small Oscillations and Linearity](https://phys.libretexts.org/Bookshelves/Waves_and_Acoustics/The_Physics_of_Waves_(Goergi)/01:_Harmonic_Oscillation/1.02:_1.2_Small_Oscillations_and_Linearity)

---
*Topic: Encyclopedia › Physical world and mathematics › Physics › Classical physics › Mechanics › Motion, forces, and dynamics › Newtonian dynamics of particles › Newton's laws of motion*

*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
