section_path: Laws/Examples/Harmonic motion
section_name: Harmonic motion
paragraph_text: Harmonic motion
  
  Consider a body of mass m {\displaystyle m} able to move along the x {\displaystyle x} axis, and suppose an equilibrium point exists at the position x = 0 {\displaystyle x=0}. That is, at x = 0 {\displaystyle x=0}, the net force upon the body is the zero vector, and by Newton's second law, the body will not accelerate. If the force upon the body is proportional to the displacement from the equilibrium point, and directed to the equilibrium point, then the body will perform simple harmonic motion. Writing the force as F = − k x {\displaystyle F=-kx}, Newton's second law becomes m d 2 x d t 2 = − k x. {\displaystyle m{\frac {d^{2}x}{dt^{2}}}=-kx\,.} This differential equation has the solution x (t) = A cos ω t + B sin ω t {\displaystyle x(t)=A\cos \omega t+B\sin \omega t\,} where the frequency ω {\displaystyle \omega } is equal to k / m {\displaystyle {\sqrt {k/m}}}, and the constants A {\displaystyle A} and B {\displaystyle B} can be calculated knowing, for example, the position and velocity the body has at a given time, like t = 0 {\displaystyle t=0}.
  
  One reason that the harmonic oscillator is a conceptually important example is that it is good approximation for many systems near a stable mechanical equilibrium. For example, a pendulum has a stable equilibrium in the vertical position: if motionless there, it will remain there, and if pushed slightly, it will swing back and forth. Neglecting air resistance and friction in the pivot, the force upon the pendulum is gravity, and Newton's second law becomes d 2 θ d t 2 = − g L sin θ, {\displaystyle {\frac {d^{2}\theta }{dt^{2}}}=-{\frac {g}{L}}\sin \theta,} where L {\displaystyle L} is the length of the pendulum and θ {\displaystyle \theta } is its angle from the vertical. When the angle θ {\displaystyle \theta } is small, the sine of θ {\displaystyle \theta } is nearly equal to θ {\displaystyle \theta } (see Taylor series), and so this expression simplifies to the equation for a simple harmonic oscillator with frequency ω = g / L {\displaystyle \omega ={\sqrt {g/L}}}.
  
  A harmonic oscillator can be damped, often by friction or viscous drag, in which case energy bleeds out of the oscillator and the amplitude of the oscillations decreases over time. Also, a harmonic oscillator can be driven by an applied force, which can lead to the phenomenon of resonance.