Intuition The big picture
The partition function Z Z Z is the master quantity of statistical mechanics: it counts, with proper Boltzmann weighting, how many ways a system can arrange its energy. Once you have Z Z Z , you don't have to go back to microstates — every thermodynamic quantity falls out by differentiation. The Helmholtz free energy F F F is the single most direct bridge: it is essentially the logarithm of Z Z Z .
WHY a logarithm? Because energies add when you join systems, but partition functions multiply (independent systems → product of Z Z Z 's). To turn a multiplicative quantity into an additive, extensive thermodynamic potential, you take a log.
Definition Canonical partition function
For a system in contact with a heat bath at temperature T T T (fixed N N N , V V V ), the canonical partition function is
Z = ∑ i e − β E i , β ≡ 1 k B T Z = \sum_i e^{-\beta E_i}, \qquad \beta \equiv \frac{1}{k_B T} Z = ∑ i e − β E i , β ≡ k B T 1
where the sum runs over all microstates i i i with energy E i E_i E i . (For a classical continuum, the sum becomes a phase-space integral.)
Definition Helmholtz free energy
F = U − T S F = U - TS F = U − T S , where U U U is internal energy and S S S is entropy. It is the thermodynamic potential whose natural variables are = = T , V , N = = ==T, V, N== == T , V , N == , and it is minimized at equilibrium for a system at fixed T , V , N T,V,N T , V , N .
The goal: show the deceptively simple result
F = − k B T ln Z \boxed{F = -k_B T \ln Z} F = − k B T ln Z
and derive it from scratch , not just quote it.
Intuition Strategy (WHAT we'll do)
We compute U U U and S S S directly from Z Z Z , then assemble F = U − T S F = U - TS F = U − T S and watch everything collapse to − k B T ln Z -k_BT\ln Z − k B T ln Z .
The Boltzmann probability of microstate i i i is
p i = e − β E i Z . p_i = \frac{e^{-\beta E_i}}{Z}. p i = Z e − β E i .
Why this step? The bath fixes T T T ; maximizing entropy at fixed average energy gives exactly this exponential weight, and dividing by Z Z Z normalizes ∑ i p i = 1 \sum_i p_i = 1 ∑ i p i = 1 .
U = ⟨ E ⟩ = ∑ i p i E i = 1 Z ∑ i E i e − β E i . U = \langle E \rangle = \sum_i p_i E_i = \frac{1}{Z}\sum_i E_i\, e^{-\beta E_i}. U = ⟨ E ⟩ = ∑ i p i E i = Z 1 ∑ i E i e − β E i .
Notice ∂ ∂ β e − β E i = − E i e − β E i \dfrac{\partial}{\partial\beta}e^{-\beta E_i} = -E_i e^{-\beta E_i} ∂ β ∂ e − β E i = − E i e − β E i , so
∑ i E i e − β E i = − ∂ Z ∂ β . \sum_i E_i e^{-\beta E_i} = -\frac{\partial Z}{\partial\beta}. ∑ i E i e − β E i = − ∂ β ∂ Z .
Therefore
U = − 1 Z ∂ Z ∂ β = − ∂ ln Z ∂ β . U = -\frac{1}{Z}\frac{\partial Z}{\partial\beta} = -\frac{\partial \ln Z}{\partial \beta}. U = − Z 1 ∂ β ∂ Z = − ∂ β ∂ l n Z .
Why this step? We turned a weighted sum into a derivative of Z Z Z — the whole point: differentiate ln Z \ln Z ln Z instead of summing microstates.
Start from the Gibbs/Shannon entropy
S = − k B ∑ i p i ln p i . S = -k_B \sum_i p_i \ln p_i. S = − k B ∑ i p i ln p i .
Why this step? This is the statistical definition of entropy; it reduces to k B ln Ω k_B\ln\Omega k B ln Ω for equal-probability microstates. Substitute ln p i = − β E i − ln Z \ln p_i = -\beta E_i - \ln Z ln p i = − β E i − ln Z :
S = − k B ∑ i p i ( − β E i − ln Z ) = k B β ∑ i p i E i ⏟ U + k B ln Z ∑ i p i ⏟ = 1 . S = -k_B\sum_i p_i(-\beta E_i - \ln Z) = k_B\beta\underbrace{\sum_i p_i E_i}_{U} + k_B\ln Z\underbrace{\sum_i p_i}_{=1}. S = − k B ∑ i p i ( − β E i − ln Z ) = k B β U i ∑ p i E i + k B ln Z = 1 i ∑ p i .
So
S = k B β U + k B ln Z = U T + k B ln Z . S = k_B\beta\, U + k_B\ln Z = \frac{U}{T} + k_B\ln Z. S = k B β U + k B ln Z = T U + k B ln Z .
F = U − T S = U − T ( U T + k B ln Z ) = U − U − k B T ln Z . F = U - TS = U - T\left(\frac{U}{T} + k_B\ln Z\right) = U - U - k_B T\ln Z. F = U − T S = U − T ( T U + k B ln Z ) = U − U − k B T ln Z .
F = − k B T ln Z \boxed{F = -k_B T\ln Z} F = − k B T ln Z
Why this is beautiful: U U U cancels exactly. The free energy is pure ln Z \ln Z ln Z — confirming the intuition that F F F is the additive (extensive) partner of the multiplicative Z Z Z .
Because d F = − S d T − p d V + μ d N dF = -S\,dT - p\,dV + \mu\,dN d F = − S d T − p d V + μ d N , we read off:
Self-consistency check: using U = F + T S U = F+TS U = F + T S with F = − k B T ln Z F=-k_BT\ln Z F = − k B T ln Z and S S S above reproduces U = − ∂ β ln Z U=-\partial_\beta\ln Z U = − ∂ β ln Z . ✓
Worked example (1) Single two-level system
Energies 0 0 0 and ε \varepsilon ε .
Step: Z = e 0 + e − β ε = 1 + e − β ε Z = e^{0} + e^{-\beta\varepsilon} = 1 + e^{-\beta\varepsilon} Z = e 0 + e − β ε = 1 + e − β ε . Why? Just sum Boltzmann weights over the two states.
Step: F = − k B T ln ( 1 + e − β ε ) F = -k_BT\ln(1 + e^{-\beta\varepsilon}) F = − k B T ln ( 1 + e − β ε ) .
Step: U = − ∂ β ln Z = ε e − β ε 1 + e − β ε = ε e β ε + 1 U = -\partial_\beta\ln Z = \dfrac{\varepsilon e^{-\beta\varepsilon}}{1+e^{-\beta\varepsilon}} = \dfrac{\varepsilon}{e^{\beta\varepsilon}+1} U = − ∂ β ln Z = 1 + e − β ε ε e − β ε = e β ε + 1 ε . Why? Differentiate ln Z \ln Z ln Z w.r.t. β \beta β .
Sanity: as T → ∞ T\to\infty T → ∞ (β → 0 \beta\to0 β → 0 ), U → ε / 2 U\to\varepsilon/2 U → ε /2 (both states equally likely). ✓ As T → 0 T\to0 T → 0 , U → 0 U\to0 U → 0 (ground state). ✓
N N N independent two-level systems
Why: independent ⇒ Z tot = Z 1 N Z_{\text{tot}} = Z_1^{N} Z tot = Z 1 N (partition functions multiply).
F = − k B T ln Z 1 N = − N k B T ln ( 1 + e − β ε ) . F = -k_BT\ln Z_1^{N} = -N k_BT\ln(1+e^{-\beta\varepsilon}). F = − k B T ln Z 1 N = − N k B T ln ( 1 + e − β ε ) .
Key lesson: F F F is extensive (∝ N \propto N ∝ N ) precisely because ln \ln ln converts the product into a sum. This is the structural reason free energy, not Z Z Z , is the natural thermodynamic potential.
Worked example (3) Classical harmonic oscillator (1D)
H = p 2 2 m + 1 2 m ω 2 x 2 H = \frac{p^2}{2m} + \frac12 m\omega^2 x^2 H = 2 m p 2 + 2 1 m ω 2 x 2 , classical phase-space integral with measure d x d p / h dx\,dp/h d x d p / h :
Z = 1 h ∫ e − β p 2 / 2 m d p ∫ e − β m ω 2 x 2 / 2 d x . Z = \frac{1}{h}\int e^{-\beta p^2/2m}\,dp\int e^{-\beta m\omega^2 x^2/2}\,dx. Z = h 1 ∫ e − β p 2 /2 m d p ∫ e − β m ω 2 x 2 /2 d x .
Step: Gaussian integrals: ∫ e − a x 2 d x = π / a \int e^{-ax^2}dx=\sqrt{\pi/a} ∫ e − a x 2 d x = π / a . So
Z = 1 h 2 π m β 2 π β m ω 2 = 2 π h β ω = k B T ℏ ω . Z = \frac{1}{h}\sqrt{\frac{2\pi m}{\beta}}\sqrt{\frac{2\pi}{\beta m\omega^2}} = \frac{2\pi}{h\beta\omega} = \frac{k_BT}{\hbar\omega}. Z = h 1 β 2 π m β m ω 2 2 π = h β ω 2 π = ℏ ω k B T .
Why this step? Each Gaussian gives a β − 1 / 2 \beta^{-1/2} β − 1/2 ; they combine to β − 1 \beta^{-1} β − 1 .
Step: U = − ∂ β ln Z = − ∂ β ( − ln β + const ) = 1 β = k B T U = -\partial_\beta\ln Z = -\partial_\beta(-\ln\beta + \text{const}) = \frac{1}{\beta} = k_BT U = − ∂ β ln Z = − ∂ β ( − ln β + const ) = β 1 = k B T . ✓ Equipartition! (1 2 k B T \frac12 k_BT 2 1 k B T per quadratic DOF, two DOF.)
F = − k B T ln ( k B T / ℏ ω ) F = -k_BT\ln\!\big(k_BT/\hbar\omega\big) F = − k B T ln ( k B T /ℏ ω ) .
F = − k B T Z F = -k_BT\, Z F = − k B T Z (forgot the log)."
Why it feels right: F F F should grow with how many states there are, and Z Z Z counts states. Fix: Without the log, F F F wouldn't be extensive (joining systems multiplies Z Z Z but should add F F F ). Only ln Z \ln Z ln Z adds. So F = − k B T ln Z F=-k_BT\ln Z F = − k B T ln Z .
U = − ∂ β Z U=-\partial_\beta Z U = − ∂ β Z instead of − ∂ β ln Z -\partial_\beta\ln Z − ∂ β ln Z ."
Why it feels right: ∂ β Z = − ∑ E i e − β E i \partial_\beta Z = -\sum E_i e^{-\beta E_i} ∂ β Z = − ∑ E i e − β E i does bring down the energies. Fix: but U U U is the average energy, so you must divide by Z Z Z — that division is exactly what makes it 1 Z ∂ β Z = ∂ β ln Z \frac{1}{Z}\partial_\beta Z = \partial_\beta\ln Z Z 1 ∂ β Z = ∂ β ln Z . Forgetting it gives an unnormalized quantity.
S S S : S = + ∂ F / ∂ T S=+\partial F/\partial T S = + ∂ F / ∂ T ."
Why it feels right: differentiation looks symmetric. Fix: d F = − S d T − ⋯ dF=-S\,dT-\cdots d F = − S d T − ⋯ , the minus is built in; S = − ∂ F / ∂ T S=-\partial F/\partial T S = − ∂ F / ∂ T . Since F F F decreases with T T T and S > 0 S>0 S > 0 , the minus sign is mandatory.
Common mistake "For independent particles,
Z = Z 1 + Z 2 Z = Z_1 + Z_2 Z = Z 1 + Z 2 ."
Why it feels right: energies add, so maybe Z Z Z adds too. Fix: Z = ∑ e − β ( E a + E b ) = ( ∑ e − β E a ) ( ∑ e − β E b ) = Z 1 Z 2 Z=\sum e^{-\beta(E_a+E_b)} = (\sum e^{-\beta E_a})(\sum e^{-\beta E_b}) = Z_1 Z_2 Z = ∑ e − β ( E a + E b ) = ( ∑ e − β E a ) ( ∑ e − β E b ) = Z 1 Z 2 . Adding energies in the exponent ⇒ multiplying exponentials.
Recall Feynman: explain to a 12-year-old
Imagine a big bag of dice that each can land on a number, but cold dice "prefer" small numbers and hot dice are wild. The partition function Z Z Z is one number that secretly knows how many likely outcomes the whole bag has. The "free energy" F F F is just a stretched-out version of Z Z Z — we squish Z Z Z with a logarithm so that when you put two bags together, you can simply add their free energies instead of multiplying. From that one stretched number you can predict the bag's temperature behavior, its energy, and its messiness (entropy) — without ever counting every die one by one.
Mnemonic Remember the formula
"Free Logs Are Negative, Times Temperature" → F = − k B T ln Z F = -k_BT\ln Z F = − k B T ln Z .
And for energy: "U is the beta-slope of log-Z, downhill" → U = − ∂ β ln Z U=-\partial_\beta\ln Z U = − ∂ β ln Z .
#flashcards/physics
Define the canonical partition function. ::: Z = ∑ i e − β E i Z=\sum_i e^{-\beta E_i} Z = ∑ i e − β E i , sum over all microstates, β = 1 / k B T \beta=1/k_BT β = 1/ k B T .
Helmholtz free energy in terms of Z Z Z ? ::: F = − k B T ln Z F=-k_BT\ln Z F = − k B T ln Z .
Why a logarithm in F F F (not just Z Z Z )? ::: Independent systems multiply their Z Z Z ; ln \ln ln converts the product to a sum so F F F is extensive (additive).
Internal energy from Z Z Z ? ::: U = − ∂ ( ln Z ) / ∂ β = 1 Z ( − ∂ β Z ) U=-\partial(\ln Z)/\partial\beta = \frac{1}{Z}(-\partial_\beta Z) U = − ∂ ( ln Z ) / ∂ β = Z 1 ( − ∂ β Z ) .
Entropy from Z Z Z and U U U ? ::: S = U / T + k B ln Z = − ∂ F / ∂ T S=U/T + k_B\ln Z = -\partial F/\partial T S = U / T + k B ln Z = − ∂ F / ∂ T .
Pressure from Z Z Z ? ::: p = k B T ∂ ( ln Z ) / ∂ V = − ∂ F / ∂ V p=k_BT\,\partial(\ln Z)/\partial V = -\partial F/\partial V p = k B T ∂ ( ln Z ) / ∂ V = − ∂ F / ∂ V .
In deriving F = U − T S F=U-TS F = U − T S , what cancels? ::: U U U cancels exactly, leaving − k B T ln Z -k_BT\ln Z − k B T ln Z .
For N N N identical independent two-level systems, F = ? F=? F = ? ::: F = − N k B T ln ( 1 + e − β ε ) F=-Nk_BT\ln(1+e^{-\beta\varepsilon}) F = − N k B T ln ( 1 + e − β ε ) .
Classical 1D oscillator Z Z Z ? ::: Z = k B T / ℏ ω Z=k_BT/\hbar\omega Z = k B T /ℏ ω , giving U = k B T U=k_BT U = k B T (equipartition).
Common sign error in entropy formula? ::: S = − ∂ F / ∂ T S=-\partial F/\partial T S = − ∂ F / ∂ T (minus, from d F = − S d T − p d V + μ d N dF=-SdT-pdV+\mu dN d F = − S d T − p d V + μ d N ).
U equals minus d lnZ / d beta
S equals minus kB sum p ln p
log gives extensive potential
Boltzmann probability p_i
Intuition Hinglish mein samjho
Dekho, statistical mechanics ka asli "boss" quantity hai partition function Z = ∑ i e − β E i Z=\sum_i e^{-\beta E_i} Z = ∑ i e − β E i . Yeh basically saare microstates ko Boltzmann weight ke saath count karta hai — thande system me low-energy states zyada important, garam me sab states almost barabar. Ek baar Z Z Z mil gaya, toh tumhe phir se microstate-by-microstate jaana nahi padta; sab thermodynamics differentiation se nikal aati hai.
Sabse seedha connection hota hai Helmholtz free energy F = U − T S F=U-TS F = U − T S ke saath, aur result yaad rakhne layak hai: F = − k B T ln Z F=-k_BT\ln Z F = − k B T ln Z . WHY log? Kyunki do independent systems jodo toh unke Z Z Z multiply hote hain (Z = Z 1 Z 2 Z=Z_1Z_2 Z = Z 1 Z 2 ), par energy aur free energy toh add honi chahiye (extensive). Log multiplication ko addition me badal deta hai — isiliye F F F me ln Z \ln Z ln Z aata hai, sirf Z Z Z nahi.
Derivation simple hai: U = − ∂ β ln Z U=-\partial_\beta\ln Z U = − ∂ β ln Z (average energy), aur Gibbs entropy se S = U / T + k B ln Z S=U/T + k_B\ln Z S = U / T + k B ln Z . Jab F = U − T S F=U-TS F = U − T S me daalo, U U U exactly cancel ho jaata hai aur bachta hai sirf − k B T ln Z -k_BT\ln Z − k B T ln Z . Bahut clean! Iske baad S = − ∂ F / ∂ T S=-\partial F/\partial T S = − ∂ F / ∂ T , p = − ∂ F / ∂ V p=-\partial F/\partial V p = − ∂ F / ∂ V — sab ready.
Do common galtiyaan: (1) log bhool jaana — phir F F F extensive nahi rahega, galat. (2) U = − ∂ β Z U=-\partial_\beta Z U = − ∂ β Z likh dena bina Z Z Z se divide kiye — average lena hai, isliye 1 Z ∂ β Z = ∂ β ln Z \frac{1}{Z}\partial_\beta Z=\partial_\beta\ln Z Z 1 ∂ β Z = ∂ β ln Z hota hai. Bas yeh do cheez sambhaal lo toh poora topic tumhara.