Skip to content

Lesson 6 · Microstates, Macrostates and Entropy

Counting the Einstein Solid

Count the microstates of an Einstein solid with the stars-and-bars formula, verify by brute force in Python, and see how multiplicity explodes with energy and size.

A coin has two states and counting is easy. Real solids store energy, and sharing energy among many oscillators gives the next classic counting problem: the Einstein solid. It is the best first model for how energy spreads and why entropy exists.

The model

Albert Einstein modeled a crystal as N independent quantum harmonic oscillators, all with the same angular frequency ω. Each oscillator can hold energy only in whole units of ε = ħω (we measure energy from the ground level, so we ignore the constant zero-point ½ħω per oscillator). The solid has q energy quanta in total, so its energy is U = qε.

(A three-dimensional crystal of M atoms has N = 3M oscillators, since each atom vibrates in three directions.)

A microstate says how many quanta each oscillator holds: (n_1, n_2, ..., n_N) with each n_i ≥ 0 and Σ n_i = q. The macrostate is (N, q).

A tiny example by hand

Take N = 3 oscillators and q = 2 quanta. The microstates are:

  • (2, 0, 0), (0, 2, 0), (0, 0, 2): one oscillator holds both quanta (3 ways).
  • (1, 1, 0), (1, 0, 1), (0, 1, 1): two oscillators hold one each (3 ways).

So Ω(3, 2) = 6.

Python Brute-force count of microstates

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The stars and bars formula

Count by picture. Write the q quanta as stars *, and separate the N oscillators by N − 1 bars |. For N = 3 oscillators we need 2 bars, and the stars before the first bar belong to oscillator 1, those between the bars to oscillator 2 and those after the last bar to oscillator 3. For example **|*| (two stars, a bar, one star, a bar, no stars) means (2, 1, 0), a state with q = 3.

Every microstate is one way of placing N − 1 bars among q + N − 1 symbols, so

Text
Ω(N, q) = C(q + N − 1, q) = (q + N − 1)! / ( q! (N − 1)! )

Check: N = 3, q = 2 gives C(4, 2) = 6, which matches.

Python Formula against brute force

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Growth of the multiplicity

Multiplicity explodes. For small q relative to N it behaves like N^q / q!; for q = N it grows roughly like 4^N (up to a slowly varying factor). Here is the behavior for several sizes, shown as ln Ω (which is what entropy needs).

Python ln Omega against the number of quanta

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that ln Ω increases with q but with a slowing slope (the curve bends over). This slope will turn out to be the inverse temperature, in the lesson on temperature from entropy.

Large-number approximation

With Stirling's approximation (see Combinatorics and Stirling) and q, N ≫ 1:

Text
ln Ω ≈ (q + N) ln(q + N) − q ln q − N ln N

For the special case q ≫ N (high energy per oscillator), Ω ≈ (e q / N)^N, so ln Ω ≈ N ln(q/N) + N.

Python Stirling estimate for ln Omega

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Why this model matters

Even though it ignores interactions, the Einstein solid already shows the key behavior: how energy is shared, why heat flows, how temperature emerges. We will use it in the next lessons to derive entropy, the second law and temperature, and in chapter 4 we revisit it with the partition function to get heat capacities.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the multiplicity of an Einstein solid with N = 4 oscillators and q = 3 quanta?

    Omega = C(q+N-1, q) = C(6, 3) = 20.
  2. 2. In the stars-and-bars picture, how many bars separate N oscillators?

    N oscillators need N - 1 dividers between them.
  3. 3. For N = 1 oscillator and any q, what is Omega?

    With one oscillator all q quanta sit in it: exactly one microstate. The formula C(q, q) = 1 agrees.
  4. 4. What does a macrostate of the Einstein solid specify?

    The macrostate is (N, q); the individual occupation numbers define microstates.

Summary

  • The Einstein solid has N identical oscillators sharing q energy quanta of size ε = ħω.
  • Multiplicity is Ω(N, q) = C(q + N − 1, q), derived by stars and bars and confirmed by brute force.
  • For large N, q: ln Ω ≈ (q + N) ln(q + N) − q ln q − N ln N.
  • Multiplicity grows astronomically, so we use ln Ω.

Next: Boltzmann Entropy