Chapter 9 Canonical ensemble 9.1 System in contact with a heat reservoir We consider a small system A1 characterized by E1 , V1 and N1 in thermal interaction with a heat reservoir A2 characterized by E2 , V2 and N1 in thermal interaction such that A1 � A2 , A1 has hence fewer degrees of freedom than A2 . E2 � E 1 N2 � N 1 N1 = const. N2 = const. with E1 + E2 = E = const. Both systems are in thermal equilibrium at temperature T . The wall between them allows interchange of heat but not of particles. The system A1 may be any relatively small macroscopic system such as, for instance, a bottle of water in a lake, while the lake acts as the heat reservoir A2 . Distribution of energy states The question we want to answer is the following: “Under equilibrium conditions, what is the probability of finding the small system A1 in any particular microstate α of energy Eα ? In other words, what is the distribution function ρ = ρ(Eα ) of the system A1 ?” We note that the energy E1 is not fixed, only the total energy E = E1 +E2 of the combined system. Hamilton function. The Hamilton function of the combined system A is H(q, p) = H1 (q(1), p(1)) + H2 (q(2), p(2)) , 103 104 CHAPTER 9. CANONICAL ENSEMBLE were we have used the notation q = (q(1), q(2)), p = (p(1), p(2)) . Microcanonical ensemble of the combined system. Since the combined system A is isolated, the distribution function in the combined phase space is given by the microcanonical distribution function ρ(q, p), � δ (E − H(q, p))) ρ(q, p) = � , dq dp δ(E − H) = Ω(E) , (9.1) dq dp δ (E − H(q, p)) where Ω(E) is the density of phase space (8.4). Tracing out A2. It is not the distribution function ρ(q, p) = ρ(q(1), p(1), q(2), p(2)) of the total system A that we are interested in, but in the distribution function ρ1 (q(1), p(1)) of the small system A1 . One hence needs to trace out A2 :∗ � ρ1 (q(1), p(1)) ≡ dq(2) dp(2) ρ(q(1), p(1), q(2), p(2)) � dq(2) dp(2) δ(E − H1 − H2 ) = Ω(E) Ω2 (E − H1 ) . (9.2) ≡ Ω(E) where Ω2 (E2 ) = Ω(E − H1 ) is the phase space density of A2 . Small E1 expansion. Now, we make use of the fact that A1 is a much smaller system than A2 and therefore the energy E1 given by H1 is much smaller than the energy of the combined system: E1 � E . In this case, we can approximate (9.2) by expanding the slowly varying logarithm of Ω2 (E2 ) = Ω2 (E − H1 ) around the E2 = E as � � ∂ ln Ω2 ln Ω2 (E2 ) = ln Ω2 (E − H1 ) � ln Ω2 (E) − H1 + . . . (9.3) ∂E2 E2 =E and neglect the higher-order terms since H1 = E1 � E. Derivatives of the entropy. Using (8.14), namely that � � � � Γ(E, V, N ) Ω(E)Δ = kB ln , S = kB ln Γ0 Γ0 (9.4) where Δ is the width of the energy shell, we find that derivatives of the entropy like ∂S ∂ ln Ω(E) 1 = = kB T ∂E ∂E (9.5) � A marginal distribution function p(x) = p(x, y)dy in generically obtained by tracing out other variables from a joint distribution function p(x, y). ∗ 9.1. SYSTEM IN CONTACT WITH A HEAT RESERVOIR 105 can be taken with respect to the logarithm of the phase space density Ω(E). Boltzmann factor. Using (9.5) for the larger system A2 we may rewrite (9.3) as � � � ∂ ln Ω2 (E2 ) �� H1 + . . . Ω2 (E − H1 ) = exp ln Ω2 (E) − � ∂E2 E2 =E � � H1 = Ω2 (E) exp − . kB T 2 The temperature T2 of the heat reservoir A2 by whatever small amount of energy the large system A2 gives to the small system A1 . Both systems are thermally coupled, such that T1 = T2 = T . We hence find with (9.2) ρ1 (q(1), p(1)) = H Ω2 (E) − kH1T − 1 e B ∝ e kB T Ω(E) . (9.6) The factor exp[−H1 /(kB T )] is called the Boltzmann factor. Distribution function of the canonical ensemble. The prefactor Ω2 (E)/Ω(E) in (9.6) is independent of H1 . We may hence obtain the the normalization of ρ1 alternatively by integrating over the phase space of A1 : ρ1 (q(1), p(1)) = � 9.1.1 e−βH1 (q(1),p(1)) dq(1) dp(1) e−βH1 (q(1),p(1)) , β = 1 . kB T (9.7) Boltzmann factor The probability Pα of finding the system A1 (which is in thermal equilibrium with the heat reservoir A2 ) in a microstate α with energy Eα is given by e−βEα Pα = � −βEα αe (9.8) Boltzmann distribution when rewriting (9.7) in terms of Pα . – The number of states Ω2 (E2 ) = Ω2 (E − H1 ) accessible to the reservoir is a rapidly increasing function of its energy. – The number of states Ω2 (E2 ) = Ω2 (E − H1 ) accessible to the reservoir decreases therefore rapidly with increasing E1 = E − E2 . The probability of finding states with large E1 is accordingly also rapidly decreasing. The exponential dependence of Pα on Eα in equation (9.8) expresses this fact in mathematical terms. 106 CHAPTER 9. CANONICAL ENSEMBLE Example. Suppose a certain number of states accessible to A1 and A2 for various values of their respective energies, as given in the figure, and that the total energy of the combined system is 1007. – Let A1 be in a state α with energy 6. E2 is then in one of the 3 · 105 states with energy 1001. – If A1 is in a state γ with energy 7, the reservoir must be in one of the 1 · 105 states with energy 1000. The number of realizations of states with E1 = 6 the ensemble contains is hence much higher than the number of realization of state with E1 = 7. Canonical ensemble. An ensemble in contact with a heat reservoir at temperature T is called a canonical ensemble, with the Boltzmann factor exp(−βEα ) describing the canonical distribution (9.8). Energy distribution function. The Boltzmann distribution (9.8) provides the probability Pα to find an individual microstates α. There are in general many microstates in a given energy, for which P (E) = � E<Eα <E+Δ Pα ∝ Ω(E) e−βE , (9.9) is the corresponding energy distribution function. Ω(E) = Ω1 (E) is, as usual, the density of phase space. – P (E) is rapidly decreasing for increasing energies due to the Boltzmann factor exp(−βEα ). – P (E) is rapidly decreasing for decreasing energies due to the decreasing phase space density Ω(E). The energy density is therefore sharply peaked. We will discuss the the width of the peak, viz the energy fluctuations, more in detail in Sect. 9.6. 9.2. CANONICAL PARTITION FUNCTION 9.2 107 Canonical partition function We rewrite the distribution function (9.7) of the canonical ensemble as ρ(q, p) = � e−βH(q,p) , d3N q d3N p e−βH(q,p) where we dropped all the indices ”1” for simplicity, though in fact we are still describing the properties of a “small” system (which is nevertheless macroscopically big) in thermal equilibrium with a heat reservoir. Partition function. The canonical partition function (“kanonische Zustandssumme”) ZN is defined as � 3N 3N d q d p −βH(q,p) ZN = . (9.10) e h3N N ! It is proportional to the canonical distribution function ρ(q, p), but with a different normalization, and analogous to the microcanonical space volume Γ(E) in units of Γ0 : � 1 Γ(E) = 3N d3N q d3N p Γ0 h N ! E<H(q,p)<E+Δ � 3N 3N � d q d p� Θ(E + Δ − H) − Θ(E − H) , = 3N h N! where Θ is the step function. Free energy. We will show that it is possible to obtain all thermodynamic observables by differentiating the partition function ZN . We will prove in particular that F (T, V, N ) = −kB T ln ZN (T ) , ZN = e−βF (T,V,N ) , (9.11) where F (T, V, N ) is the Helmholtz free energy. Proof. In order to proof (9.11) we perform the differentiation 1 ∂ZN ∂ ln ZN = ∂β ZN ∂β � � �� � � ∂ dqdp −βH dqdp −βH � = e e ∂β h3N N ! h3N N ! � dqdp (−H) e−βH � = dqdp e−βH = −�H� = −U . where we have used the shortcut dqdp = d3N qd3N p and that �H� = E = U is the internal energy. 108 CHAPTER 9. CANONICAL ENSEMBLE With (5.13), namely that U = ∂(βF )/∂β, we find that − ∂ ∂ ln ZN = U = (βF ), ∂β ∂β ln ZN = −βF, ZN = e−βF , which is what we wanted to prove. Integration constant. Above derivation allows to identify ln ZN = −βF only up to an integration constant (or, equivalently, ZN only up to a multiplicative factor). Setting this constant to zero results in the correct result for the ideal gas, as we will show lateron in Sect. 9.5. Thermodynamic properties. Once the partition function ZN and the free energy F (T, V, N ) = −kB T ln ZN (T, V, N ) are calculated, one obtains the pressure P , the entropy S and the chemical potential µ as usual via � � � � � � ∂F ∂F ∂F P = − , S = − , µ = . ∂V T,N ∂T V,N ∂N T,V Specific heat. The specific heat CV is given in particular by � � � ∂ 2F ∂2 � ∂S CV = − 2 = = kB T ln ZN , T ∂T V ∂T ∂T 2 (9.12) where we have used F = −kB T ln ZN . 9.3 Canonical vs. microcanonical ensemble We have seen that the calculations in the microcanonical and canonical ensembles reduce to a phase space integration and a calculation of a thermodynamic potential: Phase space integration Thermodynamic potential Microcanonical ensemble Canonical ensemble Density of states: � ΩN (E) = d3N q d3N p δ(E − H) Partition function: � 3N 3N d q d p −βH(q,p) e ZN (T ) = h3N N ! S(E, V, N ) = kB ln � ΩN (E)Δ h3N N ! � F (T, V, N ) = −kB T ln ZN (T ) Laplace transforms. The relation between the density of states ΩN (E) and the partition function ZN (T ) can be defined as a Laplace transformation in the following way. We use the definition (9.1) of the density of states Ω(E), � dq dp δ(E − H) = Ω(E), H = H(q, p) , 9.4. ADDITIVITY OF F (T, V, N ) 109 in order to obtain � ∞ 0 dE e−βE ΩN (E) h3N N ! = = � � d 3N qd 3N p � ∞ 0 dE e−βE δ(E − H) h3N N ! d3N q d3N p −βH(q,p) e = h3N N ! ZN (T ) . (9.13) We have thus shown that ZN (T ) is the Laplace transform† of ΩN (E). Additive Hamilton functions. In both the microcanonical and in the canonical ensemble we have to perform�an integration which is usually difficult. When the Hamilton function is additive, H = i Hi , the integration in the canonical ensemble can be factorized, which is not the case for the microcanonical ensemble. Therefore, it is usually easier to calculate in the canonical ensemble than in the microcanonical ensemble. 9.4 Additivity of F (T, V, N ) An important property of the free energy is that it has to be additive. Non-interacting systems. Let us consider two systems in thermal equilibrium. Neglecting the interaction among the systems, the total Hamilton function can be written as a sum of the Hamiltonians of the individual systems, H = H 1 + H2 , N = N1 + N2 . Multiplication of partition functions. The partition function of the total system is � 1 d3N q d3N p e−β(H1 +H2 ) , ZN (T, V ) = 3N h N1 !N2 ! where have made use of the fact that there is not exchange of particles between the two systems. The factor in the denominator is therefore proportional to N1 !N2 ! and NOT to N !. It then follows that the partition function factorizes, � 1 ZN (T, V ) = d3N1 q d3N1 p e−βH1 (q1 ,p1 ) 3N 1 h N1 ! � 1 × 3N2 d3N2 q d3N2 p e−βH2 (q2 ,p2 ) h N2 ! = ZN1 (T, V1 ) ZN2 (T, V2 ) , and that the free energy F = −kB T ln ZN is additive: F (T, V, N ) = F1 (T, V1 , N1 ) + F2 (T, V2 , N2 ) . † The Laplace transform F (s) of a function f (t) is defined as F (s) = �∞ 0 f (t) exp(−st)dt. 110 CHAPTER 9. CANONICAL ENSEMBLE Convolution of densities of states. That the overall partition function factorizes follows also from the fact that the density of states Ω(E) of the combined system, � Ω(E) = d3N q d3N p δ(E − H1 − H2 ) � � 3N1 3N1 3N2 3N2 = d qd pd qd p dE2 δ(E − H1 − E2 ) δ(E2 − H2 ) � = dE2 Ω1 (E − E2 ) Ω2 (E2 ) , is given by the ( convolution) of the density of states Ωi (Ei ) of the individual systems. Using the representation (9.13) for the partition function we obtain‡ � dE e−βE ZN = Ω(E) h3N N1 !N2 � � dE e−β(E1 +E2 ) dE2 Ω1 (E − E2 ) Ω2 (E2 ) . = � �� � h3N N1 !N2 ! Ω1 (E1 ) A change of the integration variable from dE to dE1 then leads again to ZN (T, V ) = ZN1 (T, V1 ) ZN2 (T, V2 ) . (9.14) Note that this relation is only valid if H = H1 + H2 and H12 = 0. 9.5 Ideal gas in the canonical ensemble We consider now the ideal gas in the canonical ensemble, for which the Hamilton function, H = N � p�i 2 i=1 2m , ZN (T, V ) = � d3N q d3N p −β �Ni=1 p�2i /(2m) e , h3N N ! (9.15) contains just the kinetic energy. Factorization. The integral leading to ZN factorizes in (9.15): �3N �� +∞ VN dp −β p2 ZN (T, V ) = e 2m N! −∞ h �� +∞ √ �3N VN 2kB T m −x2 e dx = , N! h −∞ (9.16) where we have used the variable substitution p2 x = , 2kB T m 2 � ‡ dp dx = √ , 2kB T m � +∞ 2 dx e−x = √ π. −∞ Note that a variable transfomation (E, E2 ) → (E1 , E2 ) with a Jacobian determinant, dE1 dE2 |J|, where J is the respective Jacobian. (9.17) � dE dE2 = 9.5. IDEAL GAS IN THE CANONICAL ENSEMBLE 111 Thermal wavelength. Evaluating (9.16) explicitly with the help of (9.17) we get VN ZN (T, V ) = N! �√ 2πmkB T h �3N 1 ≡ N! � V λ3T �N , (9.18) where we have defined the thermal wavelength λT as λT = √ h 2πmkB T . For air (actually nitrogen, N2 , with m = 4.65 · 10−26 kg) at T = 298 K, the thermal wavelength is 0.19 A◦ , which is actually smaller than the Bohr radius. Quantum mechanical effects start to play a role only once λT becomes larger than the typical interparticle separation. Thermal momentum. Heisenberg’s uncertainty principle Δx · Δp ∼ h allows to define a thermal momentum pT as pT = � h = 2πmkB T , λT p2T 2π = πkB T = Ekin , 2m 3 Ekin = 3 kB T , 2 where we have used (3.5) for the average energy Ekin per particle. The thermal momentum pT is hence of the same order of magnitude as the average momentum p̄ of the gas, as defined by Ekin = p̄2 /(2m), but not identical. Free energy. From (9.18) we obtain (with log N ! ≈ N log N − N ) � � �N � 1 V F (T, V, N ) = −kB T ln N ! λ3T � � �N � V 1 + ln = −kB T ln N! λ3T � � V = −kB T −N ln N + N + N ln 3 λT and hence � � � � V +1 F (T, V, N ) = −N kB T ln N λ3T for the free energy of the ideal gas. Entropy. Using −λT ∂λT = , ∂T 2T we then have S = − � ∂F ∂T � V,N ∂ ln ∂T � V N λ3T � = −3 3 ∂ ln λT = ∂T 2T � � � � � � V 3 + 1 + N kB T = N kB ln , 3 N λT 2T (9.19) 112 CHAPTER 9. CANONICAL ENSEMBLE which results in the Sackur-Tetrode equation S = N kB � V 5 ln + 3 N λT 2 � . (9.20) Comparing (9.20) with (8.25), namely with the microcanonical Sackur-Tetrode equation � � �� �3/2 � 5 4πmE V + , S = kB N ln 3h2 N N 2 one finds that they coincide when E/N = 3kB T /2. Chemical potential. The chemical potential µ is � � � � � � ∂F V V λ3T µ= = −kB T ln + 1 + N kB T · ∂N T,V N λ3T N λ3T V = −kB T ln � V N λ3T � . The previous expressions were much simpler obtained than when calculated in the microcanonical ensemble. Equivalence of ensembles. In the thermodynamic limit the average value of an observable is in general independent of the ensemble (microcanonical or canonical). N → ∞, V → ∞, N = const. V is taken. One therefore usually chooses the ensemble that is easier to work with. Fluctuations of observables. Fluctuations of observables, �A2 � − �A�2 , may however be ensemble dependent! An example for an observable for which this is the case is the energy, which is constant, by definition, in the microcanonical ensemble, but distributed according to (9.9) in the canonical ensemble. 9.6 Energy fluctuations We evaluated the representation (9.12) for the specific heat in a first step: CV T � ∂2 � T ln Z k B n ∂T 2 � � kB T ∂Zn ∂β ∂ kB ln Zn + = ∂T ZN ∂β ∂T � � ∂ 1 ∂Zn = kB ln Zn − . ∂T T ZN ∂β = ∂β −1 = ∂T kB T 2 9.6. ENERGY FLUCTUATIONS 113 Second derivatives. The remaining derivative with respect to the temperature T are −1 ∂Zn ∂ kB ln Zn = ∂T T 2 ZN ∂β � � � �2 ∂Zn 1 ∂ 2 Zn −1 1 ∂Zn 1 ∂ −1 ∂Zn − . = + ∂T T ZN ∂β T 2 ZN ∂β T ZN2 ∂β T ZN ∂β 2 kB T 2 With the first two terms canceling each other We find � �2 � � 1 ∂ 2 Zn 1 1 ∂Zn CV = − kb T 2 ZN ∂β 2 ZN ∂β (9.21) for the specific heat Cv as a functions of derivatives of the partition function ZN . Derivatives of the partition function. The definition (9.10) for the partition function corresponds to � d3N q d3N p � 3N 3N H e−βH(q,p) 1 ∂Zn d q d p −βH(q,p) h3N N ! = − � d3N q d3N p e , ZN = , ZN ∂β h3N N ! e−βH(q,p) 3N h viz to N! � � 1 ∂Zn = − E , ZN ∂β � 2� 1 ∂ 2 Zn = E . ZN ∂β 2 (9.22) Specific heat. Our results (9.21) and (9.22) lead to the fundamental relation 1 �� 2 � � � 2 � E − E kb T 2 � � �2 between the specific heat CV and the fluctuations �E 2 − E of the energy. CV = (9.23) – Both the specific heat CV ∼ N and the right-hand side of (9.23) are extensive. The later as a result of the central limit theorem discussed in Sect. 8.6, which states that the variance of independent processes are additive. – The specific heat describes the energy exchange between the system and an heat reservoir. It hence makes that sense that CV is proportional to the size of the energy fluctuations. Relative energy fluctuations. The relative energy fluctuations, �� � � � 2 E2 − E 1 � � ∼ √ E N (9.24) vanish in the thermodynamic limit N → ∞. – The scaling relation (9.24) if a direct consequence of (9.23) and of the fact that both CV and the internal energy U = �E� are extensive. – Eq. (9.24) is consistent with the demand that the canonical the microcanonical ensembles are equivalent in the thermodynamic limit N → ∞. Energy fluctuations are absent in the microcanonical ensemble. 114 9.7 CHAPTER 9. CANONICAL ENSEMBLE Paramagnetism We consider a system with N magnetic atoms per unit volume placed in an external magnetic field H. Each atom has an intrinsic magnetic moment µ = 2µ0 s with spin s = 1/2. Energy states. In a quantum-mechanical description, the magnetic moments of the atoms can point either parallel or anti-parallel to the magnetic field. state alignment moment energy probability (+) parallel to H +µ −µH P+ = c e−βε+ = c e+βµH (−) anti-parallel to H −µ +µH P− = c e−βε− = c e−βµH We assume here that the atoms interact weakly. One can therefore a single atom as a small system and the rest of the atoms as a reservoir in the terms of a canonical ensemble. Mean magnetic moment. We want to analyze the mean magnetic moment �µH � per atom as a function of the temperature T : �µH � = µ eβµH − µ e−βµH , eβµH + e−βµH �µH � = µ tanh µH kB T , where we used that tanh y = ey − e−y , ey + e−y y = βµH = µH . kB T Magnetization. We define the magnetization, i.e. the mean magnetic moment per unit volume, as �M � = N �µH � and analyze its behavior in the limit of high- and of low temperatures. High-temperature expansion. Large temperatures correspond to y � 1 and hence to ey = 1 + y + . . . , e−y = 1 − y + . . . . Then, tanh y = (1 + y + . . .) − (1 − y + . . .) ≈ y, 2 so that �µH � = µ2 H kB T . 9.7. PARAMAGNETISM 115 Curie Law. For the magnetic susceptibility χ, defined as �M � = χH, we then have χ = N µ2 kB T . At temperatures high compared to the magnetic energies, χ ∝ T −1 which is known as the Curie law. Low-temperature expansion. Low temperatures correspond to y � 1, ey � e−y , tanh y ≈ 1 , and hence �µH � = µ, �M � = N µ . The magnetization saturates at the maximal value at low temperatures independent of H. 116 CHAPTER 9. CANONICAL ENSEMBLE