Semiclassical Statistical Mechanics

from Statistical Physics using Mathematica
© James J. Kelly, 1996-2002

Classical phase space

A classical system with f degrees of freedom is described by generalized coordinates (Subscript[q, i])[t] and momenta (Subscript[p, i])[t] which satisfy the equations of motion

\(TextForm\`\(q\& . \)\_i = \(∂H\/∂p\_i\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(p\& . \)\_i = \(-\(∂H\/∂q\_i\)\)\)\)

where H = 
        H[(Subscript[q, 1]), (Subscript[p, 1]), ⋯, (Subscript[q, f]), (Subscript[p, f]), t] is the Hamiltonian function.  Each point in the 2  f dimensional phase space represents a different microstate of the system.  It is useful to let ξ = {(Subscript[q, 1]), (Subscript[p, 1]), ⋯, (Subscript[q, f]), 
          (Subscript[p, f])} represent a point in phase space such that ξ[t] represents the motion of the system, its trajectory, through phase space.   Suppose that A = A[ξ, t] is some property of the system that depends upon the phase-space variables and may also depend explicitly upon time as well.  The total time rate of change for this property is then

\(TextForm\`dA\/dt = \(∂A\/∂t\  + \ ∑\+\(i = 1\)\%f\((\(∂A\/∂q\_i\) \(\(q\_i\)\& . \)\  + \ \(∂A\/∂p\_i\) \(p\& . \)\_i)\)\  = ∂A\/∂t\  + \ \ \(\(∑\+\(i = 
                  1\)\%f\)\((\(∂A\/∂q\_i\) ∂H\/∂p\_i\  - \ \(∂A\/∂p\_i\) ∂H\/∂q\_i)\)\(\ \)\)\)\)

Thus, if we define the Poisson bracket [A, H] as

\(TextForm\`\([A, 
        H]\)\  = \ ∑\+\(i = 1\)\%f\((\(∂A\/∂q\_i\) ∂H\/∂p\_i\  - \ \(∂A\/∂p\_i\) ∂H\/∂q\_i)\)\)

we obtain the time dependence

\(TextForm\`dA\/dt = \(\(∂A\/∂t\)\(\ \)\(+\)\(\ \)\([A, H]\)\(\ \)\)\)

Therefore, if we assume that the Hamiltonian does not depend explicitly upon time,

\(TextForm\`∂H\/∂t = \(0\ \ \ ⟹\ \ \(dH\/dt\) = 0\)\)

we immediately find that the energy E=H[ ξ[0] ]  is a constant of the motion for conservative systems.  States of specified energy are confined to a 2  f - 1 dimensional hypersurface embedded in the 2  f dimensional phase space.

A classical ensemble consists of a set of points in phase space, with each point representing a system in a specified microstate.  The number of points in a region of phase space near ξ in a volume \(TraditionalForm\`dΓ = ∏\+\(i = 1\)\%fdq\_i\ dp\_i\) is given by ρ[ξ, 
          t] dΓ, where the phase-space density ρ[ξ, t] is the classical analog of the quantum mechanical density operator.  As each member of the ensemble moves through phase space along a trajectory specified by Hamilton's equations of motion, the phase space density evolves in time.  Consider a simply-connected volume Γ bounded by a surface σ.  The number of systems within Γ is given by

\(TextForm\`N\_Γ = ∫\_Γd\ Γ\ ρ[ξ, t]\)

Using the divergence theorem, the rate at which members of the ensemble leave volume Γ can be expressed in terms of the flux through the surface σ as

\(TextForm\`∫\_σd\(σ\& ⇀ \)·\(j\& ⇀ \)\  = \ ∫\_ΓdΓ\ ∇\(\(·\)\(j\& ⇀ \)\)\)

where (Overscript[j, ⇀]) = ρ (Overscript[v, ⇀]) is the current based upon phase velocity \(TraditionalForm\`v\&⇀ = {q\& . \_1, ⋯, 
          p\& . \_f}\).  Thus, recognizing that members of the ensemble are neither created nor destroyed, the phase-space density must satisfy a continuity equation of the form

\(TextForm\`∂ρ\/∂t + ∇\(\(·\)\(j\&⇀\)\) = \ 0\)

The two contributions to the divergence

∇·(ρ(Overscript[v, ⇀])) =  \(v\&⇀·∇ρ\ \  + \ \ ρ\ ∇\(\(·\)\(v\&⇀\)\(\ \)\)\)

can be simplified using Hamilton's equations of motion

\(TextForm\`v\&⇀·∇ρ\  = \(∑\+\(i = 1\)\%f\((\(∂ρ\/∂q\_i\) ∂q\_i\/∂t + \(∂ρ\/∂p\_i\) ∂p\_i\/∂t)\)\  = \ \([ρ, H]\)\)\)
\(TextForm\`∇\(\(·\)\(v\&⇀\)\)\  = \ \ \(∑\+\(i = 1\)\%f\((∂\(q\& . \)\_i\/∂q\_i + ∂\(p\& . \)\_i\/∂p\_i)\)\  = \ \(∑\+\(i = 1\)\%f\((∂\^2 H\/\(∂q\_i ∂p\_i\) - ∂\^2 H\/\(∂p\_i ∂q\_i\))\)\  = \ 0\)\)\)

Therefore, Liouville's theorem

\(TextForm\`dρ\/dt = \(∂ρ\/∂t + 
          v\&⇀·∇ρ\  = \ \(∂ρ\/∂t + \([ρ, H]\)\  = \ 0\)\)\)

states that the local density in the phase-space neighborhood of a representative point is conserved.  In fluid mechanics, the total derivative \(TraditionalForm\`dρ\/dt = ∂ρ\/∂t + 
          v\&⇀·∇ρ\), known as a convective derivative, measures the time dependence of the density for a moving parcel of fluid viewed from a point that moves with that parcel, rather than from a fixed location.  According to Liouville's theorem, the phase-space density for a system obeying Hamilton's equations of motion behaves like an incompressible fluid.  Therefore, as a classical ensemble evolves its location and shape in phase space may change but its volume is conserved.

The ensemble average of property A which depends upon the phase-space variables is

\(TextForm\`⟨A⟩\  = \ \(∫dΓ\ ρ[ξ, t] A[ξ, t]\)\/\(∫dΓ\ ρ[ξ, t]\)\)

where the integral spans the entire phase space.  Note that Liouville's theorem ensures that the denominator is constant.  In order to obtain a stationary expectation value we normally require that neither A nor ρ depend explicitly upon time, but this condition is not sufficient because as the phase point moves along the trajectories specified by their equations of motion the density ρ[ξ, t] evolves.  Equilibrium requires

\(TextForm\`equilibrium\ \ ⟹\ \ \(∂ρ\/∂t\) = \(0\ \ ⟹\ \ \([ρ, H]\)\  = \ 
        0\)\)

and is most simply achieved using an ensemble ρ = ρ[H] based upon the Hamiltonian.  The canonical ensemble

canonical ensemble :    ρ  ∝  
          Exp[-β H]

clearly satisfies this condition and, hence, is stationary.  Alternatively, the microcanonical ensemble consisting of all states within the volume of phase space within a specified range of energy

\(TextForm\`microcanonical\ \(ensemble : \ ρ\)\  = \ Γ\^\(-1\)\ Θ[\(\(δ E\)\(-\)\) | 
            E - H[ξ] | ]\)

is also stationary.

Counting states in classical phase space

If classical microstates were to correspond to mathematical points in phase space, the total number of states compatible with finite intervals of energy and volume would be infinite for most systems.  Thus, the calculation of entropy, or other thermodynamic potentials, is problematical in classical statistical mechanics.  Sensible enumeration of classical microstates requires that a 2  f dimensional phase space be divided into cells with finite volume (δ^f) where δ has dimensions dq dp.  Although we might envision a classical limit δ -> 0, such a limiting procedure would yield infinite entropies.  Fortunately, quantum mechanics provides a natural discretization of the phase space — the uncertainty principle limits the precision with which conjugate coordinates and momenta can be specified.  Thus, we expect that δ must be closely related to Planck's constant.  Furthermore, if the parameter δ is to remain small and finite it must be a universal constant so that entropies can be added meaningfully for systems of different types.  Hence, we are free to evaluate this constant by comparison with any convenient quantum system.  The two examples below both suggest that δ = h.  Therefore, we normalize the differential phase-space volume element

\(TextForm\`dΓ\  = \ ∏\+\(i = 1\)\%f\(dq\_i dp\_i\)\/h\)

using a factor (h^(-1)) for each degree of freedom.

This analysis is based upon an inverse correspondence principle.  In quantum mechanics one often use correspondence with classical physics to determine the form of the Hamiltonian, but here we use quantum mechanics to determine the normalization factor for the phase-space density.  Similarly, we sometimes mix classical descriptions for some aspects with quantum mechanical descriptions of other degrees of freedom.  For example, when we study the heat capacity for noninteracting gases with internal rotational and vibrational degrees of freedom we will employ a classical description for the center of mass but quantum mechanical descriptions for the internal excitations of each molecule.  These types of mixed models are described as semiclassical.  It is interesting to observe that quantum statistics is usually easier than classical statistics and that classical statistics usually does not make sense unless quantum mechanics is used to obtain finite entropy.

Example: harmonic oscillator

Consider a one-dimensional harmonic oscillator with Hamiltonian H = ((p^2)/(2  m))  +  (1/2) k (q^2).

States with energy E are found on an ellipse with axes ±(Sqrt[2  E/k ]) in q and ±(Sqrt[2  m E]) in p.  The microcanonical ensemble of systems with energy E is then the set of points on the ellipse, which is infinite in number.  To obtain finite results, we discretize the set and claim that the multiplicity Ω[E] is proportional to the circumference of the ellipse.  Similarly, the number of states Σ[E] with energies (E^′) ≤ E is proportional to the area of the ellipse.  Thus, we claim

\(TextForm\`Σ\  = \ \(π\/Σ\_0\ \(\@\(\(2  
                    E\)\/k\)\) \@\(2  m\ E\)\  = \ \(\(\(2  π\ E\)\/Σ\_0\) \@\(m\/k\)\  = \ 
          2  π\ E\/\(ω\ Σ\_0\)\)\)\)

where (Subscript[Σ, 0]) is the area of an elementary cell in phase space and where we have used the harmonic oscillator frequency ω = (Sqrt[k/m]).  Classical physics does not specify the cell size — because classical physics claims that it is possible, at least in principle, to specify coordinates and momenta with arbitrary precision, it would appear that one should take the limit (Subscript[Σ, 0]) -> 0.  Thus, in that limit entropy becomes infinite because there are an infinite number of states compatible with the definition of the ensemble.  However, quantization of energy requires there to be a minimum volume of phase space surrounding each of the finite number of states in a specified energy range.  The simplest method for obtaining this cell size is to examine the density of states

\(TextForm\`g = \(∂Σ\/∂E = \(2  π\)\/\(ω\ Σ\_0\)\)\)

and to use the quantization of energy

\(TextForm\`g = \(\(1\/\(ℏ\ ω\)\)\ \ \ ⟹\ \ \ Σ\_0 = \ \(2  π\ ℏ\  = \ 
          h\)\)\)

to recognize that the cell size is governed by Planck's constant.

Example: particle in a box

Consider a cubical box with volume V = (L^3) containing N noninteracting particles with mass m.  Single-particle wave functions take the form

ψ (x, y, z)  ∝ 
      Sin[(Subscript[k, x]) x] Sin[(Subscript[k, y]) y] Sin[(Subscript[k, z]) z]

where the requirement that ψ vanishes upon the walls imposes the quantization condition

\(TextForm\`k\_i = \(\(n\_i\) π\)\/L\ \ \ \ \ \ \ \ \ \ \ i ∈ {x, y, z}\)

where the (Subscript[n, i]) must be integers.  Thus, we find that the spacing between adjacent wave numbers is π/L such that each quantum state occupies a cell in k-space with volume (((π/L))^3).  Assuming that nonrelativistic kinematics applies, the single-particle energies become

(Subscript[ε, k])=((p^2)/(2  m))= ((((ℏ k))^2)/(2  m))=(n^2) (Subscript[ε, 0])

where

\(TextForm\`ε\_0 = \(\(\(π\^2\) ℏ\^2\)\/\(2  m\ L\^2\) = h\^2\/\(8  m\ L\^2\)\)\)

is the basic unit of energy and

(n^2) = ((Subscript[n, x])^2) + ((Subscript[n, y])^2) + ((Subscript[n, z])^2)

represents a dimensionless excitation variable.  Note that n ≥ 1 but need not be an integer.

The states available to a particle in the box can be represented by points on a three-dimensional lattice in the space {(Subscript[k, x]), (Subscript[k, y]), (Subscript[k, z])}.  All distinct states are represented by points with the octant with all (Subscript[n, i]) ≥ 0; negative integers merely change the sign of the wave function and are redundant.  The total number of states in the spherical shell with radius between k and k + dk is then the volume of one octant of a spherical shell divided by the cell volume, such that

\(TextForm\`dΓ = \(\(1\/8\) \(4  π\ \(k\^2\) dk\)\/\((π/L)\)\^3 = \(V\/\(2  π\^2\)\) \(k\^2\) dk\)\)

Although this derivation was made for a cube, it can be shown that for a sufficiently large volume V the result is independent of the shape of the enclosure.  Therefore, it is convenient to express dΓ in the more general form

\(TextForm\`dΓ = \(\(d\^3 r d\^3 p\)\/\((2  π\ ℏ)\)\^3 = \(ρ\_1[ξ] dξ\ \ \ ⟹\ \ \ ρ\_1[ξ\_1] = \((2  π\ ℏ)\)\^\(-3\)\)\)\)

where ξ = {(Overscript[r, ⇀]), (Overscript[p, ⇀])} are the coordinates of a single particle and (Subscript[ρ, 1]) is the classical phase-space density for a single particle.

Therefore, the volume δ for an elementary cell in classical phase space is identified as being Planck's constant, h = 2  π ℏ.  This result is obviously related to the Heisenberg uncertainty principle, which states that there is a finite precision with which a pair of conjugate variables can be known simultaneously.

Equipartition theorem

A powerful theorem of classical statistical mechanics concerns the equipartition of energy among the harmonic degrees of freedom.  Suppose that the energy E = 
        E[(Subscript[q, 1]), ⋯, (Subscript[q, f]), (Subscript[p, 1]), ⋯, (Subscript[p, f])] can be separated in the form

E = (Subscript[ε, i])[(Subscript[ξ, i])]  +  (E^′)[
          (Subscript[q, 1]), ⋯, (Subscript[p, f])]

where (Subscript[ξ, i]) is any coordinate or momentum which does not appear in (E^′).  Further, suppose that (Subscript[ε, i]) = b ((Subscript[ξ, i])^α).  Normally α = 2 for a harmonic coordinate or momentum.  If α is even, the integration extends over -∞ < (Subscript[ξ, i]) < ∞, but for odd or nonintegral α the range of (Subscript[ξ, i]) must be limited to ensure a convergent integral.

The mean value of (Subscript[ε, i]) in the canonical distribution is

\(TextForm\`\(ε\_i\)\&_\  = \ \(\(∫dΓ\ Exp[\(-β\)\ ε\_i] Exp[\(-β\)\ E\^′]\ ε\_i\)\/\(∫\(\(dΓ\)\(\ \)\(Exp[\(-β\)\ ε\_i]\) \(Exp[\(-β\)\ E\^′]\)\(\ \)\)\) = \(\(∫dξ\ Exp[\(-β\)\ ε\_i]\ ε\_i\)\/\(∫dξ\ Exp[\(-β\)\ ε\_i]\)\  = \ \(-\(∂\/∂β\)\) 
            Log[∫dξ\ Exp[\(-β\)\ ε\_i]]\)\)\)

If we now let

\(TextForm\`y\^α ≡ β\ ξ\^α\ \ ⟹\ \ \(dξ\) = \(β\^\(\(-1\)/α\)\) dy\)

we find

\(TextForm\`∫dξ\ Exp[\(-β\)\ b\ ξ\^α]\  = \ \(β\^\(\(-1\)/α\)\) \(∫\(\(dy\)\(\ \ \)\(Exp[\(-b\)\ y\^α]\)\(\ \)\)\)\)

Assuming that the limits of integration with respect to y do not depend upon β, viz. the limits of ξ are (0,∞) or (-∞, ∞), we obtain

\(TextForm\`Log[∫dξ\ Exp[\(-β\)\ ε]] = \(\(-α\^\(-1\)\) Log[β] + 
          Log[∫dy\ \ Exp[\(-b\)\ y\^α]\ ]\ \ ⟹\ \ \(∂\/∂β\) 
            Log[∫dξ\ Exp[\(-β\)\ ε]] = \(-\(\(\(k\_B\) T\)\/α\)\)\)\)

Thus, the mean value of (Subscript[ε, i]) reduces to (Subscript[k, B]) T/α.  Therefore, the equipartition theorem states:

For example, consider an ideal gas consisting of nonrelativistic particles with no internal degrees of freedom.  The total energy is then a sum of 3  N quadratic contributions to the kinetic energy arising from the three independent momentum components for each particle.  Hence, the equipartition theorem predicts U = (3/2) N (Subscript[k, B]) T for a nonrelativistic ideal gas.

The equipartition theorem also applies to internal degrees of freedom.  For example, consider a diatomic molecule.  Harmonic vibrations along the separation between the two atoms contribute two quadratic terms to the energy, one for the internal potential and one for the internal kinetic energy.  Hence, the equipartition theorem predicts an additional contribution of 2 (N (Subscript[k, B]) T/2) to the internal energy of the gas.  Furthermore, diatomic molecules possess two degrees of freedom corresponding to rotations about axes perpendicular to the symmetry axis.  Note that rotations about a symmetry axis are forbidden by quantum mechanics because the physical state is unchanged.  According to the equipartition theorem, these rotations contribute (Subscript[k, B]) T for each molecule.  Therefore, we predict that the specific heat for a gas of diatomic molecules should be

diatomic ⟹  (Subscript[C, V]) = (7/2) 
        R

based upon equipartition among translational, rotational, and vibrational degrees of freedom.

Although equipartition of the energy among independent degrees of freedom is an important property of classical statistical mechanics, uncritical application of the theorem can lead to absurd results.  According to the theorem, the contribution of each independent degree of freedom to the internal energy appears to be independent of the amplitude of the motion associated with that coordinate.  Consider a gas of diatomic molecules for which the internal spring constant is enormous.  Unless the kinetic energies are large enough for collisions to excite this stiff spring, the molecules might as well be rigid.  However, the equipartition theorem predicts that the contribution to the internal energy of the gas is the same for small T as for high T whether or not the spring can be excited with appreciable amplitude.  This contribution remains even as we make the spring infinitely stiff.

This prediction of classical statistical mechanics leads to a serious paradox.  Any classical system can be subdivided into arbitrarily small components interacting with each other.  The binding of adjacent parts can be described by potential and kinetic contributions to the total energy.  Each of these degrees of freedom contributes equally to the specific heat even if the binding forces are so strong that these parts are rigidly bound.  Therefore, classical statistical mechanics predicts the absurd result that all specific heats are infinite!

The resolution of this paradox again lies in quantum mechanics.  Because microscopic motions are quantized, these motions can be excited in discrete quantities only, not with amplitudes related to the excitation energy.  Unless sufficient energy is available, some degrees of freedom will be dormant and will not contribute to the specific heat.  Only when \(TraditionalForm\`\(\(k\_B\) \(T\)\(\ \)\(is\)\(\ \)\(much\)\(\ \)\(larger\)\(\ \)\(than\)\(\ \)\(the\)\(\ \)\(spacing\)\(\ \)\)\)between energy levels is classical equipartition among available degrees of freedom achieved.  Nevertheless, the theorem does provide limiting values that are useful when the number of active degrees of freedom can be enumerated.

Example: harmonic oscillators

Consider a collection of N independent classical harmonic oscillators with the same frequency ω governed by the Hamiltonian

\(TextForm\`H = \(∑\+\(i = 1\)\%N H\_i\  = \ ∑\+\(i = 1\)\%N\((p\_i\^2\/\(2  m\) + \(1\/2\) m\ \(ω\^2\) 
                q\_i\^2)\)\)\)

The separability of the energy permits factorization of the canonical partition function, Z = ((Subscript[Z, 1])^N), where

\(TextForm\`Z\_1 = \(∫\(dq dp\)\/h\ Exp[\(-β\) \((p\^2\/\(2  m\) + \(1\/2\) 
                      m\ \(ω\^2\) 
                      q\^2)\)]\  = \ \(\(k\_B\) T\)\/\(ℏ\ ω\)\)\)

Thus, the principal thermodynamic functions become

F  =  -N (Subscript[k, B]) 
        T Log[(((Subscript[k, B]) T)/(ℏ ω))]
\(TextForm\`U\  = \ \(\(-\(\(∂ln\ Z\)\/∂β\)\) = \ \(N\ \(k\_B\) T\ \ \ \ ⟹\ \ \ C\_V = 
          N\ k\_B\)\)\)
S = ((U - F)/T) = N (Subscript[k, B]) (1  +  
                Log[(((Subscript[k, B]) T)/(ℏ ω))])  =  
          N (Subscript[k, B]) (1  +  
                Log[(U/(N ℏ ω))])
μ = -T (Subscript[((∂(S/∂)N)), U]) = - 
            (Subscript[k, B]) T Log[(((Subscript[k, B]) T)/(ℏ ω))]

The pressure vanishes because in this simple model there are no interactions between oscillators and no dependence of the oscillator frequency upon the volume or density of the system.

The internal energy is consistent with the classical equipartition theorem which assigns (1/2) (Subscript[k, B]) T to each harmonic coordinate or momentum that appears in the Hamiltonian.  In the high-temperature limit the entropy per oscillator is proportional to average number of quanta of excitation, U/N ℏ ω, which according to the equipartition theorem is equal to (Subscript[k, B]) T/ℏ ω.  Similarly, at high temperature the chemical potential is large and negative.  However, the low temperature limit remains problematical because the entropy appears to become negative for (Subscript[k, B]) 
          T/ℏ ω  ≤  (e^(-1)).  Therefore, the classical enumeration of microstates fails as the average number of quanta per degree of freedom falls below unity.  Clearly, we must employ quantum mechanics in the low temperature limit where the thermal energy (Subscript[k, B]) T becomes comparable to the spacing between energy levels.  The limiting value (Subscript[C, V]) = N (Subscript[k, B]) applies to high temperatures but the heat capacity is suppressed at low temperature where insufficient energy is available to excite the modes counted by the equipartition theorem.

Virial theorem

We now consider a generalization of the equipartition theorem for classical systems.  The proof is usually presented using the microcanonical ensemble but is much easier using the canonical ensemble.  Hence, we choose the latter confident that the results are independent of ensemble in the thermodynamic limit.

The virial theorem is a generalization of the familiar work-energy theorem in Newtonian mechanics that applies in Hamiltonian mechanics to generalized coordinates and forces.  To motivate this generalization, consider the time dependence of ∑(Subscript[(Overscript[r, ⇀]), i])·
          (Subscript[(Overscript[p, ⇀]), i]) for a collection of N nonrelativistic classical particles with coordinates (Subscript[(Overscript[r, ⇀]), i]) and momenta (Subscript[(Overscript[p, ⇀]), i]), such that

\(TextForm\`\(d\/dt\) \(∑\+\(i = 1\)\%N r\&⇀\_i·
            p\&⇀\_i\)\  = \ \(∑\+\(i = 1\)\%N\((r\&⇀\_i·dp\&⇀\_i\/dt + \ 
              p\&⇀\_i·dr\&⇀\_i\/dt)\)\  = \ ∑\+\(i = 1\)\%N\((\ 
            r\&⇀\_i·F\&⇀\_i\  + \ 
              2  K\_i)\)\)\)

where (Subscript[(Overscript[F, ⇀]), i]) is the force acting on particle i and \(TraditionalForm\`K\_i = \(p\^2\/\(2  m\) = \ \(1\/2\) 
            p\&⇀\_i·dr\&⇀\_i\/dt\)\) is its kinetic energy.  Since the ensemble average of ∑(Subscript[(Overscript[r, ⇀]), i])·
          (Subscript[(Overscript[p, ⇀]), i]) must be constant in equilibrium, we find

\(TextForm\`⟨\(d\/dt\) \(∑\+\(i = 1\)\%N r\&⇀\_i·
              p\&⇀\_i\)⟩\  = \ \(\(d\/dt\) ⟨∑\+\(i = 1\)\%N r\&⇀\_i·
                p\&⇀\_i⟩\ \  = \ \ \(0\ \ \ ⟹\ \ \ 𝒱\  = \ \ \(⟨\ ∑\+\(i = 1\)\%N\ 
                r\&⇀\_i·
                  F\&⇀\_i\ ⟩\  = \ \(-2\) 
              K\)\)\)\)

where \(TraditionalForm\`K = ⟨∑\+i K\_i⟩\) is the average kinetic energy and 𝒱 is known as the Clausius virial.  Alternatively, for any particle we can evaluate the long-term time average of (Subscript[(Overscript[r, ⇀]), i])·
        (Subscript[(Overscript[F, ⇀]), i]) using

\(TextForm\`\(r\&⇀\_i·F\&⇀\_i\)\&_ = \(\(1\/𝒯\) \(∫\_o\%𝒯dt\ \ \(r\&⇀\_i\) \((t)\)·
                F\&⇀\_i \((t)\)\)\  = \ \(1\/𝒯\) \((r\&⇀\_i·p\&⇀\_i)\)\_0\%𝒯\  - \ \(1\/𝒯\) \(∫\_0\%𝒯\(\(dt\)\(\ \ \)\(m\)\(\ \)\(v\_i\^2\)\(\ \)\)\)\)\)

where 𝒯 is the observation period.  Making the perfectly reasonable assumption that the coordinates and momenta remain finite, the integrated term must vanish in the limit 𝒯 -> ∞, such that

\(TextForm\`\(r\&⇀\_i·F\&⇀\_i\)\&_ = \ \(\(-2\) \(K\_i\)\&_\ \ \ ⟹\ \ \ ⟨\ ∑\+i\ r\&⇀\_i·F\&⇀\_i\ ⟩\&_\  = \ \(-2\) K\&_\)\)

Therefore, we obtain the same virial theorem 𝒱 = -2 K from either temporal or ensemble averaging.

This theorem can be generalized to Hamiltonian mechanics by replacing the coordinate (Subscript[r, i]) with the generalized coordinate or momentum (Subscript[ξ, i]) and replacing the force by the generalized force ∂H/∂(Subscript[ξ, j]).  Thus, we seek to evaluate the ensemble average

\(TextForm\`⟨\(ξ\_i\) ∂H\/∂ξ\_j⟩\  = \ \(∫dΓ\ \(e\^\(\(-β\)\ H\)\) \(ξ\_i\) ∂H\/∂ξ\_j\)\/\(∫dΓ\ e\^\(\(-β\)\ H\)\)\)

where (Subscript[ξ, i]) represents any of the generalized coordinates or momenta that appear in the Hamiltonian H.  The numerator can be integrated by parts with respect to (Subscript[ξ, j]), such that

\(TextForm\`∫dΓ\ \(e\^\(\(-β\)\ H\)\) \(ξ\_i\) ∂H\/∂ξ\_j = \ \(-\(1\/β\)\) \(∫dΓ\_j\%′\ \((\((\(ξ\_\(\(i\)\(\ \)\)\) e\^\(\(-β\)\ H\))\)\_\(ξ\_j\) - \ ∫dξ\_j \( e\^\(\(-β\)\ H\)\) ∂ξ\_i\/∂ξ\_j)\)\)\)

where d(Subscript[Γ, j]^′) excludes d(Subscript[ξ, j]) and where the integrated portion (surface terms) must be evaluated for the extreme values of (Subscript[ξ, j]).  We assume that the surface terms vanish for extreme values of (Subscript[ξ, j]).  For example, if (Subscript[ξ, j]) is a position coordinate for a system confined to a finite volume the extreme values are on the walls where the confinement potential is infinite and the Boltzmann factor vanishes.  Similarly, if (Subscript[ξ, j]) is a momentum the extreme values represent infinite kinetic energies for which the surface terms also vanish.  Thus, we are left with

\(TextForm\`∫dΓ\ \(e\^\(\(-β\)\ H\)\) \(ξ\_i\) ∂H\/∂ξ\_j = \ \(\(k\_B\) T\ \(∫dΓ\ \(e\^\(\(-β\)\ H\)\) ∂ξ\_i\/∂ξ\_j\)\  = \ \(δ\_\(i, j\)\) \(k\_B\) 
          T\ \(∫dΓ\ e\^\(\(-β\)\ H\)\)\)\)

Therefore, we obtain the virial theorem in the more general form

\(TextForm\`⟨\(ξ\_i\) ∂H\/∂ξ\_j⟩\  = \ \(δ\_\(i, 
            j\)\) \(k\_B\) T\)

The virial theorem includes the equipartition theorem as a special case.  Suppose that the Hamiltonian can be separated in the form H = (Subscript[ε, j]) + (Subscript[H, j]^′) where (Subscript[ε, j]) = b ((Subscript[ξ, j])^α) and where (Subscript[H, j]^′) is independent of (Subscript[ξ, j]).  We then obtain

\(TextForm\`\(ξ\_j\) ∂H\/∂ξ\_j = \ \(α\ ε\_j\ \ \ ⟹\ \ \(ε\_j\)\&_\  = \(\(\ \)\(\(k\_B\) T\)\)\/α\)\)

as before.  More generally, using

\(TextForm\`⟨\(q\_i\) ∂H\/∂q\_i⟩\  = \ \(\(-\ ⟨\(q\_i\) \(p\& . \)\_i⟩\)\  = \ \(k\_B\) T\)\)
\(TextForm\`⟨\(p\_i\) ∂H\/∂p\_i⟩\  = \ \ \ \(⟨\(p\_i\) \(q\& . \)\_i⟩\  = \ \(k\_B\) T\)\)

we find

\(TextForm\`⟨\ ∑\+\(i = 1\)\%\(3  N\)\(p\_i\) \(q\& . \)\_i⟩\  = \ 
      3\ N\ \(k\_B\) T\)
\(TextForm\`⟨\ \(-\(∑\+\(i = 1\)\%\(3  N\)\(q\_i\) \(p\& . \)\_i\)\)⟩\  = \ 
      3\ N\ \(k\_B\) T\)

for N particles in three dimensions without having to assume that the Hamiltonian is separable.

Example: quadratic forms

Suppose that the Hamiltonian can be expressed in the form

H  =  (∑_j)((Subscript[A, j]) ((Subscript[p, i])^2) + (Subscript[B, j]) 
              ((Subscript[q, j])^2))

by means of an appropriate canonical transformation.  Clearly,

\(TextForm\`\(\(\ \)\(∑\+j\((\(p\_j\) ∂H\/∂p\_j + \(q\_j\) ∂H\/∂q\_j)\)\  = \ 
      2  H\)\)\)

for this homogeneous second-order function.  Thus, the virial theorem takes the form

⟨H⟩  =  (1/2) 
        f (Subscript[k, B]) T

where f is the total number of harmonic contributions to the Hamiltonian (coordinates + momenta).  Note that this result is independent of the coefficients, (Subscript[A, j]) or (Subscript[B, j]).

More generally, consider a Hamiltonian of the general quadratic form

\(TextForm\`H = \(1\/2\) \(∑\+\(i, j\)\(ξ\_i\) \(ℳ\_\(i, j\)\) ξ\_j\)\)

where each (Subscript[ξ, i]) is a generalized coordinate or momentum and (Subscript[ℳ, i, j]) is an f-dimensional square matrix with positive eigenvalues.  Using the virial theorem we again find

\(TextForm\`\(\(\ \)\(∑\+j\( ξ\_j\) ∂H\/∂ξ\_j\  = \ \(2 
           H\ \ \ ⟹\ \ ⟨H⟩\  = \ \(1\/2\) f\ \(k\_B\) T\)\)\)\)

where f is the number of active degrees of freedom.  This result can be applied to the rotational Hamiltonian for a rigid rotor

\(TextForm\`H\_rot = \(\(1\/2\) \(∑\+\(i, j\)\(ω\_i\) \(I\_\(i, 
                  j\)\) ω\_j\ \ ⟹\ \ \ ⟨H\_rot⟩\)\  = \ 
        3\/2\ \(k\_B\) T\)\)

where (Subscript[I, i, j]) is the rotational inertia tensor and (Subscript[ω, i]) are the three components of angular velocity with respect to the center of mass.

However, one must always exercise care in application of classical equipartition or virial theorems.  Consider a diatomic molecule composed of two ions surrounded by an electron cloud.  The moments of inertia about axes perpendicular to the separation between the ions are equal, (Subscript[I, 1]) = (Subscript[I, 2])=I , but the moment of inertia about the symmetry axis (Subscript[I, 3]) ≪ I is much smaller because essentially all of the mass is concentrated in the ions and the nuclear radii, (Subscript[r, N]), are smaller than interatomic separations, R, by a factor of order (10^(-5)), such that

((Subscript[I, 3])/(Subscript[I, 1]))~(((Subscript[m, e]) (R^2) + (Subscript[m, N]) 
                ((Subscript[r, N])^2))/((Subscript[m, N]) (R^2))) = 
      ((Subscript[m, e])/(Subscript[m, N])) + (((((Subscript[r, N])/R)))^2)~(10^(-3)) + 
        (10^(-10))

Hence, the energy scale for classical rotation about the separation axis is about a factor of (10^3) higher than the energy for the orthogonal axes.  Recognizing that high energy modes are "frozen out" unless the temperature is high enough to permit full participation, we expect to obtain a rotational contribution to the heat capacity of R for modest temperatures and an increase to (3/2) R for high temperatures.  Furthermore, there is a more rigorous quantum mechanical argument that excludes rotations about the symmetry axis.  Quantum mechanically, rotation about a symmetry axis may change the phase of a wave function but does not lead to a new state of the system — the rotated state is indistinguishable from the original.  Thus, there is no dynamical variable associated with rotations about a symmetry axis and no associated contribution to the internal energy or heat capacity.  Therefore, in the absence of an electronic excitation which breaks the rotational symmetry, there are only two active rotational degrees of freedom for a diatomic molecule.

Example: nonrelativistic ideal gas

We can evaluate Clausius' virial explicitly for an ideal gas in which the only forces which act on the particles are the confinement forces at the walls.  Since those forces act only at the walls and are responsible for the pressure p upon the gas, we can write

\(TextForm\`⟨\ ∑\+i\ 
          r\&⇀\_i·
            F\&⇀\_i\%wall\ ⟩\  = \ \(-p\) \(∫dA\&⇀·
            r\&⇀\)\)

where d(Overscript[A, ⇀]) is an outward element of surface area and (Overscript[r, ⇀]) is the coordinate vector for a particle at the surface of the container.  The surface integral can be evaluated using Gauss' law

\(TextForm\`∫d\(A\& ⇀ \)·\(r\& ⇀ \)\  = \ \(∫d\^3 
              r\ ∇\(\(·\)\(r\& ⇀ \)\)\  = \ 
        3  V\)\)

so that

⟨ (∑_i) 
          (Subscript[(Overscript[r, ⇀]), i])·
            (Subscript[(Overscript[F, ⇀]), i]^wall) ⟩  =  -3 
          p V  =  -2 
            U   ⟹  p V  =  (2/3) U  =  
            N (Subscript[k, B]) T

for an ideal nonrelativistic gas for which U = K.

Example: ultrarelativistic ideal gas

Consider a dilute gas that is so hot that the ultrarelativistic limit, (Subscript[ε, i]) = (Subscript[p, i]) c, applies.  Although the Hamiltonian does not separate in a convenient manner for use of the equipartition theorem, we can apply the virial theorem to each component α of the momentum (Subscript[(Overscript[p, ⇀]), i]) for particle i

\(TextForm\`H\  = \(∑\+\(i = 1\)\%N p\_i\ c\ \  = \ \(c\ \(∑\+\(i = 1\)\%N\((p\_\(i, x\)\^2 + p\_\(i, y\)\^2 + p\_\(i, z\))\)\^\(1/2\)\ \ ⟹\ \ \(∂H\/∂p\_\(i, α\)\)\) = \(\(\(c\ p\_\(i, α\)\)\/p\_i\)\ \ ⟹\ \ ⟨\(p\_\(i, α\)\) ∂H\/∂p\_\(i, α\)⟩ = \(k\_B\) T\)\)\)\)

such that the summation over components gives the mean single-particle energy as

\(TextForm\`\(\(\ \)\(⟨ε\_i⟩\  = \ \(⟨\ ∑\+α\( 
                  p\_\(i, α\)\) ∂H\/∂p\_\(i, α\)\ ⟩\  = \ 
        3\ \(k\_B\) T\)\)\)\)

Therefore, the internal energy of an ultrarelativistic gas becomes

U = 3  N (Subscript[k, B]) T   ⟹  (Subscript[C, V]) = 
        3 N (Subscript[k, B])

which is larger by a factor of two than the corresponding nonrelativistic result.

Maxwell velocity distribution

Consider a gas that is sufficiently dilute that intermolecular interactions may be neglected.  The single-particle energy may then be expressed in the form

ε = 
      ((p^2)/(2  m)) + (Subscript[ε, s]) + 
        V[(Overscript[r, ⇀])]

where (Subscript[ε, s]) is the internal excitation for state s and V[(Overscript[r, ⇀])] is an external potential.  Internal modes of excitation may include rotational or vibrational motions within a molecule or excitations of electrons.  The external potential includes the confinement potential, defined to vanish within the enclosure and to become infinite at its walls, and may include the gravitational potential or interactions with an applied electromagnetic field.

The probability (Subscript[P, s])[(Overscript[r, ⇀]), 
          (Overscript[p, ⇀])] (d^3) r (d^3) 
          p for a molecule in internal state s to be found within a small volume (d^3) r at position (Overscript[r, ⇀]) and with momentum in a volume (d^3) p centered on (Overscript[p, ⇀]) is then expressed in the canonical distribution as

(Subscript[P, s])[(Overscript[r, ⇀]), 
          (Overscript[p, ⇀])] (d^3) r (d^3) 
          p   ∝  
      Exp[-((β (p^2))/(2  m))] 
        Exp[-β (Subscript[ε, s])] 
        Exp[-β V[(Overscript[r, ⇀])] ] (d^3) 
          r (d^3) p

It is important to recognize that since the three contributions to the energy are separable, the probability is factorizable, such that

(Subscript[P, s])[(Overscript[r, ⇀]), 
          (Overscript[p, ⇀])] (d^3) r (d^3) 
          p  =  ((Subscript[P, p])[(Overscript[p, ⇀])] (d^3) 
              p)  ((Subscript[P, r])[(Overscript[r, ⇀])] (d^3) r) 
        (Subscript[P, s])

where

(Subscript[P, p])[(Overscript[p, ⇀])] (d^3) 
          p   ∝  
      Exp[-((β (p^2))/(2  m))] (d^3) 
          p

governs the momentum distribution,

\(TextForm\`P\_r[r\&⇀] d\^3 
          r\ \  ∝ \ 
      Exp[\(-β\)\ V[
              r\&⇀]\ ] \(\(d\^3\)\(r\)\(\ \)\)\)

governs the density, and

(Subscript[P, s])  ∝  
      Exp[-β (Subscript[ε, s])]

governs the spectrum of internal molecular excitations.

First, consider a free monatomic gas for which (Subscript[ε, s]) = 0 and for which V[(Overscript[r, ⇀])] vanishes within the enclosure but is essentially infinite at the walls so that there is no possibility for escape.  The density is then independent of position and (Subscript[P, r]) = (V^(-1)) such that the position probability integrated over volume is normalized to unity.  The normalization of (Subscript[P, p]) is determined by the integral

\(TextForm\`∫\_\(-∞\)\%∞dp\ Exp[\(-\(\(β\ p\^2\)\/\(2  
                    m\)\)\)]\ \ \  = \ \(\((2  π\ m\ \(k\_B\) T)\)\^\(\(1/2\)\(\ \)\)\  = \ p\_B\)\)

Therefore, the basic probability distribution for momentum is

(Subscript[P, p])[(Overscript[p, ⇀])] (d^3) 
          p  =   Exp[-((β (p^2))/(2  
                  m))] (d^3) (p/((Subscript[p, B])^3))

It is often useful to express this distribution in several equivalent forms.  If we are interested only in the magnitude of the momentum, we can use isotropy to replace the cartesian form (d^3) p by the spherical form

\(TextForm\`d\^3 p -> 
        4  π\ \(p\^2\) dp\ \ ⟹\ \ P\_p[p] dp\  = \ \ Exp[\(-\(\(β\ p\^2\)\/\(2  
                  m\)\)\)]\ \(4  π\ \(p\^2\) dp\)\/p\_B\^3\)

and thus to determine the probability P[p] dp that the magnitude of the momentum vector is found in the interval (p, p + dp).  Alternatively, we define f[v] dv to be the mean number of molecules per unit volume whose velocities are found in the interval (v, v + dv), such that

f[v] dv  =  
      n (Subscript[P, p])[p] dp

where n = N/V is the particle density and p = m v is the nonrelativistic momentum.  Therefore, the customary form for the Maxwell velocity distribution becomes

\(TextForm\`f[v] dv\  = \ 
      n\ Exp[\(-\(\(m\ v\^2\)\/\(2 \( k\_B\) 
                  T\)\)\)]\ \(4  π\ \(v\^2\) dv\)\/v\_B\^3\)

where (Subscript[v, B]) = (((2  π (Subscript[k, B]) T/m))^(1/2)) is a scale parameter for the thermal distribution of velocities.  Finally, if we define dimensionless variables

u = (v/(Subscript[v, B]))                ρ = 
        (p/(Subscript[p, B]))

the various distribution functions may be expressed in the following dimensionless forms.

\(TextForm\`P[ρ\&⇀] d\^3 ρ\ \  = \ \(Exp[\(-π\)\ ρ\^2] d\^3 ρ\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ f[
            u\&⇀] du\ \ \  = \ 
        n\ Exp[\(-π\)\ u\^2] d\^3 
            u\)\)
\(TextForm\`P[ρ] dρ\ \ \ \  = \ \(Exp[\(-π\)\ ρ\^2]\ 4  π\ \(ρ\^2\) dρ\ \ \ \ \ \ \ \ \ \ \ f[u] du\ \ \  = \ 
        n\ Exp[\(-π\)\ u\^2]\ 4  π\ \(u\^2\) du\)\)
\(TextForm\`P[ρ\_x] dρ\_x\  = \ \(Exp[\(-π\)\ ρ\_x\^2]\ dρ\_x\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ f[
            u\_x] du\_x = \ 
        n\ Exp[\(-π\)\ u\_x\^2]\ du\_x\)\)

The Maxwell velocity distribution is sketched below.  A few important characteristics of this distribution are the most probable speed \(TraditionalForm\`u\&~\), the mean speed \(TraditionalForm\`u\&_\), and the rms speed \(TraditionalForm\`u\_rms = ⟨u\^2⟩\^\(1/2\)\).  The most probable velocity is determined by

\(TextForm\`\(f\^′\)[\(u\&~\)] == 
        0\ \ \ \ ⟹\ \ \(u\&~\)\  = \ π\^\(\(-1\)/2\)\)

The mean and rms speeds are determined by the moments

\(TextForm\`u\&_\  = \ \(\(n\^\(-1\)\) \(∫\_0\%∞ 
              u\ f[u] du\)\  = \ 
        2\/π\)\)

\(TextForm\`u\_rms\^2\  = \ \(\(n\^\(-1\)\) \(∫\_0\%∞ u\^2\ f[u] du\)\  = \ 3\/\(2  π\)\)\)

such that

\(TextForm\`\(\(\ \)\(\(u\&~\)\  = \ 0.564\ , \ \ \ \ \ u\&_\  = \ 
      0.637\ \ , \ \ \ u\_rms = \ 0.691\)\)\)

Due to the asymmetric shape of the speed distribution and its long tail extending to relatively large speeds, the mean speed is about 13% larger than the most probable speed and the rms speed is 22% larger than \(TraditionalForm\`u\&~\).  Successive moments with higher powers of u progressively increase due to their increasing emphasis of the tail of the distribution.  Finally, the width of the distribution can be gauged by its rms deviation, \(TraditionalForm\`σ\_u = \(\((⟨u\^2⟩ - ⟨u⟩\^2)\)\^\(1/2\) = 0.48\ u\&~\)\).  Thus, the spread of speeds is clearly a large fraction of the most probable speed.

Inserting the scale parameter (Subscript[v, B]) = (Sqrt[2  π (Subscript[k, B]) T/m]), we find that the moments of the speed distribution

\(TextForm\`v\&~ = \(\(\@\(2 \( k\_B\) 
                  T/m\)\)\ \ \ \ \ \ \ \ \ \ ⟹\ \ \ \ \(1\/2\) m\ v\&~\^2 = \(k\_B\) T\)\)
\(TextForm\`v\&_ = \(\(\@\(\(8\/π\) \(k\_B\) 
                  T/m\)\)\ \ \ \ \ \ ⟹\ \ \ \(1\/2\) 
          m\ v\&_ = \(4\/π\) \(k\_B\) T\)\)
(Subscript[v, rms]) = (Sqrt[3  (Subscript[k, B]) 
                  T/m])    ⟹   (1/2) 
          m ((Subscript[v, rms])^2) = (3/2) (Subscript[k, B]) T

are all of order (Sqrt[(Subscript[k, B]) T/m]) and the corresponding momenta are of order (Sqrt[m (Subscript[k, B]) T]).  The average kinetic energy

⟨(1/2) 
          m (v^2)⟩  =  (3/2) (Subscript[k, B]) 
        T

corresponds to (1/2) (Subscript[k, B]) T for each of the three independent translational degrees of freedom.  (Note that the average kinetic energy is obtained from (Subscript[v, rms]) and is larger that the most probably kinetic energy.)  The internal energy of the gas is then the number of molecules times the average kinetic energy per molecule, so that

U = (3/2) N (Subscript[k, B]) 
          T   ⟹   (Subscript[C, V]) = (3/2) 
          N (Subscript[k, B])

independent of species or pressure.  Obviously the molar gas constant is given by R = (Subscript[N, A]) (Subscript[k, B]) where Avogadro's number (Subscript[N, A]) is the number of molecules per mole and (Subscript[k, B]) is Boltzmann's constant.

Using (Subscript[k, B]) T≈(1/40) eV at room temperature, we estimate that the average kinetic energy for an ideal gas near 300 K is about 0.037 eV independent of species.  For (Subscript[N, 2]), with a molecular weight m (c^2) ∼  28 ×(10^3) MeV, the rms velocity is about (Subscript[v, rms]) ∼ 2×(10^(-6)) c ∼ 
        600  m/s.  It is no coincidence that this speed is about twice the velocity of sound in air, since molecular speed sets the scale of velocity for mechanical disturbances.

Entropy of a classical ideal gas

Neglecting interactions among the constituents of a dilute ideal gas, the energy of any state separates into N independent kinetic contributions of the form

\(TextForm\`E = \(∑\+\(i = 1\)\%N ε\_i\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ε\_i = \(p\& ⇀ \)\_i\^2\/\(2  m\)\)\)

where N is the number of particles.  We also neglect possible internal excitation energies within the constituents.  Hence, the partition function reduces to Z = ((Subscript[Z, 1])^N) where the single-particle partition function

\(TextForm\`Z\_1 = \(V \((\ ∫\_\(-∞\)\%∞\(dp\/\(2  π\ ℏ\)\) Exp[\(-\(\(β\ p\^2\)\/\(2  m\)\)\)]\ )\)\^3\  = \ \(V \((\(m\ \(k\_B\) T\)\/\(2  π\ ℏ\^2\))\)\^\(3/2\)\  = \ V\ λ\_B\^\(-3\)\)\)\)

is obtained by summing over cells of volume (((2  π ℏ))^3) in classical phase space.  Because the three cartesian momenta, {(Subscript[p, x]), (Subscript[p, y]), (Subscript[p, z])} provide three independent contributions of the same form, (Subscript[Z, 1]) also factors such that (Subscript[Z, 1]) = (Subscript[Z, 1  x]) (Subscript[Z, 1  y]) 
            (Subscript[Z, 1  z]) = ((((Subscript[Z, 1  x])))^3).  It is useful to define the Boltzmann wavelength

\(TextForm\`λ\_B = \(h\/p\_B\ \ \ \ \ \ \ \ \ \ \ p\_B = \((2  π\ m\ \(k\_B\) T)\)\^\(\(1/2\)\(\ \)\)\)\)

as the de Broglie wavelength for a particle that carries a typical thermal momentum (Boltzmann momentum) (Subscript[p, B]), such that

\(TextForm\`λ\_B = \(\((\(2  π\ ℏ\^2\)\/\(m\ \(k\_B\) T\))\)\^\(1/2\) = 
        h\/\((2  π\ m\ \(k\_B\) T)\)\^\(\(1/2\)\(\ \)\)\)\)

It is also useful to define a corresponding de Broglie or thermal density as (Subscript[n, B]) = ((Subscript[λ, B])^(-3)).  When the particle density becomes comparable to the de Broglie density, the wave packets of neighboring particles overlap significantly, on average, and quantum effects become important.  Thus, it is useful to define a quantum concentration

(Subscript[n, Q]) = (N/V) ((Subscript[λ, B])^3) = 
        (n/(Subscript[n, B]))

as a guide to the relative importance of quantum effects for specified temperature and density.  Clearly, for equal temperature and particle density, quantum effects are more important for lighter particles because \(TraditionalForm\`λ\_B ∝ 
        m\^\(\(\(-1\)/2\)\(\ \)\)⟹\ \ n\_Q ∝ m\^\(\(-3\)/2\)\).

We can now evaluate the Helmholtz free energy as

F = -N (Subscript[k, B]) 
        T Log[V ((Subscript[λ, B])^(-3))]

The mechanical equation of state is determined by evaluating the pressure, such that

\(TextForm\`p = \(\(-\((∂F\/∂V)\)\_T\ ⟹\ \ p\)\ V = N\ \(k\_B\) T\)\)

as expected.  Similarly, the internal energy and heat capacity

\(TextForm\`U = \(\(-\((\(∂ln\ Z\)\/∂β)\)\_V\) = \(\(-N\)\ \((\(∂ln\ Z\_1\)\/∂β)\)\_V = \(3\/2\) 
            N\ \(k\_B\) T\)\)\)
(Subscript[C, V]) = (Subscript[((∂(U/∂)T)), V]) = (3/2) 
          N (Subscript[k, B])

are also in agreement with results familiar from classical thermodynamics.  (Note that here N is the number of particles rather than the number of moles, so that the molar gas constant is simply R = (Subscript[N, A]) (Subscript[k, B]) where (Subscript[N, A]) is Avogadro's number.)

The entropy is obtained by differentiating the free energy with respect to temperature, whereby

\(TextForm\`S = \(\(-\((∂F\/∂T)\)\_V\) = \ 
        N\ \(k\_B\) \((Log[V\ λ\_B\^3]\  + \ 
              3\/2)\)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \((incorrect)\)\)\)

Although this theory has predicted both the mechanical equation of state and the heat capacity correctly, the free energy and entropy suffer from the serious flaw that neither is extensive.  Suppose that the volume is divided into two equal halves by an imaginary wall.  Each half contains half the particles and contributes entropy

V -> (V/2),  
    N -> (N/2)  ⟹  S -> 
        (S/2) - (1/2) N (Subscript[k, B]) ln 2

Therefore, this calculation suggests that the entropy of the gas is reduced by the amount N (Subscript[k, B]) ln 2 upon introduction of an imaginary wall.  This absurd result is known as the Gibbs paradox.

Examination of our expressions for entropy and free energy reveals that the Gibbs paradox could be avoided if the volume were to be replaced by V/N under the logarithm.  A similar result can be obtained by subtracting (Subscript[k, B]) Log[N!] = (Subscript[k, B])(N Log[N] - N), whereby

S -> 
        S - (Subscript[k, B]) Log[N!]  ⟹  S = 
      N (Subscript[k, B]) (Log[(V/(N ((Subscript[λ, B])^3)))] + 
            (5/2))

is known as the Sackur-Tetrode formula after the people who first used Planck's constant to discretize the phase space.  This revised entropy is now extensive in the sense that S scales with N and V according to

\(TextForm\`V -> α\ V, \ 
    N -> \(α\ N\ \ \ ⟹\ \ \ S -> α\ S\)\)

The physical origin of the Gibbs paradox concerns the indistinguishability of identical particles.  Suppose that a microstate is described by the set of occupation numbers ξ = {(Subscript[n, i])} where i labels a cell in the phase space for a single particle and (Subscript[n, i]) is the number of particles whose momentum and position are found within that cell.  The total number of permutations of N particles among the states belonging to the configuration {(Subscript[n, i])} suggests the multiplicity function

(Subscript[g, ξ]) = ((N!)/((∏_i) (Subscript[n, i])!))

where the numerator is the total number of permutations of the N particles and the denominator represents the indistinguishable permutations among the particles within each cell of phase space.  If we assume that it is possible, at least in principle, to distinguish among these various states, then the configuration ξ should be assigned multiplicity (Subscript[g, ξ]).  On the other hand, if we assume that it is impossible, even in principle, to distinguish between identical particles, the configuration ξ should be assigned multiplicity 1.

The Gibbs prescription consists of reducing the number of distinct states by the overall factor N!.  However, the actual factor (Subscript[g, ξ]) depends upon the occupation numbers.  Evidently, the Gibbs prescription is applicable when the density is small and the temperature high enough for the average occupation number \(TraditionalForm\`⟨n\_i⟩ ≪ 1\) to be small, such that

\(TextForm\`n\_i ≪ 
      1\ \ ⟹\ \ \(\(N!\)\/\(∏\+i\( n\_i!\)\)\) ≈ \(N!\)\)

Thus, the Gibbs prescription for a classical partition function for N identical noninteracting particles reads

(Subscript[n, Q]) ≪ 1  ⟹   (Subscript[Z, N]) = 
      (((Subscript[Z, 1])^N)/(N!))

With this prescription we find

S = N (Subscript[k, B]) (Log[(V/(N ((Subscript[λ, B])^3)))] + 
              (5/2)) = 
        N (Subscript[k, B]) ((5/2) - ln (Subscript[n, Q]))
F = -N (Subscript[k, B]) 
          T (Log[(V/(N ((Subscript[λ, B])^3)))] + 1) = -N (Subscript[k, B]) 
          T (1 - ln (Subscript[n, Q]))

provided that (Subscript[n, Q]) ≪ 1.  Thus, the Gibbs prescription is valid when the quantum concentration is small and fails when (Subscript[n, Q]) approaches unity.  When (Subscript[n, Q]) ∼ 1, we must employ a correct quantum mechanical treatment for the wave function of N identical particles with due regard to the proper particle-exchange symmetry of that wave function.  Finally, we note that the chemical potential

\(TextForm\`μ\  = \ \(\((∂F\/∂N)\)\_\(T, V\)\  = \ \(\(-k\_B\) T\ Log[V\/\(N\ λ\_B\^3\)]\  = \ \(k\_B\) 
            T\ ln\ n\_Q\)\)\)

is large and negative for a classical ideal gas with small quantum concentration.  Recall that fugacity z is defined by μ = (Subscript[k, B]) T Log[z].  Thus, the fugacity for a classical ideal gas

z  =  Exp[(μ/((Subscript[k, B]) T))]  =  
        (Subscript[n, Q])

reduces to the quantum concentration and is small and positive at high temperatures where the classical approximation applies.

More generally, using the Gibbs prescription for the partition function for N identical indistinguishable particles, the free energy and chemical potential take the forms

\(TextForm\`Z\_N = \(\(Z\_1\^N\/\(N!\)\)\ \ \ \ ⟹\ \ \ \ \ F\  = \ \(-N\)\ \(k\_B\) 
          T\ \((Log[Z\_1\/N]\  + \ 1)\)\)\ , \ \ \ \ μ\  = \ \(-k\_B\) 
        T\ Log[Z\_1\/N]\)

such that

F  =  -N (Subscript[k, B]) 
        T (1  -  (μ/((Subscript[k, B]) T)))

If we assume that the translational degrees of freedom can be factored out, such that (Subscript[Z, 1]) = V ((Subscript[λ, B])^(-3)) ζ[T] where ζ[T] represents the partition function for internal degrees of freedom, then

\(TextForm\`Z\_1\  = \ \(V\ \(λ\_B\^\(-3\)\) ζ[
              T]\ \ \ ⟹\ \ μ\  = \ \(\(-k\_B\) \(T\)\(\ \)\(Log[\(\(V\)\(\ \)\(ζ[T]\)\(\ \)\)\/\(N\ λ\_B\^3\)]\)\(\ \)\)\)\)

Thus, the fugacity takes the form

\(TextForm\`z\  = \ \(N\ λ\_B\^3\)\/\(\(V\)\(\ \)\(ζ[T]\)\(\ \)\)\)

For an ideal gas one assumes that the density is small compared with ζ[T]/((Subscript[λ, B])^3) such that the chemical potential is large and negative and the fugacity is small.  If the density is large, the fugacity appears to be large and the chemical potential to be positive, but caution must be exercised with respect to both the classical approximation of nonoverlapping wave packets and the assumption of negligible interactions.  When we treat translational degrees of freedom classically and internal degrees of freedom (ζ[T]) quantum mechanically, the model can be described as semiclassical.  For example, for a gas of elementary particles with spin s, the internal partition function reduces to ζ -> g = 2  s + 1, where g is the degeneracy of a single-particle momentum state, and is independent of temperature.  The quantum concentration is then generalized to read

(Subscript[n, Q]) =  ((N ((Subscript[λ, B])^3))/(g V))

However, for a gas of atoms or molecules with more complicated internal structure, the internal partition function depends upon temperature.  Thus, ζ[T] is a measure of the number of active internal degrees of freedom.

Ideal gas of diatomic molecules

Consider a gas of noninteracting diatomic molecules.  These molecules consist of two massive ions surrounded by a cloud of much lighter electrons.  Due to the difference in mass between the ions and the electrons, the motion of the electrons is much faster than that of the ions.  Hence, the electron cloud can adjust rapidly to any ion motion.  Therefore, we can approximate interactions with the electronic cloud by an effective potential that depends upon the separation between the ions.  To a first approximation, this potential is harmonic for small-amplitude vibrations about the equilibrium separation between the ions.  Alternatively, the system can rotate as a rigid object with moment of inertia I ≈ m (R^2) where m is the ion mass and R their separation.

The rotational energy (Subscript[ε, ℓ]) can be estimated by assuming that the rotational inertia is approximately

\(TextForm\`I ≈ 
      m\ R\^2\ \ ⟹\ \ \ \ ε\_ℓ ≈ \(ℓ \((ℓ + 1)\) ℏ\^2\)\/\(2\ m\ R\^2\)\)

where m is the atomic mass, R is the equilibrium separation between ions, and ℓ is the rotational angular momentum.  Thus, for (Subscript[N, 2]) we obtain

\(TextForm\`ε\_1 ≈ \(2 \((1973\ eV\ Å)\)\^2\)\/\(2 \((28×\(10\^9\) eV)\) \((1\ Å)\)\^2\) ≈ \ 
      0.7×\(10\^\(-4\)\) eV\)

This energy is quite small, so we might expect rotational degrees of freedom to reach the equipartition limit even for temperatures as low as a few tens of kelvins.

The characteristic energy of molecular vibrations is much larger, typically in the neighborhood of 0.5 eV.  Electronic excitations are generally characterized by energies of several eV.  Thus, the characteristic temperature for excitation of the electron cloud is much larger than the energy of ionic vibrations, which in turn is very much larger than the energy of rotations.  Therefore, we may assume that, to a good approximation, these modes are decoupled from one another, such that

\(TextForm\`H = \(H\_p + H\_rot + H\_vib + 
          H\_e\ \ ⟹\ \ Z\_1 = \(Z\_p\) \(Z\_rot\) \(Z\_vib\) Z\_e\)\)

where (Subscript[H, p]), (Subscript[H, rot]), (Subscript[H, vib]), and (Subscript[H, e]) represent independent translational, rotational, vibrational, and electronic degrees of freedom.  The partition function, Z = ((Subscript[Z, 1])^N)/N! can then be factored.  The partition function for translational motion has already been developed for the ideal gas.  In the remainder of this section we present simple approximations for the rotational and vibrational factors, (Subscript[Z, rot]) and (Subscript[Z, vib]).

Rotations

We assume that rotations of a diatomic molecule can be adequately described by the rigid rotor model with constant rotational inertia and that electronic motions are sufficiently fast that azimuthal symmetry is maintained.  The energy levels of a rigid rotor are then

\(TextForm\`ε\_ℓ ≈ \(ℓ \((ℓ + 1)\) ℏ\^2\)\/\(2  I\)\)

where I is the rotational inertia and ℓ is a nonnegative integer describing the orbital angular momentum.  The projection of angular momentum upon any axis is restricted to integer values between -ℓ and +ℓ.  Hence, the degeneracy of energy level (Subscript[ε, ℓ]) is (Subscript[g, ℓ]) = 2  ℓ + 1.  If the two ions are different (heteronuclear molecule), then ℓ can assume any nonnegative integral value, but if the two ions are identical the values of ℓ are restricted to either even or odd integers by the requirements of exchange symmetry.  For simplicity we consider here the heteronuclear case and relegate the homonuclear cases to the exercises.  The partition function for rotations of a heteronuclear molecule can now be written in the form

\(TextForm\`Z\_rot = ∑\+\(ℓ = 0\)\%∞\((2  ℓ + 1)\) 
          Exp[\(-ℓ\) \((ℓ + 1)\) 
              T\_rot\/T]\)

where (Subscript[k, B]) (Subscript[T, rot]) = (ℏ^2)/2  I determines the temperature scale relevant to rotational degrees of freedom.

In the low temperature limit the molecules are found near the ground state with overwhelming probability because the Boltzmann factor is a rapidly decreasing function of ℓ.  Thus, only a few contributions to the partition function are relevant and we may approximate the rotational partition function by

T ≪ 
      (Subscript[T, rot]) ⟹  (Subscript[Z, rot]) ≈ 
      1 + 3 Exp[-2 (Subscript[T, rot])/T]

The rotational contributions to the internal energy and heat capacity are then approximately

\(TextForm\`T ≪ 
        T\_rot\ ⟹\ \ \ U\_rot = \(-N\)\ \(∂ln\ Z\_rot\)\/∂β ≈ 
        3  N\ \(k\_B\) 
          T\ \(\(2 
                 T\_rot\)\/T\) e\^\(\(-2\) T\_rot/T\)\/\(1 + 3  e\^\(\(-2\) T\_rot/T\)\)\)

\(TextForm\`T ≪ T\_r\ ⟹\ \ \ C\_rot = 
      3  N\ \(k\_B\) \(\((\(2  T\_rot\)\/T)\)\^2\) e\^\(\(-2\) T\_rot/T\)\/\((1 + 3  e\^\(\(-2\) T\_rot/T\))\)\^2\)

This system shares the low-temperature (y^2) (e^(-y)) behavior characteristic of any two-state system because at low temperature the spacing between quantum levels reduces the system to binary form, where here y = 2  (Subscript[T, rot])/T.

In the high temperature limit

\(TextForm\`T ≫ 
        T\_rot\ \ ⟹\ \ Z\_rot ≈ ∫\_0\%∞dℓ\ ∂ε\_ℓ\/∂ℓ\ Exp[\(-β\)\ ε\_ℓ]\ \  = T\/T\_rot\)

the spacing between levels is much smaller than the energy of thermal fluctuations such that the spectrum is effectively continuous and the sum may be replaced by an integral.   Thus, we find the essentially classical result

T ≫ 
        (Subscript[T, rot])  ⟹  (Subscript[U, rot]) = N (Subscript[k, B]) 
          T  ⟹  (Subscript[C, rot]) = 
        N (Subscript[k, B])

This result could have been obtained from the equipartition theorem provided that quantum symmetry principles are respected in counting the degrees of freedom.  Each rotational degree of freedom make a quadratic contribution to the energy and hence yields a contribution of (Subscript[k, B])/2 to the heat capacity.  Classically, we might have expected there to be three rotational degrees of freedom per molecule.  However, the preceding result suggests that only two degrees of freedom are active even in the high temperature limit.  The difference is due to the fact that rotations about a symmetry axis do not produce observable changes of the quantum state and hence do not correspond to true dynamical degrees of freedom.  Therefore, an axially symmetric rotor possesses only two rotational degrees of freedom.

The analysis of the intermediate temperature range, T~(Subscript[T, rot]), is more complicated because the summation cannot be performed in closed form.  The figure below is taken from rotvib.nb where numerical summation of the rotational partition function is performed for a heteronuclear diatomic molecule.  Interestingly, we find that the heat capacity overshoots the equipartition value and approaches the limit from above.

Vibrations

We have already analyzed the vibrational partition function several times.  Expressing the vibrational energy as ℏ ω = (Subscript[k, B]) (Subscript[T, vib]), we find

\(TextForm\`Z\_vib = \(∑\+\(n = 0\)\%∞ e\^\(\(-n\)\ T\_vib/T\)\  = \ 
        1\/\(1 - e\^\(\(-T\_vib\)/T\)\)\)\)
\(TextForm\`U\_vib = \ \(N\ \(k\_B\) T\_vib\)\/\(e\^\(T\_vib/T\) - 1\)\)
\(TextForm\`C\_vib = \ 
      N\ \(k\_B\) \(\((T\_vib\/T)\)\^2\) e\^\(\(-T\_vib\)/T\)\/\((1 - e\^\(\(-T\_vib\)/T\))\)\^2\)

with limiting behaviors

T ≫ 
      (Subscript[T, vib])  ⟹  (Subscript[C, vib]) ≈ 
      N (Subscript[k, B])
\(TextForm\`T ≪ 
      T\_vib\ \ ⟹\ \ C\_vib ≈ \ 
      N\ \(k\_B\) \(\((T\_vib\/T)\)\^2\) e\^\(\(-T\_vib\)/T\)\)

Heat capacity

The figure below, taken from rotvib.nb, shows the combined translational, rotational, and vibrational heat capacities, (Subscript[C, V]) = (3/2) N (Subscript[k, B]) + (Subscript[C, rot]) + (Subscript[C, vib]), using (Subscript[T, rot]) = 15 and (Subscript[T, vib]) = 4130 kelvin for HCl.  Note that a logarithmic temperature scale is need because the rotational and vibrational temperatures differ by more than two orders of magnitude.  Thus, for room temperature we expect the molar heat capacity to be about (5/2) R, representing equipartition among translational and rotational modes, but vibrational excitations are frozen out.  Full participation of vibrational modes requires temperatures above about (10^4) kelvin.

Problems

\(TextForm\`F\_g = \(\(N\_g\) \(k\_B\) 
          T \((Log[\(\(N\_g\) λ\^3\)\/V] - 
              1)\)\ \ \ \ with\ \ \ \ λ = \((h\^2\/\(2  π m \(k\_B\) T\))\)\^\(1/2\)\)\)

((Subscript[N, b])/(Subscript[N, s])) = (p/(p + (Subscript[p, 0])[T]))

H = (∑_(i = 1)^N) 
          m (c^2) ((Sqrt[1 + (((((Subscript[p, i])/(m c))))^2)]) -  
              1)

(Subscript[Z, 1]) ∝  Exp[x] f[x]

f[
        x] = (∫_0^∞)dp (p^2) 
          Exp[-x (Sqrt[1 + (p^2)])]

V (r) = (Subscript[V, 0]) ( 
          Exp[-2 (r - (Subscript[r, 0]))/(Subscript[a, 0])]  -  
            2 Exp[-(r - (Subscript[r, 0]))/(Subscript[a, 0])] )

(Subscript[H, i]) = 
      (((Subscript[(Overscript[P, ⇀]), i])^2)/(2  M))  +  
        (((Subscript[p, i])^2)/(2  μ))  +  γ ((Subscript[x, i])^4)

\(TextForm\`Γ[
        z]\  = \ ∫\_0\%∞\(\(dt\)\(\ \)\(e\^\(-t\)\) \(t\^\(z - 1\)\)\(\ \)\)\)

H  =  
      ((p^2)/(2  m)) + (1/2) k (x^2)  +  a (x^3) + 
        b (x^4)

C  =  
      (Subscript[k, B])  +  A T  +  𝒪[(T^2)]

(Subscript[H, rot]) = (∑_(i = 1)^3) (((Subscript[L, i])^2)/(2  (Subscript[I, i])))

\(TextForm\`	ω\_1 = θ\& . \ Sin[ψ] - \(\(ϕ\& . \)\(\ \)\(Sin[θ]\) \(Cos[ψ]\)\(\ \)\)\)
\(TextForm\`	ω\_2 = θ\& . \ Cos[ψ] + ϕ\& . \ Sin[θ]\ Sin[ψ]\)
\(TextForm\`	ω\_3 = ψ\& .  + ϕ\& . \ Cos[θ]\)

(Subscript[Z, r]^FD)  =  (Subscript[s, A]) (2  (Subscript[s, A]) + 1) 
          (Subscript[Z, even])  +  ((Subscript[s, A]) + 1) (2  (Subscript[s, A]) + 1) 
          (Subscript[Z, odd])

(Subscript[Z, even]) = (∑_(ℓ even))(2  ℓ + 1) 
          exp[-ℓ (ℓ + 1) 
              ((Subscript[T, rot])/T)]

(Subscript[Z, odd])  =  (∑_(ℓ odd)) (2  ℓ + 1) 
          exp[-ℓ (ℓ + 1) 
              ((Subscript[T, rot])/T)]

(Subscript[C, r]^FD)  =  ((Subscript[s, A])/(2  (Subscript[s, A]) + 1)) 
          (Subscript[C, even])  +    (((Subscript[s, A]) + 1)/(2  (Subscript[s, A]) + 1)) 
          (Subscript[C, odd])

\(TextForm\`m\ dv\&⇀\/dt\  == \ \(-α\)\ v\&⇀\  + \ 
        F\&⇀\_ext\  + \ ℱ\&⇀\)

\(TextForm\`	⟨\ ℱ\&⇀[
          t]\ ⟩\  = \ 0\)
\(TextForm\`	⟨\ ℱ\_i[
            t] ℱ\_j[
            t\^′]\ ⟩\  ≈ \ 
      A\ \(δ\_\(i, j\)\) δ[
          t - t\^′]\)

(Overscript[v, ⇀])[t]  =  
      Exp[-t/τ] (  (Subscript[(Overscript[v, ⇀]), 0])  +  (∫_0^t) 
                  Exp[(t^′)/τ] 
                (Overscript[a, ⇀])[
                  (t^′)] d(t^′)  )

(i)  (lim_(t -> ∞))⟨ 
                (Overscript[v, ⇀])[t] ⟩              and               (ii)  (lim_(t -> ∞))⟨ 
                  (Overscript[v, ⇀])[t]·
                    (Overscript[v, ⇀])[t] ⟩

(i)  ⟨ 
            (Overscript[v, ⇀]) ⟩              and               (ii)  \(⟨\ \((\(\(\ \)\(v\)\)\&⇀\  - ⟨v\&⇀⟩\ )\)\^2⟩\)

(Overscript[F, ⇀])  =  -α (Overscript[v, ⇀])

d(u/d)ω  ≈  
        u[(Subscript[ω, 0])]/γ  =  -((Subscript[u, 0])/γ)

\(TextForm\`B\  = \ \(\(\(\ \)\(c\^3\)\)\/\(4  ℏ\ ω\_0\^3\)\) A\)