Counting microstates of the p-state paramagnet

Steuard Jensen∗ Department of Physics and Engineering, Alma College, Alma, MI 48801 (Dated: June 24, 2021) One effective approach to introducing and the second law is to study models with easily countable states at fixed energy. But such systems are rare: the only familiar examples are the Einstein and the two-state paramagnet, which limits the available questions for assignment or discussion. This work considers the more general case of the p-state paramagnet and describes the modestly more complicated counting of its microstates. By computing multiplicities in advance, an instructor can draw on these systems to assign a variety of new problems or open-ended projects that students can complete with the help of a spreadsheet program or analytic calculation.

I. INTRODUCTION This paper considers an expanded class of systems, the “p-state paramagnets,” that can be analyzed using similar state counting. At the minimum value p = 2, this Entropy is perhaps the most central concept in statisti- coincides with the two-state case considered by Moore and cal mechanics, but students often struggle to understand Schroeder, and when p → ∞ it is formally equivalent to it. They know that it somehow measures the “disorder” the Einstein solid model. Between those extremes, explicit of a system, but the classical definition based on the rela- state counting is more complicated than the simple cases, tionship between entropy S and heat Q, dS = d¯Q/T , can but once the multiplicities are in hand the subsequent feel arbitrary and seems entirely unrelated to “disorder.” analysis proceeds the same way, and its results can teach On the other hand, the statistical definition of entropy as interesting things about the relationship between the two the log of the number of microstates in a given macrostate, simplest systems. S = k ln Ω (where k is Boltzmann’s constant), provides In what follows, SectionII briefly reviews the basic a concrete definition of “disorder,” but in this form it physics and the known state counting for the Einstein is harder to recognize the second law: that the entropy solid and the 2-state paramagnet. SectionIII explains of a system of interacting macroscopic objects will never state counting for the general p-state paramagnet and decrease. suggests student activities using that data in a spreadsheet This challenge was discussed by Moore and Schroeder1, program like Excel. SectionIV discusses how to evaluate who proposed an approach in which students use com- these results analytically in the large-N limit. SectionV puters to automate the state counting and subsequent summarizes the work and its limitations. And finally, analysis for simple systems at fixed energy. This can AppendixA presents derivations of the state counting be done for systems large enough to show irreversible formulas in the main text, and AppendixB reviews the behavior but still small enough for explicit calculations. more familiar analysis of these systems using the partition At the introductory level, Moore incorporated this into function. the thermal physics volume of his Six Ideas That Shaped A number of related approaches to teaching entropy Physics textbook2 with the help of a custom-built appli- through state counting have been considered in the lit- cation to automate the process. But at the intermediate erature, and some of those might connect productively to advanced undergraduate level, Schroeder’s textbook to the systems considered here. For example, Schoepf4 Thermal Physics3 asks students to perform their own presented an introduction to entropy similar to Moore analysis in a spreadsheet program like Microsoft Excel: and Schroeder’s, but with a focus on explicit tracing of such tools are readily available and often familiar, and energy transfers rather than computer tools. Salagaram this avoids the need to teach formal programming. and Chetty present a recursive algorithm for comput- One limitation of this approach for more advanced ing entropy via state counting5 that can enable analysis students is that there are only two physical systems whose of larger and more complicated systems than the basic states are easy to count explicitly: the Einstein solid and two, and one of their applications was the three-state arXiv:2108.10340v1 [physics.ed-ph] 23 Aug 2021 the two-state paramagnet. (The details of those models paramagnet. are briefly reviewed below.) This means that there are limited options for homework and exam questions: if one system is explained in detail to illustrate the method and II. REVIEW OF BASIC SYSTEMS then students are asked to apply their understanding in homework to analyze the second, there is no distinct third In the Einstein solid model, a solid is approximated system available to use for further practice or assessment. as a system of N identical, independent harmonic oscil- Also, students seeking a deeper understanding of the lators (corresponding to N/3 atoms, each oscillating in physical principles have nothing to explore: there is little three dimensions about its equilibrium position). Each available for larger projects or curiosity-driven questions oscillator’s energy states are separated by equal steps of based on these methods.  = ~ω, so the total energy above the ground state can 2 be written as U = q where the integer q ≥ 0 is the total For both the Einstein solid and the two-state param- number of “energy units” carried by the system. agnet, having an explicit formula for the multiplicity as Treating q as a label for the macrostate of the system, a function of energy allows us to find the entropy, which the corresponding number of microstates depends on the in turn allows calculations of measurable quantities like number of ways to distribute those q units of energy temperature and . Rather than working among the N oscillators, with no limit on the maximum through these details here, we will instead address them energy per oscillator. That implies that the multiplicity in the context of the general p-state paramagnet below. ΩE is given by the “multichoose” function, (A full pedagogical treatment is presented in chapters 2–3 of Schroeder’s Thermal Physics textbook.3) N N + q − 1 (N + q − 1)! Ω (N, q) = = = . E q q q!(N − 1)! (1) This expression in terms of the standard binomial coeffi- cients (“N choose q”) can be deduced from a “balls and III. STATE COUNTING AND PHYSICS FOR bars” argument from combinatorics. GENERAL PARAMAGNETS Meanwhile, a two-state paramagnet is a system of N 1 ~ identical spin- 2 dipoles in a magnetic field B = Bzˆ. Each A. Finding the multiplicity dipole’s magnetic moment has a z-component that can take values µ ≡ ±µ, with corresponding energy states z The general p-state paramagnet is very similar to the ∓µB. Echoing the notation for the Einstein solid above, two-state case reviewed above. Consider a system of N we can label the separation of the energy states by  = (p−1) 2µB. identical dipoles each of spin- 2 (or in general with The ground state of this system occurs when all N this total angular momentum quantum number) and thus dipoles are parallel to the magnetic field. If there are q p equally spaced angular momentum states. Using con- dipoles pointing the opposite direction, the total energy ventions based on those of the previous section with the of the system above its ground state is U = q. (Choosing same magnetic field, the energy states of each dipole are the zero of energy at the ground state trades away the (p − 1)µB, (p − 3)µB, . . . , −(p − 1)µB, with state separa- symmetry of the states in favor of a clearer parallel with tion  = 2µB. We will use the three-state paramagnet the Einstein solid.) Again treating q as a label for the (p = 3) as an explicit example: its energy states are 2µB, macrostate, the number of microstates is just the number 0, and −2µB. of ways to choose those q out of N dipoles, giving a As with the previous examples, the total energy of the multiplicity of “N choose q:” system above its ground state can be written U = q, where now 0 ≤ q ≤ (p − 1)N. This energy spectrum N N! Ω (N, q) = = . (2) reduces to the two-state paramagnet when p = 2, and is 2 q q!(N − q)! equivalent to the Einstein solid when p → ∞ so there is no limit to the amount of energy that can be carried by Based on its definition above, 0 ≤ q ≤ N is again an a single dipole. We once again treat q as a label for the integer. macrostate of the system, and we aim to count microstates Finally, the total (zˆ) magnetization M of the two-state in order to find an expression for the multiplicity Ωp(N, q). paramagnet is the sum of all N magnetic dipole moments. Mathematically, our goal is to find a function corre- It corresponds closely to the energy: if q dipoles are in the sponding to “N choose q” that allows limited repetition: higher energy −µ state then N − q will be +µ, leading to each dipole can carry between 0 and p − 1 units of en-  2q   2U  ergy. We might call this “N {p − 1}-choose q”, denoted M = µN 1 − = Mmax 1 − . (3) N{p−1} N Umax q (where the superscript denotes the maximum number of energy units per dipole). In this notation, the The maximum magnetization M = µN occurs when {1} max usual binomial coefficients are N = N . The math- q = 0, and it falls to zero as q → N/2. q q N ematics literature has not settled on a unique name or It will be helpful in what follows to recall that  can q N {p−1} q  be interpreted as the coefficient of x in the expansion notation for these quantities: the functions q are of the binomial (1 + x)N : it counts the number of ways variously called “extended binomial coefficients” or “poly- to choose q terms out of the N terms of the product to nomial coefficients,” and the notation here follows that contribute a power of x (corresponding to a dipole con- of Neuschel.6 For the specific p = 3 case, the quantities tributing one unit of energy). Explicitly, this relationship N{2} q are sometimes called “trinomial coefficients,” but is expressed as the binomial expansion that term is more often used for a related but different concept. N X N (1 + x)N = xq . (4) Our explicit example of the three-state paramagnet has q q=0 energy states 0, , and 2 above the ground state, which 3 suggests a parallel to the binomial expansion from Eq. (4): TABLE I. A comparison of extended binomial coefficients N{p−1} 2N {2} for several values of N and p. The p = ∞ case X N q (1 + x + x2)N = xq . (5) corresponds to the Einstein solid. At low temperatures (small q q=0 q) and a given N, all values of p give similar results. N p q =01234567 8 9 Conceptually, as before, each of the N terms on the 3 2 1 3 3 1 0 0 0 0 0 0 left corresponds to one of the N dipoles. When a given 3 3 1 3 6 7 6 3 1 0 0 0 term contributes an x to the product, that corresponds 3 4 1 3 6 10 12 12 10 6 3 1 to a dipole carrying one unit of energy, and when it 3 ∞ 1 3 6 10 15 21 28 36 45 55 contributes an x2 that corresponds to two units of energy. 6 2 1 6 15 20 15 6 1 0 0 0 The coefficient of xq is thus the total number of ways 6 3 1 6 21 50 90 126 141 126 90 50 of distributing energy to add up to U = q. This same 6 4 1 6 21 56 120 216 336 456 546 580 reasoning extends directly to the more general extended 6 ∞ 1 6 21 56 126 252 462 792 1287 2002 binomial coefficients:

N(p−1) {p−1} X N (1 + x + x2 + ··· + xp−1)N = xq . (6) q For larger values of N and p, this method can be slow: it q=0 may be more efficient to implement the formula of Eq. (9) instead. That is straightforward to do in Mathematica, Based on the reasoning above, it is clear that our desired or for example with the following Python function: multiplicity is import scipy.special as sp N{p−1} def extBinom(n,q,p,exact=True): Ω (N, q) = , (7) p q result = 0 for j in range(q//p + 1): generalizing equation (2). result += (-1)**j * sp.comb(n,j,exact) \ Unfortunately, the general formulas for these coeffi- * sp.comb(n+q-p*j-1,q-p*j,exact) cients are more complicated than those for the two simple return result cases. One formula for the trinomial coefficients was given The function scipy.special.comb() is the “combina- by Andrews as7 tions” function that computes the binomial coefficients; its parameter determines whether the answer is {2} min(q,2N−q) exact N X N2N − 2j = (−1)j . (8) returned as an exact integer or (if exact=False) as a q j q − j floating point number. The latter might be preferred once j=0 the multiplicity becomes large. A similar formula for the general extended binomial coef- For more extensive projects studying the behavior of p- ficients was given by Dani8: state paramagnets, students will benefit from developing a deeper understanding of where these multiplicities come {p−1} bq/pc from. Whether or not they seek to understand the full N X NN + q − pj − 1 = (−1)j . (9) proofs behind the formulas, it can be helpful to practice q j q − pj j=0 explicitly enumerating states for some very small values of N. It is also possible to compute the extended binomial Proofs of both of these formulas are given in AppendixA, coefficients by hand using generalizations of Pascal’s tri- but those details are probably too involved to be worth angle (the entries of each row are constructed by adding working through in detail with students in a typical sta- p entries from the previous row). A comparison of the tistical mechanics class. coefficients for several values of p for the cases of N = 3 Instead, for a standalone problem a straightforward and 6 is given in TableI. It is interesting to observe that approach is to simply provide students with a table giv- for fixed N and small enough q, all values of p reach the ing the multiplicity as a function of q (for example, as same or nearly the same multiplicity because the energy shown later in the first and second columns of TableII). is dilute enough not to overlap. Such a list can be generated directly by a computer. For example, using Mathematica a list of the p = 3 multiplicities for N = 50 is produced by the command B. Physics and sample problems CoefficientList[(1 + x + x^2)^50, x], and a func- n{p−1} 1. Individual systems tion giving the extended binomial coefficient q is extBinomial[n_, q_, p_] := With the ability to compute multiplicities for p-state Coefficient[Sum[x^a, {a, 0, p-1}]^n, x, q] . paramagnets now in hand, we can consider specific physics 4

8 TABLE II. Entropy, temperature, heat capacity, and magneti- ) max p=2 zation for a 3-state paramagnet with N = 50 dipoles, computed U 6 in Excel based on Ω3 values obtained using Mathematica. (Val- U/ p=3 � ues in parentheses are assumed rather than calculated.) As 4 p=4 with all paramagnet systems, most of the pN = 350 possible ) ( /

total 2 microstates fall in macrostates near q = qmax/2: see Fig.1. Ω / Densityof states:

q3 Ω3 S3/k kT3/ C3/Nk M/Mmax (Ω 0 0 1 0 (0) (0) 1.00 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1 50 3.91 0.28 — 0.98 U/Umax

2 1275 7.15 0.33 0.450 0.96 75 3 22050 10.00 0.37 0.526 0.94 p=2 p=3 ...... Ω ...... 50 p=4 ...... ln

22 =

48 4.66 × 10 52.20 16.9 0.002 0.04 k

/ 25 49 4.87 × 1022 52.24 33.8 0.001 0.02 S 22 50 4.94 × 10 52.26 (∞) (0) 0.00 0 51 4.87 × 1022 52.24 −33.8 0.001 −0.02 0.0 25.0 50.0 75.0 100.0 125.0 150.0 52 4.66 × 1022 52.20 −16.9 0.002 −0.04 U/� (for N = 50) ...... 99 50 3.91 −0.28 — −0.98 FIG. 1. Two possible visualizations of the distribution of 100 1 0 (0) (0) −1.00 multiplicities for various p-state paramagnets (that a student could construct in Excel, using multiplicity data computed elsewhere). Some of the options are discussed in the text: the choices leading to the first graph above focus on the sharpness problems to assign. The most straightforward standalone and comparative shapes of the peaks, while the choices leading problems are studies of the entropy, temperature, and to the second focus on the different overall state distributions heat capacity of a single p-state paramagnet that directly and the matching low-energy limit. parallel those discussed by Moore and Schroeder for the Einstein solid and two-state paramagnet. To set up the problem, the instructor can choose particular values of N = 50 three-state dipoles are shown in TableII. The N and p and provide students with a spreadsheet file patterns are qualitatively similar to those for the two-state giving the multiplicity for each allowed energy state: for paramagnet, including the negative temperature regime N = 50 and p = 3 an excerpt of such a list is shown in as the multiplicity decreases when the energy increases the first two columns of TableII. (Mathematica is able beyond the half-filled level: q > (p − 1)N/2. to directly export a list as an Excel spreadsheet file, or it Finally, just as for the two-state case, the total magne- is straightforward to produce an appropriate file with a tization M of the system is the sum of the contributions programming language like Python.) of each magnetic dipole moment and is thus again related Students can then compute the (dimensionless) entropy to the energy: S/k = ln Ω corresponding to each multiplicity, and from the entropy they can find the temperature from its fun-  2q   2U  damental definition 1 = ∂S . In dimensionless form, this M = µ(p − 1)N 1 − = Mmax 1 − . T ∂U (p − 1)N Umax leads to (13) kT ∂(U/) ∆q As before, M decreases from Mmax = µ(p − 1)N when = ≈ . (10)  ∂(S/k) ∆(S/k) q = 0 to zero as q → (p − 1)N/2. Students seeking a more open-ended project investigat- This final form is appropriate for use in the spreadsheet ing these systems could extend this procedure to explore with a “centered difference” calculation: the temperature patterns in the distribution of states, heat capacity, or for row n can be computed as other physical quantities for various values of p. The qn+1 − qn−1 instructor can again provide multiplicity data, or for a kTn/ ≈ . (11) longer project students might benefit from computing (S/k)n+1 − (S/k)n−1 those values themselves. ∂U Similarly, heat capacity is defined as C = ∂T , so the heat As a simple starting point, it can be interesting to capacity per dipole C/N can be found in dimensionless compare graphs of the multiplicity as a function of energy form as for different paramagnet systems. Figure1 shows two C 1 ∂(U/) 1 ∆q very different examples of graphs that a student might = ≈ . (12) produce in Excel. On one level, the value of these graphs Nk N ∂(kT/) N ∆(kT/) is simply to see that each paramagnet multiplicity has a Again, this last form can be directly implemented in a peak around the center of its allowed energy range. But spreadsheet like Excel. Excerpts from the results for this is also an opportunity for students to learn about the 5

1.00 challenges and choices involved in effectively visualizing p=2 N=50 related systems. p=2 N=5000 p=3 N=50 Students will quickly find that graphing raw multiplici- 0.80 ties on the same vertical scale is not useful because the p=3 N=5000 p=4 N=50 peak heights differ by many orders of magnitude: they p=4 N=5000 0.60 must either normalize them or use a log scale (effectively p=15 N=50 Nk graphing entropy S = k ln Ω). On the other hand, for / Einstein N=50 C the horizontal axis, arguments could be made either for 0.40 Einstein N=5000 showing the energy on a common scale to show the differ- ences in range and peak position, or for graphing energy 0.20 relative to the system’s maximum capacity to center all of the peaks for easier comparison. Figure1 illustrates two very different choices for vi- 0.00 -4.0 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 sualizing this same data. The first graph is optimized kT/� for comparing the sharpness and shapes of the peaks for various p, so the horizontal scale is normalized to place all the peaks on top of each other and the vertical scale FIG. 2. Heat capacities computed and graphed in Excel (the is based on normalized multiplicity. But because of the result of a student project proposed in the text) for various horizontal scaling, the higher-p graphs have denser data paramagnets and an Einstein solid. Calculations for N = 50 points: this can be visually misleading. So rather than dipoles can show high-temperature features, while low-energy calculations for N = 5000 explore the lower-temperature limit directly graphing the relative multiplicity Ω/Ω for total where these systems all converge to the same behavior. each state, this graph shows a fractional density of states, normalizing by the (relative) size of the energy steps for each system (and ensuring that the area under each curve their positive equivalents.) A corresponding project for is one). The tradeoff is that the vertical scale is now more magnetization could lead to its own graph along similar complicated to understand. lines. The choices made in constructing the second graph in Fig.1 are optimized instead for comparing the overall state distributions on a common scale. It is immediately clear how the peak positions and total multiplicities differ 2. Interacting systems for different values of p, and this visualization also draws attention to the equivalent behavior of all systems in the Another class of standalone problems are studies of in- low-energy limit. On the other hand, these choices greatly teractions between p-state paramagnets and other systems. obscure the sharpness of the multiplicity peaks and their For example, by tuning the magnetic field appropriately, differences in shape. Confronting the surprisingly large the energy state spacing  can be made to match between impact of these choices in visualizing the exact same a paramagnet and an Einstein solid. We can then consider underlying data can be an excellent learning experience. interactions between the two systems in the same ways A project with a stronger connection to measurable that Moore and Schroeder discuss them: either as a purely quantities would be to compare the heat capacities or formal exercise, or by assuming each system’s internal magnetizations of paramagnets for various values of p. interactions are much stronger than the interactions that Some care is necessary in order to cover a wide range of exchange energy between them (so that the timescale to temperatures, because a spreadsheet like Excel is only establish and measure a consistent internal temperature able to handle the size of the multiplicity numbers for q up for each system separately is substantially faster than the to a few hundred at most (less for higher p).9 Students will timescale for the two to reach mutual equilibrium). need to use smaller systems (say, N = 50–100) to compute As an example of this, TableIII presents data for a heat capacities at high temperature and then larger ones three-state paramagnet with N3 = 50 dipoles interacting (say, N = 5000 or more, but for only small values of with an Einstein solid with NE = 50 oscillators, with an energy) to compute the low-temperature behavior. overall state of total energy Utotal = 100. As before, the Figure2 shows what the result of such a project might instructor can provide the data for the first two columns look like, using systems of size N = 50 and 5000 to of the table so that students don’t need to deal with the compare the heat capacities for p = 2, 3, 4, 15 and the messy multiplicity formulas from Eqs. (8) or (9). The Einstein solid. It is interesting to see directly that the number of energy units q3 in the paramagnet serves as a heat capacities for all values of p are nearly identical label for the macrostate of the combined system. Students at low temperature, and how the curves interpolate be- are then expected to construct the rest of the table using tween the two-state paramagnet and Einstein solid at the same procedure described by Moore and Schroeder: high temperature. (Because spreadsheets can struggle finding qE for each row from the constraint that q3 +qE = with large numbers, the N = 5000 heat capacities at neg- qtotal = 100, the corresponding Einstein solid multiplicity ative temperature in the figure are simply mirrored from ΩE from Eq. (1), the total multiplicity as the product 6

TABLE III. Multiplicities, temperatures, and probabilities for a three-state paramagnet with N3 = 50 dipoles interacting with an Einstein solid with NE = 50 oscillators, sharing 100 total energy units between them. Students can identify the most likely macrostate q3 = 32 as the one with the highest total multiplicity and greatest probability, and also the one where the individual system temperatures are most nearly equal (though by all of these standards, q3 = 33 is only marginally less likely). q3 Ω3 S3/k kT3/ qE ΩE SE /k kTE / Ωtotal St/k Prob 0 1 0 0 100 6.71 × 1039 91.7 2.52 6.71 × 1039 91.7 10−14% 1 50 3.9 0.28 99 4.50 × 1039 91.3 2.50 2.25 × 1041 95.2 10−12% 2 1275 7.2 0.33 98 3.01 × 1039 90.9 2.48 3.84 × 1042 98.0 10−11% 3 22050 10.0 0.37 97 2.00 × 1039 90.5 2.46 4.43 × 1043 100.5 10−10% ...... 31 2.05 × 1020 46.8 1.68 69 4.50 × 1033 77.5 1.87 9.23 × 1053 124.3 7.68% 32 3.65 × 1020 47.4 1.79 68 2.63 × 1033 77.0 1.85 9.61 × 1053 124.3 8.00% 33 6.28 × 1020 47.9 1.90 67 1.53 × 1033 76.4 1.83 9.60 × 1053 124.3 7.99% 34 1.04 × 1021 48.4 2.03 66 8.83 × 1032 75.9 1.81 9.22 × 1053 124.3 7.68%

Ωtotal = Ω3ΩE, and the probability from the sum of 12% the total multiplicity values over all macrostates. (The 2-state/Einstein columns for entropy and temperature are optional, and 10% 3-state/Einstein can be computed as previously described for a single 4-state/Einstein paramagnet system.) 8% Einstein/Einstein Students can identify the most likely macrostate in several ways. The most likely configuration is the one with 6% the highest total multiplicity Ωtotal, and correspondingly the highest entropy and the highest probability. It is also Probability 4% the state where the temperatures of the two subsystems are most nearly equal. (The instructor could frame the 2% problem to ask students to apply a specific approach, or to ask them to comment on both.) In this particular example, 0% the calculation excerpts in TableIII make it clear that 0 20 40 60 80 100 q (paramagnet) the macrostates with q3 = 32 and 33 are the most likely, with q3 = 32 marginally favored. Some students may at first be surprised that two systems of “equal size” would FIG. 3. Interaction macrostate probabilities for three different not share the energy equally: this gives an opportunity paramagnetic systems with N = 50 dipoles with an equal- to emphasize the central importance of multiplicity and sized Einstein solid and 100 total units of energy, as well as an its dependence on energy (with the opportunity to relate interaction between two Einstein . The limiting behavior the discussion back to earlier topics and reinforce the where large enough p behaves as an Einstein solid is readily fundamental definition of temperature). observed. As before, interactions involving the p-state param- agnets also provide opportunities for more open-ended the details depend on the amount of total energy in the exploration. An interested student could use these meth- system?) Are there interesting patterns in interactions ods to consider interactions between an Einstein solid and between paramagnets of different p or N? There is a great various paramagnets with different values of p, and study deal of room for students to develop their own questions. the patterns that arise. As one example, Fig.3 shows the probability distributions for various macrostates for paramagnets with p = 2, 3, 4 and also for interaction be- tween two Einstein solids. This graph is another clear IV. ANALYTIC CALCULATIONS IN THE illustration of the way in which the Einstein solid is a LARGE-N LIMIT limiting case of the paramagnet as p → ∞. Many other avenues of exploration suggest themselves. In addition to explicit state counting using a spread- It could be interesting to use similar graphs to investigate sheet, the simple expressions for multiplicity for the Ein- these systems’ behavior for a variety of values of total stein solid and the two-state paramagnet allow students energy, including both qtotal  N and  N. Are there to use Stirling’s approximation to evaluate them analyt- recognizable trends in the equilibrium temperature as ically when N and q are large. This allows an explicit a function of q? Or, for a given Einstein solid, might calculations of quantities like entropy as a function of a larger two-state paramagnet have similar interaction energy or of energy as a function temperature. behavior as a smaller three-state paramagnet? (Would For example, for the two-state paramagnet, applying 7 the leading terms of Stirling’s approximation to the natu- entropy S = k ln Ωp: ral log of Eq. (2) gives S/k ≈ N ln N − q ln q − (N − 2     q) ln(N − q), so the temperature is given by 1/T = x 1 6 2 k Sp/k ≈ N ln p − + ln − ln(p − 1) . ∂S/∂U =  ∂(S/k)/∂q, and thus /kT ≈ ln[(N − q)/q]. 2 2 πN Solving for energy, we find U = q ≈ N/(1 + e/kT ), (17) N  or rearranging terms, U ≈ 2 1 − tanh(/2kT ) . Then from Eq. (13), the magnetization is M = µN tanh(/2kT ). From this we can then apply the definition of temperature, 1 ∂S Similar reasoning can be applied to the Einstein solid. T = ∂U , or in dimensionless form, This procedure is more difficult for the general p-state s paramagnet because of the sum in the multiplicity formula  ∂S/k ∂S/k ∂x 12 from Eq. (9): this sum is finite in principle, but in systems = = ≈ −x kT ∂q ∂x ∂q (p2 − 1)N of realistic size it could have on the order of 1023 terms. With the help of the mathematics literature we can make 12 N(p − 1)  = − q . (18) progress in particular limits, but because the proofs are (p2 − 1)N 2 quite specialized, it would be unrealistic to expect most physics students to understand the details. Instead, it is Solving for energy, we find best just to directly cite the relevant results for students to apply. U p − 1 p2 − 1   q = ≈ N − . (19) The most interesting and accessible limit to consider is  2 12 kT that of high temperature, as the paramagnet approaches (p−1)N its maximum multiplicity q → 2 . These are states (This correctly matches the high temperature limit of the in the central peak as seen in the density of states graph of earlier p = 2 result.) From the energy we can calculate Fig.1. When the system size N is large we can use results the heat capacity at high temperature, by Neuschel6 (building on the work of Eger10) to estimate the multiplicity. Neuschel gives a detailed expansion for dU p2 − 1   2 C = = Nk . (20) the extended binomial coefficients in orders of 1/N, but dT 12 kT for our purposes the leading term is sufficient:11 And finally, we can use the energy to find the magnetiza- r 2  {p−1}   (p − 1)N 1 N 1 2 1 tion using Eq. (13): = √ e−x /2 + O , 12 pN q 2π N 1/2 µ(p2 − 1)N  p + 1  (14) M = = M . (21) 6 kT max 6 kT converging uniformly with respect to all integers q, with This 1/T dependence of magnetization at high tempera- s 12  N(p − 1) tures is Curie’s Law. x = q − . (15) All of these steps that follow from Eq. (16) are a direct (p2 − 1)N 2 generalization of calculations that students may have already seen for the two-state paramagnet or the Einstein This variable x has been scaled to put the Gaussian term solid, which could make this a natural followup activity into standard normal distribution form: the prefactor on homework or exams. outside the parentheses is one over the standard devia- tion: σ = p(p2 − 1)N/12. Note that x < 0 for positive temperatures, with T → ∞ as x → 0. The low-temperature limit is more difficult to explore From the right hand side of this expression, it is clear in this way, and perhaps also less necessary: as previously that the Gaussian term will be dominant at large N as discussed, in this dilute limit when q  N all of the p- state paramagnets (and the Einstein solid) are equivalent long as |x| . 1, but that outside of that central peak the Gaussian will fall off roughly as e−N and cease to be to the two-state case (since it is rare for any dipole to carry reliable as a leading term. (This is why this result only more than one unit of energy). A particularly ambitious allows calculations in the high-temperature limit.) Thus, student (or particularly ambitious instructor) with an interest in special functions could consider Eq. (8) for the for |x| . 1, we can reliably solve for the multiplicity: p = 3 case, expand it in terms of factorials, and then  {p−1} N r interpret the result as a hypergeometric function: N p 12 −x2/2 Ωp(N, q) = ≈ √ e . (16) q 2πN p2 − 1 N{2} 2N = F −q, −(2N − q); 1 − N; 1  . This is pN times a standard normal distribution: a sum q q 2 1 2 4 over x thus gives pN as the total number of states, as (22) expected. The N → ∞ limit of this function falls into a class studied To use this result to study the physical behavior of our by Cvitkovi´cet al.12 After applying a rather complicated paramagnetic systems, the next step is to compute the series of identities and transformations and then summing 8 two asymptotic expressions from that work, the limiting Appendix A: Proofs of multiplicity formulas behavior is The equations for the extended binomial coefficients N{2} 1 Neq given in sectionIII can both be derived using combinato- Ω = ≈ √ . (23) p q 2πq q rial proofs based on the “principle of inclusion-exclusion:” a process of repeated overcounting and corrections. The general formula in Eq. (9) is As expected, this exactly matches the N → ∞ limit of the N p = 2 case, where q can be evaluated using Stirling’s {p−1} bq/pc N X NN + q − pj − 1 approximation. (The more general formula in Eq. (9) can = (−1)j . (A1) q j q − pj similarly be expressed in terms of a generalized hyperge- j=0 ometric function, p+1Fp(··· ), but finding an applicable asymptotic form is difficult.) This was proven by Dani by direct calculation8, but count- ing arguments like the following are sometimes more in- structive. Start by allowing unlimited energy per dipole and count V. CONCLUSIONS the number of ways to distribute the q units of energy among N dipoles. Just as for the Einstein solid in Eq. (1), this is the “multichoose” function N = N+q−1. (This For students studying based on q q Moore and Schroeder’s state-counting approach to en- is the j = 0 term in the sum above.) For finite p this tropy and the second law, the p-state paramagnets are obviously overcounts the number of states, because some a natural generalization of the Einstein solid and two- dipoles may have been assigned more than p − 1 units state paramagnet systems that form the foundation of of energy. We need to subtract off the number of states that entry point to the subject. The modest increase in where at least one dipole has p or more energy units. complexity lies entirely in the initial setup of any simple To do this, we first identify the overfilled dipole (there N example, so it is straightforward to assign problems that are 1 = N choices) and assign it a baseline of p units require no student background beyond what they have of energy, and then we count the number of ways to already practiced. This provides a source of additional distribute the remaining q − p energy units among all N N  N+q−p−1 examples to supplement the standard two for homework dipoles: q−p = q−p . (This subtraction is the or exams. Furthermore, because these examples form a j = 1 term in the sum.) But now we have overcorrected: related family of systems, there is a great deal of room for we have subtracted the states where two dipoles have too open-ended projects and curiosity-driven exploration us- much energy twice. To add back these overcounted states, N ing these same basic tools that focus on explicit counting there are 2 possible pairs, and for each possible pair we of states. must add back the number of states in which both have at least p units of energy: N  = N+q−2p−1. (This It is worth explicitly commenting that this is not the q−2p q−2p easiest approach to studying these systems: as with so positive correction is the j = 2 term.) This alternating many examples, once students understand the use of process continues until we have exhausted the number Boltzmann factors and the partition function, those tools of energy units: until j = bq/pc (the integer part of the provide a much more direct way to determine the tem- division), proving the formula above. 7 perature dependence of measurable quantities like energy For the specific p = 3 case, Andrews provides two and heat capacity of the p-state paramagnets. (This is formulas, the first of which was given as Eq. (8) above: briefly reviewed in AppendixB.) In fact, once students {2} min(q,2N−q) have learned both approaches it can be interesting to N X N2N − 2j = (−1)j . (A2) assign problems asking them to study the same system in q j q − j both ways. Seeing the agreement between these results j=0 can give a satisfying example of the relationships between Andrews presents these formulas without proof (calling them. them “easily derived,” which may be true for those with recent practice in combinatorics). A combinatorial proof of this result is as follows. We again apply the principle of inclusion-exclusion. ACKNOWLEDGMENTS Imagine each dipole as a box that can hold up to two marbles (energy units): one in a slot on the left and one The author thanks Thorsten Neuschel for helpful clar- on the right. There are thus 2N slots, and naively we can 2N ifications of the useful range of his extended binomial distribute the q marbles in q ways. (This is the j = 0 coefficient approximation, and also several years of stu- term in the sum above.) But this double counts cases dents at Alma College for serving as guinea pigs for some where a single box has only one marble, because it doesn’t of the ideas in this work. matter which slot is filled. So we choose one particular box 9

N (there are 1 choices), assume it has only one marble, To discuss limits of temperature, it is helpful to define and subtract off the number of ways of distributing the the dimensionless variable t ≡ kT/. The strict high- remaining q − 1 marbles among the remaining 2(N − 1) temperature limit is t  p > 1, which will apply in 2(N−1) realistic cases where p is a small integer. But we may slots: q−1 ways. (This subtraction is the j = 1 term in the sum.) But now we have overcorrected, because some also consider the formal limit p  t  1: this is the p = ∞ case corresponding to an Einstein solid. In either of those configurations had a second box with only one 1 1 1 marble. We need to add back the count of the number of of these high-temperature limits, y ≈ 1 − t + 2t2 − 6t3 . p p p2 p3 configurations with two boxes containing one marble each. If additionally t  p, y ≈ 1 − t + 2t2 − 6t3 , and so N There are 2 choices, and for each one the remaining count is 2(N−2). (This is the j = 2 term.) We repeat this p p2 p3 q−2 t − 2t2 + 6t3 alternating sum until we have considered every possible Zp,high-T ≈ 1 − 1 + 1 configuration: the last nonzero term is either j = q or t 2t2 6t3  p − 1 (p − 1)(2p − 1) 2N − q (so 2N − q − j = 0), whichever is lower. ≈ p 1 − + . (B4) 2t 12t2

Appendix B: Analysis using the partition function On the other hand, in the limit p  t  1, it follows that p kT y  1 and so Z∞,high-T ≈ 1/(1/t) = t = . Rather than the state counting described here, the  From these results, the total energy of the system can usual approach to analyzing the physics of paramagnetic be calculated in either of two standard ways: systems is to apply Boltzmann factors and the partition function. (Schroeder’s textbook Thermal Physics3 uses p−1 this as the basis of a few homework problems.) The N X U = NE¯ = je−j/kT , or (B5) steps that follow briefly summarize the results of these p p Z (substantially simpler) methods, for comparison to the p j=0 results found previously using direct state counting. N ∂Zp Up = − The partition function of a single dipole is Zp ∂β

p−1 N X = ((p − 1) − p coth(p/2kT ) + coth(/2kT )) . Z = e−j/kT = 1 + e−/kT + ··· + e−(p−1)/kT . 2 p (B6) j=0 (B1) Once again we can look at limiting temperatures. −/kT If we define the shorthand y = e , this can be written In the strict high-temperature limit t  p, we can use the x  1 expansion coth x ≈ 1 + x to show p−1 p x 3 X j 1 − y  p−1 p2−1  Z = y = , (B2) Up,high-T ≈ N − . This precisely matches the p 1 − y 2 12t j=0 earlier asymptotic form from Eq. (19). And if p  t  1, the previous expansion together with coth(p/2t) → 1 an algebraic identity that holds for any y 6= 1 and thus any means that U ≈ Nt = NkT , exactly as given by T 6= ±∞. Plugging in the definition of y and rearranging ∞,high-T the for an Einstein solid. terms leads us to From the energy, we can immediately also find the e−p/2kT ep/2kT − e−p/2kT magnetization using Eq. (13): Z = p e−/2kT e/2kT − e−/2kT sinh(p/2kT ) = e−(p−1)/2kT . (B3) Mp = µN (p coth(p/2kT ) − coth(/2kT )) . (B7) sinh(/2kT )

p2−1 The initial exponential term would be absent if we had In the strict high-temperature limit, Mp,high-T ≈ µN 6t , chosen the zero of energy to be the midpoint rather than exactly matching Eq. (21) and reproducing the 1/T be- the ground state. havior of Curie’s Law.

[email protected] 2 T. A. Moore, Six Ideas That Shaped Physics: Unit T. 1 T. A. Moore and D. V. Schroeder, “A different approach McGraw-Hill, New York, NY, 3rd ed., 2017. to introducing statistical mechanics,” American Journal of 3 D. V. Schroeder, An Introduction to Thermal Physics. Physics 65 no. 1, (Jan, 1997) 26–36, arXiv:1502.07051 Addison Wesley, San Francisco, CA, 2000. [physics.ed-ph]. 4 D. C. Schoepf, “A statistical development of entropy for 10

the introductory physics course,” American Journal of the factorials can: it is coded to perform the cancellation Physics 70 no. 2, (2002) 128–136. of terms between numerator and denominator before 5 T. Salagaram and N. Chetty, “Enhancing the evaluating the result. Some spreadsheet programs other understanding of entropy through computation,” than Excel do not implement =COMBIN(N,q) carefully in American Journal of Physics 79 no. 11, (2011) 1127–1132. this way, and are limited to smaller systems as a result. 6 T. Neuschel, “A note on extended binomial coefficients,” 10 S. Eger, “Stirling’s approximation for central extended Journal of Integer Sequences 17 no. 10, (Nov, 2014) 4, binomial coefficients,” The American Mathematical arXiv:1407.7429 [math.CO]. Monthly 121 no. 4, (2014) 344–349, arXiv:1203.2122 7 G. E. Andrews, “Euler’s ‘Exemplum Memorabile [math.PR]. Inductionis Fallacis’ and q-trinomial coefficients,” Journal 11 Keeping the next-leading term from Neuschel’s expansion of the American Mathematical Society 3 no. 3, (1990) is equivalent to including the 1/12N terms in Stirling’s 653–669. approximation for N!, as can be verified explicitly for the 8 A. Dani, “How to compute coefficients in trinomial p = 2 case. triangle at specific position?” Mathematics stack exchange, 12 M. Cvitkovi´c,A.-S. Smith, and J. Pande, “Asymptotic Aug, 2011. https://math.stackexchange.com/q/57112. expansions of the hypergeometric function with two large 9 It is important when using Excel to program multiplicity parameters—application to the partition function of a formulas using the =COMBIN(N,q) function for the binomial lattice gas in a field of traps,” Journal of Physics A: coefficients rather than explicitly using factorials, because Mathematical and Theoretical 50 no. 26, (Jun, 2017) that function in Excel can handle larger arguments than 265206, arXiv:1602.05146.