A harmonic oscillator comprises a particle that is subject to a restoring force proportional to the particle’s displacment from its equilibrium position.

Consider a mass connected to a rigid support by a massless and frictionless spring (see above diagram). At equilibrium, the length of the spring is . Let’s assume that the only force acting on the mass is a restoring force that is directly proportional to the displacement of the mass (** Hooke’s law**):

where is the displacement of the mass from its equilibrium position and is constant of proportionality called the ** force constant**.

###### Question

Explain why is a measure of the stiffness of the spring.

###### Answer

For a particular value of , the stiffer the spring, the less the mass displaces. Since is inversely proportional to , it is a measure of the stiffness of the spring.

Substituting the equation for Newton’s 2^{nd} law of motion in eq1, we have

The solution to the above differential equation is , where . As the displacement of the mass is defined by a wave equation, it is called a * harmonic oscillator* (‘harmonic’ originates from sound waves). The mass oscillates with amplitude and frequency (see Q&A below), and the kinetic energy and potential energy of the system are

###### Question

Explain why the mass oscillates with a frequency of and why the potential energy of the system is equal to ?

###### Answer

Since , the function repeats itself after a time . This implies that the period of the motion of the mass is and that the oscillation frequency is .

The force exerted by a person in lifting an object over a distance against gravity is , where is the work done by the person. must also be the amount of potential energy the object gains, i.e. . Furthermore, the force exerted by gravity is opposite to the force exerted by the person. So, and for small changes, . Since gravitational force and elastic spring force are both conservative forces (work done is path-independent, we substitute eq1 in to give . Therefore, the potential energy of a harmonic oscillator is .

Therefore, the total energy of the harmonic oscillator is

and the Hamiltonian , which is the sum of the kinetic and potential energies of the oscillator can be expressed as

Before we show how the harmonic oscillator can be used to model a vibrating diatomic molecule, we shall look at the quantum-mechanical treatment of a harmonic oscillator.