Ultrarelativistic Gas
A casual walkthrough of relativistic effects — γ, momentum, energy — and how they reshape the math when gas particles scream close to the speed of light.
A title that suggests we’re now going to take relativistic effects into account when looking at gases.
A relativistic “effect” means that as the speed $v$ gets closer and closer to nature’s speed limit $c$, something looks different…. or feels different, that kind of effect. For a particle of rest mass m₀, the relativistic momentum and total energy are p = γm₀v and E = γm₀c². The rest mass itself stays m₀, with

— they look different like this, that’s what I mean. For details, it’s all here: Relativistic Mass, Momentum, and Energy (Modern Physics I Studied #5). (It’s special relativity, based on the Lorentz transformation.)
Since
, we could say “there’s no relativistic effect,” whereas when the speed $v$ is crazy fast (almost as fast as light),
, so you’ve got to take relativistic effects into account, or you’ll eat errors.
![]()
The left-hand side is the “total energy.” So I’ll write it as
. Then this equation follows:
![]()
This is all~~~ in the link I attached above too. Alright, here we go.
In
, when
, we get the approximation
— that’s in the link up there too. Let me write
as

and plug it into the general equation above. Writing $K$ in that form means we’ve completely ignored relativistic effects, right?! So

this equation represents the non-relativistic limit!!! That is, as $v$ gets smaller and smaller, the total energy
converges to
— that’s what it means!!!
You can derive it with high-school math too~

Ah, there’s a Taylor approximation in there, so I guess I shouldn’t have called it high-school math.. heh
Alright alright alright, and when the speed gets super super fast and closes in on the top speed there is, the speed of light: where did we learn the energy converges?
It converges to
, that’s what we learned. That is, just as we called the convergence of $E$ (as a function of $p$) above the non-relativistic limit, $E = pc$, which shows where $E$ converges when $v$ is large, is called the ultrarelativistic limit.
(Note: the relation between $p$ and $E$ is called the dispersion relation, riiight~? hehe)
So these are the two limits of the dispersion relation, and if we put them on one set of axes, it looks like this

I’m done photographing textbooks and uploading them, so I drew it myself in MATLAB with some rough numbers, and there’s each of the limits. So a pair $(p, E)$ outside those lines can’t exist. Oh, and the actual $(p, E)$ sits somewhere in there, between them: if $p \ll mc$, it’s close to the non-relativistic limit; if $p \gg mc$, it’s close to the relativistic limit.
So if I paint the dispersion relation of a particle with mass $m$ over it,

well, that’s what I’m saying.
Actually, up until now I’d been casually taking the non-relativistic limit and deriving the partition function of the gas, the internal energy, and all sorts of state functions. But in this posting, instead of the non-relativistic limit, I’m going to derive all sorts of state functions using the relativistic limit.
However, apparently at the undergraduate level the relativistic limit isn’t used much. But,,, I’m a scaredy-cat….. Still, later on, if something happens — you never know how life goes lol — so I want to at least organize it before moving on hehe. In case one day I suddenly have to use it??
Oho, so then.
Now we look at the gas
Clearly the gas here is a classical ideal gas, so it follows neither Fermi-Dirac nor Bose-Einstein but the Boltzmann distribution!!! Now, since we’re trying to look at the ultrarelativistic limit of the gas, we latch onto this curiosity:
“The gas of course doesn’t move at the speed of light, but what if $v \to c$?? Where would it converge??”
I think you can understand this post as finding the answer to that question. So we’re going to use the dispersion relation $E = pc$, and we’re going to express it as an equivalent wave using the de Broglie matter-wave formula. That’s okay, right??

This is the momentum of a photon and the energy of a photon, but since we’re going to use the Boltzmann distribution below, I didn’t want to use the word “photon.” So I just derived it like that.
Now I’m going to derive the partition function.

Here $g(k)$ is the density of states, which was derived from the standing-wave condition, and it is

(The detailed derivation is here: Density of States and Statistical Mechanics of the Ideal Gas (Thermal & Statistical Mechanics I Studied #36).) Ah, and as I said earlier, I used the Boltzmann distribution. Now I’ll do the partition-function integral.

Into this,

if I just plug this in well,

the blue gamma function shows up!!!

I’m going to write this like this~

![]()
Huh?!?! When relativistic effects weren’t considered, it was
, remember?! Submitting evidence: Quantum Concentration and Thermal de Broglie Wavelength (Thermal & Statistical Mechanics I Studied #38).
Anyway, unlike the non-relativistic case, in the ultrarelativistic case the partition function of the ideal gas is proportional to $VT^3$: the $T$ part got squared.
Why is that?
I’ll think about it later!! Okay, so now there’s more to do.

Apparently you write everything in the partition function except $V$ in terms of this capital lambda, like this.
(I think it’s good to understand this by contrast with the linked post above. For the details, please check that post.)
U, C, F, p, H, S, G, and so on
Having defined the partition function of the ultrarelativistic gas like this, for an ultrarelativistic gas — using the approximation E ≈ pc, exact for massless particles — I’ll derive $U$, $C$, $F$, $p$, $H$, $S$, $G$, and so on.
First, I’ll assume there are $N$ indistinguishable ultrarelativistic gas particles. And another assumption we need: the number of thermally accessible energy levels is much greater than the number of gas molecules. Only then

Yes~ So now that we’ve sorted out the partition function for $N$ gas particles, we’ll get to the actual state functions.
I’ll derive $U$ first. Since we’re after $U$, I’ll use the 3rd line of the equation above, not the 2nd!!


For reference, the internal energy $U$ of a non-relativistic gas was
, so you can see that the internal energy of the ultrarelativistic gas is twice that.
Then, now, heat capacity!!
![]()
Likewise, in the non-relativistic case the heat capacity at constant volume was $\frac{3}{2}Nk_B$, a factor of 2 apart from the one above.
Then now I’ll derive the Helmholtz function $F$.
![]()
This time I’ll keep it simple with the 2nd line from the top, not the 3rd.

Therefore the Helmholtz function $F$ is

Back when we did the Maxwell relations, we saw that if you partially differentiate the Helmholtz function $F$ with respect to $V$ and slap on a minus sign, you get the pressure.

In the non-relativistic model the pressure was also $p = nk_BT$, remember?! Isn’t that neat? Even in the ultrarelativistic approximation E ≈ pc, this classical ideal gas has pressure $p = nk_BT$, just as in the non-relativistic case. Amaaazing.
In this classical ideal-gas model, the pressure depends only on the temperature and the number density $n$.
Now, if we mash up the energy $U = 3Nk_BT$ with the pressure $p = nk_BT$,

Yet again: in the non-relativistic case $p$ was $\frac{2}{3}u$!!~
(At the same temperature $p$ is the same, but they differ in the energy?? You could put it like that hehe)
Why the factor of 2? In three dimensions, the non-relativistic kinetic energy goes as p²/(2m), while the ultrarelativistic energy goes as pc. Those different momentum dependences give 3k_BT/2 versus 3k_BT per particle. Here the non-relativistic thermal energy leaves out the constant rest energy mc².
Quick quick, let’s also find the entropy $S$!! As we’ve used a lot before, I’ll use
.

I’ll also derive the enthalpy $H$! I’ll get $H$ from $U + pV$~

The Gibbs function $G$ is what’s left.

![]() |
![]() |
|
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Right after Big to the Bang
Now I’m going to talk about something a little fun. What I’m trying to explain with this: I want to think for a moment about right after the birth of our universe — Big to the Bang!!!
First, the universe is expanding. “Redshift” is the evidence for it, so the fact that the universe is expanding is something we can accept. For this comparison, let’s model each component as expanding reversibly and adiabatically, with no heating or heat exchange. That is a useful approximation; it is not a proof based on a global energy balance for the whole universe.

That is, the universe is expanding adiabatically, and since
for a reversible change, “adiabatic” here means “isentropic expansion”.
But for a non-relativistic gas (something with mass, like matter),

For a non-relativistic gas, “isentropic” means “
constant”. On the other hand, the entropy of an ultrarelativistic gas is

So for an ultrarelativistic gas, isentropic is represented by “
constant”.
Alright alright, as the universe expands, a non-relativistic gas and radiation can cool differently once they are thermally decoupled. While they exchange heat efficiently, they share a temperature. Photons need Bose statistics with μ = 0, rather than the fixed-particle-number classical entropy above, but their reversible adiabatic expansion still gives VT³ = constant.
Writing V ∝ a³ in terms of the expansion factor a, the decoupled non-relativistic gas has T ∝ a⁻², while radiation has T ∝ a⁻¹. That is the sense in which the first one cools faster.
Matter’s rest-energy density falls as a⁻³, while radiation’s energy density falls as a⁻⁴ because its photons also redshift. Both become more dilute, but radiation loses energy faster. That helps explain why matter eventually outweighed radiation in the energy budget.
(I really hate the universe.. lol I have zero interest in space, but this was kind of cool so I wrote it up lol)
Heads-up. The figures here are the original notes, slips and all. A few things to watch for:
- The energy–momentum relation is $E^2 = p^2c^2 + (m_0c^2)^2 = p^2c^2 + m_0^2c^4$; the picture drops the square on $m_0c^2$.
- In the de Broglie line, $\frac{1}{c}\frac{h}{2\pi}(2\pi f) = \frac{\hbar\omega}{c}$, not $c\hbar\omega$; it equals $\hbar k$ because $k = \omega/c$.
- With $x = \beta\hbar ck$, $dk = \frac{dx}{\beta\hbar c}$ and $k^2 = \frac{x^2}{(\beta\hbar c)^2}$, so the factor in front of the integral is $\left(\frac{1}{\beta\hbar c}\right)^3 = \left(\frac{k_BT}{\hbar c}\right)^3$, not $\left(\frac{1}{\hbar ck}\right)^3$; the final $Z_1 = \frac{V}{\pi^2}\left(\frac{k_BT}{\hbar c}\right)^3$ is right.
- In the first line of $\ln Z_N$ for $F$, the bracket is $\left(V\cdot\frac{1}{\Lambda^3}\right)^N$ ($\Lambda$ cubed), as in the next line.

























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