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.

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$.

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

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

Shall we plot it quickly in MATLAB? lol

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

$x$ is a scaled temperature, $x = 2k_BT/\Delta$ for these two-level plots, and at zero Kelvin it says
.
What does that mean….?
It means that everything (every particle) in the two-level system is in the
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…

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.
![]()
That’s what we had, so let me plug $Z$ in and work it out. $Z$ was

— that’s what we had.

So I just plotted this one roughly in MATLAB too hehe

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

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
, since it’s a two-level system,
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~

was what we had…. Ah…. I’ll just use
.
Above, we showed
, 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)

I plotted this with MATLAB too~

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

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?!

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

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.

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.


One side note. If we’re looking at when $T$ is insanely large, we can approximate
like this,
![]()
and if we throw away the $\frac{1}{2}\hbar\omega$ too, we can also confirm the (1-dimensional) energy equipartition
— please take note of that too~
Alright, so if we plot the graph above — now with scaled temperature $x = k_BT/(\hbar\omega)$ —

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

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
. 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.


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

The place we should focus on here is

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
, 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:

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

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$.

The reason for using this is that
![]()
rather than computing the entropy like this, it’s easier to count it as
!!! So let’s plug in and compute it.


I plotted this too!!!! hehe

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

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)

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)

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)

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

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.