Partition Functions for a Two-Level System and the Harmonic Oscillator

We check that the partition function formulas for U, C, and S actually make physical sense, first with a simple two-level system and then with the harmonic oscillator — and yep, at 0 K everything ends up in the ground state. Whoa~!

Without giving it much thought, we derived $U, F, G, S, p, C$ and so on.

The state functions from last time, all from ln Z: U = −d lnZ/dβ = k_BT²(∂lnZ/∂T)_V, S = k_BT(∂lnZ/∂T)_V + k_B lnZ, F = −k_BT lnZ, then p, H, C_V and G

Now I’m going to justify that those equations actually mean something!!! In other words, we’re going to look at their physical meaning. Doing all of them is too much, so I’ll just check $U$, $C$, $S$.

The two-level system

So let’s check $U$, $C$, $S$ for the easiest, simplest one there is: the two-level system. The formulas and plots below are per particle; for $N$ independent particles, multiply $U$, $S$, and $C_V$ by $N$.

A two-level system: an upper level at E = Δ/2 and a lower level at E = −Δ/2

First, let’s find the partition function. $Z$ came out like this~

Z = e^(−βΔ/2) + e^(βΔ/2) = 2cosh(βΔ/2)

Then let’s get $U$ out of the partition function $Z$~

U = −d lnZ/dβ = −(1/Z) d/dβ (e^(βΔ/2) + e^(−βΔ/2)) = −(Δ/2)tanh(βΔ/2), so U/Δ = −(1/2)tanh(βΔ/2)

Shall we plot it quickly in MATLAB? lol

MATLAB: x = 0:0.1:20, t = 1./x, y = −0.5·tanh(t); U/Δ starts at −0.5 and climbs toward 0

I plotted it like this. Let me point out the spots to focus on here~

The same U/Δ plot with a red circle at x = 0 and a blue circle at the high-temperature end

$x$ is a scaled temperature, $x = 2k_BT/\Delta$ for these two-level plots, and at zero Kelvin it says U = −Δ/2.

What does that mean….?

It means that everything (every particle) in the two-level system is in the E = −Δ/2 state.

That means at 0 K, everything is in the ground state!!!!

Whoa~! This makes sense physically too hehe

And also, also, also: $(U/\Delta)$ converging to 0 as $T \to \infty$ means that when the temperature is crazy high, half of the particles are in the state $E = -\Delta/2$ and the other half are in the state $E = \Delta/2$. So the probabilities of being in each state become equal, and we…

P(E) = e^(−E/k_BT)/Z

had this, right?! When $T$ goes to infinity, the probabilities become equal.. hehe This makes sense too!!!! hehe yeahp

Then now let’s also look at the entropy.

S = k_BT(∂lnZ/∂T)_V + k_B lnZ

That’s what we had, so let me plug $Z$ in and work it out. $Z$ was

Z = e^(βΔ/2) + e^(−βΔ/2) = e^(Δ/(2k_BT)) + e^(−Δ/(2k_BT))

— that’s what we had.

S for the two-level system worked out: S = −(Δ/2)(1/T)tanh(Δ/(2k_BT)) + k_B ln(2cosh(Δ/(2k_BT))) = −(Δ/2)k_Bβ tanh(βΔ/2) + k_B ln(2cosh(βΔ/2))

So I just plotted this one roughly in MATLAB too hehe

MATLAB: y = −t·tanh(t) + log(2cosh(t)) with t = 1/x; S/k_B rises from 0 and levels off near 0.69

Of course there are parts to focus on here too hehe. It’s this part right here:

The same entropy plot with a red circle at the origin and a blue circle on the flat part near 0.69

The red part shows that at 0 K, $S = 0$, and $S = 0$ means that the number of possible microstates at absolute zero is 1!!! So it allows only the one case where everything is in the gro~~~~und state, right?!

And the blue part converges……

Why does it look like it converges….?

Let’s put the focus here and think about it: in the entropy S = k_B ln Ω, since it’s a two-level system, Ω = 2^(# of particles) = 2^N is what we have. Hmm… it makes sense that it converges hehe

Then let’s move on.

This time let’s also take a look at the heat capacity at constant volume of the two-level system~

C_V = k_BT{2(∂lnZ/∂T)_V + T(∂²lnZ/∂T²)_V}

was what we had…. Ah…. I’ll just use C_V = (∂U/∂T)_V.

Above, we showed U = −(Δ/2)tanh(βΔ/2), didn’t we??? Now if we differentiate this with respect to $T$,

(Note: $(\tanh x)' = \operatorname{sech}^2 x$ ………. isn’t this the kind of thing everyone forgets the moment they graduate from high school? lol)

C_V = (∂U/∂T)_V = (Δ/2)²(1/(k_BT²))sech²(Δ/(2k_BT)), so C_V/k_B = (Δ/(2k_BT))² sech²(Δ/(2k_BT))

I plotted this with MATLAB too~

MATLAB plot of the two-level heat capacity for x = 0 to 20: flat at zero, a sharp peak near x = 1, then a long tail toward 0

There are 3 parts to focus on here. Right here!!!

The same heat-capacity plot with a red circle at the flat start, a blue ellipse on the steep rise and a green ellipse on the tail

If you look closely at the red part first, there’s a low-temperature stretch where $C_V$ is so tiny it looks flat, even as $T$ rises. The reason?!

The two levels with a red arrow from the lower level up to the upper one

A particle needs the gap energy $\Delta$ to jump up, right?! At $k_BT \ll \Delta$, upper-level occupation is exponentially rare, so a small temperature change barely changes the mean energy. It is not an exactly zero response below a cutoff. This

The U/Δ plot again: a red circle on the flat start at −0.5 and a blue circle near 0 at high temperature

also explains why, in the U graph from before, the red part stays more or less flat and then goes pang~ shooting up!!!

And the blue part of the $C_V$ graph!!! There’s a part where $C_V$ shoots up bang bang bang like crazy. This part is called the Schottky anomaly, apparently. It’s where, despite small changes in temperature, the change in the system’s energy is crazy huge!!!! It means that here, warming shifts the equilibrium population toward the upper level especially quickly!!!! At any fixed temperature in equilibrium, up and down transition rates still balance. Oooh

And the last one, the green part!!! The green part means that when $T$ is very high, the shares of particles in the high-energy state and the low-energy state settle down, and the jumps up and the drops down even out, so a small change in temperature hardly changes the system’s energy at all.

Not that hard, huh hehe

The simple harmonic oscillator

Next, let’s also look at the simple harmonic oscillator we sorted out before. For the simple harmonic oscillator, the partition function came out easily as an infinite geometric series.

Z = Σ_α e^(−βE_α) = Σ over n from 0 to ∞ of e^(−β(n+1/2)ħω) = first term/(1 − ratio) = e^(−βħω/2)/(1 − e^(−βħω))

For the detailed derivation, it’s all in The Partition Function (Thermal & Statistical Mechanics I Studied #33), and we’ll interpret $U$, $S$, $C$ the way we did above.

U = −d lnZ/dβ with Z plugged in: −d/dβ(−βħω/2 − ln(1 − e^(−βħω))) = ħω(1/2 + 1/(e^(βħω) − 1))

U = ħω(1/2 + 1/(e^(βħω) − 1))

One side note. If we’re looking at when $T$ is insanely large, we can approximate 1/(e^(βħω) − 1) ≅ 1/(βħω) like this,

U as T → ∞: ħω(1/2 + 1/(βħω)) = ħω/2 + 1/β ≅ 1/β = k_BT

and if we throw away the $\frac{1}{2}\hbar\omega$ too, we can also confirm the (1-dimensional) energy equipartition E = (1/2)mv² + (1/2)kx² — please take note of that too~

Alright, so if we plot the graph above — now with scaled temperature $x = k_BT/(\hbar\omega)$ —

MATLAB: y = 1/2 + 1./(exp(t) − 1) with t = 1/x, x = 0 to 30; U/ħω starts at 0.5 and rises in a straight line

it comes out like this, and the part we should keep an eye on here is

The same plot with a red circle at the start and a blue ellipse on the straight part

this part.

In the red part, the point is that $U \neq 0$.

That is, even in the ground state there’s energy!

The cause quantum mechanics gave for this was something called quantum fluctuation in the ground state.

And the blue part — we did it all above — as the temperature gets higher and higher, it gets closer to U → k_BT as T → ∞. And theoretically, since there’s no limit on the energy in a harmonic oscillator (that is, since everything up to $n = \infty$ is possible), as the temperature gets higher and higher, $U$ also keeeeeeps getting higher!!!!

Alright, this time let’s look at $C$. The heat capacity $C$ first!!! I’ll hold $V$ fixed and slam a partial derivative with respect to $T$ on the $U$ above.

C_V = (∂U/∂T)_V worked out: ħω(ħω/(k_BT²))e^(ħω/k_BT)/(e^(ħω/k_BT) − 1)² = k_B(βħω)² e^(βħω)/(e^(βħω) − 1)²

C_V = k_B(βħω)² e^(βħω)/(e^(βħω) − 1)²

Let me try plotting this too!!!! Ta-da~

MATLAB: y = t²·e^t/(e^t − 1)² with t = 1/x, x = 0 to 10; C_V/k_B climbs from 0 and flattens out at 1

The place we should focus on here is

The same plot with a red ellipse on the flat part at 1

right here!!! It means that once the temperature reaches a certain level, the change in $U$ per change in $T$ is almost constant. Earlier above, $U$ was U → k_BT as T → ∞, right?

Then what value does that change in $U$ stay constant at???

Yep, it’s saying it’s constant at the Boltzmann constant.

We can also confirm that it’s constant at the Boltzmann constant from the $C_V$ formula:

C_V = k_B(βħω)² e^(βħω)/(e^(βħω) − 1)²

from here we can get it with a Taylor series expansion.

Taylor: e^x ≈ 1 + x near x ≅ 0, so at T → ∞ the denominator e^(βħω) − 1 → βħω, C_V ≅ k_B e^(βħω), and with the exponential sent to 1, C_V → k_B

If you learned limits of functions in high school and got the concept down back then, you’ll know why we Taylor-expand the denominator but send the numerator straight to 1 without expanding it.

We’re not in math class right now, so let’s move on and look at the entropy $S$. The formula for the entropy $S$ is easier to get from the Helmholtz function $F$.

F = −k_BT lnZ, so F = −k_BT ln(e^(−βħω/2)/(1 − e^(−βħω)))

The reason for using this is that

S = k_BT(∂lnZ/∂T)_V + k_B lnZ

rather than computing the entropy like this, it’s easier to count it as S = (U − F)/T!!! So let’s plug in and compute it.

S = (U − F)/T worked out for the oscillator; the red terms ħω/(2T) and −(1/2)k_Bβħω cancel and fly away

S = k_B(βħω/(e^(βħω) − 1) − ln(1 − e^(−βħω)))

I plotted this too!!!! hehe

MATLAB: y = t./(exp(t) − 1) − log(1 − exp(−t)) with t = 1/x, x = 0 to 10; S/k_B starts at 0 and keeps climbing past 3

For this one too, let’s just look at the parts to focus on:

The same plot with a red circle at the origin and a blue ellipse on the part that keeps rising

The red part!! $S = 0$ shows the single ground state at 0 Kelvin. The blue part shows $S$ growing without bound as $T$ grows without bound.

Why does it diverge?!

I mentioned it when we were looking at $U$, but it’s because the harmonic oscillator allows an infinite number of energy levels!!! You know this kind of picture (we saw it a lot in quantum mechanics lol)

Harmonic-oscillator energy levels in the parabolic well, with the wave functions ψ_0 to ψ_7 drawn on their levels

Since these energy levels go all the way up to $n = \infty$, the higher $T$ climbs, the energies will keeeeeeep going up too… hehe

(Picture from physics.stackexchange.com)

Somewhere in between

So here’s a question.

Not $n = 2$ like the two-level system but bigger than that, and not extremely big like the harmonic oscillator’s $n = \infty$ either: what happens if the allowed energy levels number, say, around $N = 20$?!

With $N = 20$, they say it lands somewhere in the middle of what we plotted above. (Plugging in $N = 20$ and computing the formulas isn’t hard, but I don’t think the numbers are what matters, so I’ll just patch it up with the graphs from the book.)

(Pictures below: Stephen Blundell, Concepts in Thermal Physics, Lee Jae-woo, p. 293)

Book figure: U/Δ against k_BT/Δ for 20 levels, rising from 0 and bending over

It doesn’t converge as extremely as for $n = 2$, and doesn’t diverge as extremely as for $n = \infty$… something like that lol (Of course at $T = \infty$ it’d converge, right? hehe)

Book figure: S/k_B against k_BT/Δ for 20 levels, climbing toward a dotted line near 3

Entropy too: it doesn’t diverge like $n = \infty$, but it does converge at a higher place than $n = 2$. That’s the picture!!!!

Book figure: C_V/k_B against k_BT/Δ for 20 levels, a broad hump near 1 around k_BT/Δ = 2, then a slow fall

Heat capacity, heat capacity~ It says that for $C_V$ to go to 0, a higher temperature than for $n = 2$ is needed. Because the temperature at which the probabilities of being in each state become equal is higher!!!~

Wow…

Sorry for writing such trivial stuff at such length… It’s really easy stuff, but I feel like I made it seem unnecessarily hard… hehe Still, it’s fun hehe


Heads-up. The figures here are the original notes, slips and all. A few things to watch for:

  • In the recap picture at the start, the pressure is $p = k_BT\left(\frac{\partial \ln Z}{\partial V}\right)_T$: the derivative is taken at constant $T$, not $V$.
  • In the MATLAB code for the heat capacity, the curve should be $t^2\,\mathrm{sech}^2 t$ with $t = \frac{\Delta}{2k_BT}$; the code computes $t^2\,\mathrm{sech}(t^2)$, so the plotted peak reaches about 0.66 instead of about 0.44 (the true peak sits at $k_BT \approx 0.42\Delta$). The shape, the Schottky bump, is the same.
  • In the last lines of the entropy, the first term keeps its $\beta$: $S = k_B\left(\frac{\beta\hbar\omega}{e^{\beta\hbar\omega}-1} - \ln\left(1 - e^{-\beta\hbar\omega}\right)\right)$, since $\frac{1}{T}\cdot\frac{\hbar\omega}{e^{\beta\hbar\omega}-1} = k_B\frac{\beta\hbar\omega}{e^{\beta\hbar\omega}-1}$.

Comments

Discussion happens via GitHub Discussions. You'll need a GitHub account to comment.