Skip to content
Tutorials Center
My learning

Topics

Lesson 7 of 39 ยท Microstates, Macrostates and Entropy

Boltzmann Entropy: S = k ln ฮฉ

Define entropy as S = k_B ln Omega, see why it must be a logarithm, and compute entropy changes for coins, spin systems and the free expansion of a gas.

Entropy was born in thermodynamics as a bookkeeping quantity for heat: dS = ฮดQ_rev / T. Ludwig Boltzmann gave it a microscopic meaning, and his formula is engraved on his gravestone in Vienna. In this lesson you will see why the formula has the form it does and use it to compute real entropy changes.

The definition

For a macrostate with multiplicity ฮฉ, the Boltzmann entropy is

Text
S = k_B ln ฮฉ

where ln is the natural logarithm and k_B = 1.380649 ร— 10^-23 J/K. Entropy has units of J/K. A system with only one microstate (ฮฉ = 1) has S = 0; more microstates means more entropy.

Why a logarithm?

Entropy should be additive: the entropy of two independent systems is the sum of their entropies, just as energy and volume are. But independent systems have multiplicities that multiply: if system A has ฮฉ_A microstates and system B has ฮฉ_B, the combined system has ฮฉ_A ฮฉ_B. The only continuous function turning products into sums is the logarithm:

Text
S_total = k ln(ฮฉ_A ฮฉ_B) = k ln ฮฉ_A + k ln ฮฉ_B = S_A + S_B

The constant k_B converts the dimensionless count into thermodynamic units. Its value is fixed by requiring agreement with thermodynamic temperature, which we will see in the lesson on temperature from entropy.

Python Entropy is additive

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.

Entropy of coins and spins

For N two-state objects with n in the "up" state, Stirling's approximation gives, with x = n/N:

Text
S = โˆ’N k_B [ x ln x + (1 โˆ’ x) ln(1 โˆ’ x) ]

This is largest at x = 1/2, where S = N k_B ln 2, and zero when all objects are in the same state.

Python Entropy of a two-state system

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.

Free expansion: a worked entropy change

Consider N molecules of an ideal gas. In a classical description each molecule's position can be anywhere in the volume V, so the number of position microstates is proportional to V^N (the momentum part is unchanged if the temperature does not change). Therefore

Text
ฮฉ โˆ V^N   โŸน   S = N k_B ln V + (terms independent of V)

If the gas expands freely from volume V_1 to V_2 (a "free expansion" into vacuum with no work and, for an ideal gas, no temperature change), the entropy change is

Text
ฮ”S = N k_B ln(V_2 / V_1)

For doubling the volume, ฮ”S = N k_B ln 2. For one mole this is R ln 2, about 5.76 J/K.

Python Entropy change when a gas doubles its volume

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 second number says that the probability of all molecules spontaneously retreating into one half is about 10 to the power of minus 1.8 ร— 10^23. That is why the expansion is irreversible in practice: nothing forbids the reverse, it is simply unimaginably improbable.

Entropy is a property of the macrostate and depends on what you consider accessible. Remove a partition and the number of accessible microstates grows, so S grows. This is the microscopic meaning of "entropy increases in irreversible processes".

Comparing with thermodynamic entropy

For an ideal gas expanding reversibly and isothermally at temperature T, thermodynamics gives ฮ”S = Q/T = n R ln(V_2/V_1) because Q = W = n R T ln(V_2/V_1). The statistical value N k_B ln(V_2/V_1) is the same, since n R = N k_B. The statistical and thermodynamic definitions agree, and entropy is a state function, so the free expansion has the same ฮ”S as the reversible path.

Python Two routes, same entropy change

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.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A system has exactly one accessible microstate. What is its Boltzmann entropy?

    S = k ln 1 = 0.
  2. 2. Why does the Boltzmann entropy use a logarithm?

    Omega_total = Omega_A Omega_B for independent systems, and only the logarithm turns this product into the sum S_A + S_B.
  3. 3. N molecules of an ideal gas expand freely and the volume triples at constant temperature. What is the entropy change?

    Omega is proportional to V^N, so Delta S = N k_B ln(V2/V1) = N k_B ln 3.
  4. 4. What is the entropy of N two-state objects at the most probable macrostate (half up, half down), approximately?

    Omega is about 2^N at the peak, so S is about k_B ln(2^N) = N k_B ln 2.

Summary

  • Boltzmann entropy: S = k_B ln ฮฉ, in J/K.
  • The logarithm makes entropy additive for independent systems.
  • Two-state system: S = โˆ’N k_B [x ln x + (1 โˆ’ x) ln(1 โˆ’ x)], maximum N k_B ln 2.
  • Doubling an ideal gas's volume raises entropy by N k_B ln 2 (R ln 2 โ‰ˆ 5.76 J/K per mole), the same as the thermodynamic result.

Next: Entropy and the Second Law