A diatomic molecule has one internal bond-stretching vibrational coordinate. Near its equilibrium separation, approximate the bond by a spring of stiffness and use the reduced mass . Its frequency is and its quantum harmonic oscillator levels are .
For independent molecules in thermal equilibrium, set . The single-molecule canonical partition function is a geometric series:
Using , where , gives
Per mole replace by . The zero-point energy is present in but is temperature-independent and contributes nothing to the heat capacity.
For , occupation of the first excited vibrational state is exponentially suppressed: . The vibrational degree of freedom is frozen out. For , . This recovers classical equipartition: the quadratic kinetic term and quadratic elastic term each contribute per molecule.
The vibrational heat capacity of a diatomic gas must be distinguished from the total heat capacity. In a dilute gas with rotations already active and vibration still frozen, translation contributes and rotation , so molar . Once vibration is active it adds , giving . For an ideal gas of a fixed number of intact molecules, , so the corresponding values are and . Very low temperatures also freeze rotations, while sufficiently high temperatures bring anharmonicity, dissociation or electronic excitations; the harmonic plateau is restricted to the range where those effects are negligible.