An ideal gas is an approximate model of the behavior of a gas that holds for low density gases. It is sparse and has weak internal interactions. The dynamics are determined by the ideal gas law:
PV=NkBT=nRT=32U
where P is the pressure, V is the volume occupied by the gas, N is the number of particles composing the gas, kB is the Boltzmann constant, T is the temperature, n is the number of moles, R is the Ideal gas constant and U is the internal energy1. The first and second forms apply only to classical gases, whereas the third is also valid for quantum gases (if the particles have mass).
An ideal gas is a system of free particles enclosed in a finite enclosure with rigid, perfectly elastic walls. The system Hamiltonian is
The entropy of an ideal gas can calculated as a function of volume V and temperature T by explicitly integrating dS=dQ/T. Let's consider a stateA, which we approach from two different states: one using an constant-volume transformation (path 1), the other using a isothermal one (path 2).
Along path 1, V is constant, so
∫TdQ=CV∫TdT
and thus if we start the transformation at temperature T0 we get
The pressure of an ideal gas is the average force per unit area that it exerts on the wall of its container. By calculating the energy transferred from each particle collision on the walls per unit time, we can derive the pressure directly from particle mechanics.
Take the wall to be normal to the x axis and assume the wall is perfectly reflecting. When a particle of velocity vx hits the wall, it transfers 2px=2mvx momentum to the wall. The total force on the wall is given by this momentum transfer multiplied by the amount of particles hitting a unit area of the wall, i.e. the particle flux.
The flux is the number of particles crossing a unit area per second. If the particles are moving over x, this is equal to a cylinder of unit cross section and length vxΔt≡vx, since Δt=1 second. Thus, the flux is given by
We use the entropy given by the sigma function S=kBlogΣ(E) where
Σ(E)=h3N1H(q,p)<E∫d3q1…d3qNd3p1…d3pN
and h is a dimensionally appropriate constant, specifically impulse×length, which gives energy×seconds. We put no restrictions on position, so all those integrals just amount to VN:
Σ(E)=(h3V)NH(q,p)<E∫d3p1…d3pN
Since the energy of a free particle is E=p2/2m, the momentum is p=2mE. This momentum describes a n-ball of radius R=p=2mE in the momentum-only phase space, but the integral finds the volume of that ball in phase space (by finding the representative points contained therein), so we can rename the integral as a function Ω3N(R) which finds the volume of a 3N-dimensional ball of radius R:
Σ(R)=(h3V)NΩ3N(R)
In general, Ω3N is
Ω3N(R)=x12+x22+…+xn2<R2∫dx1…dxn
(in our case, x≡p). We know both V and h (h just needs to have the correct dimensions, so might as well be h=1 Js in this case), so in order to find Σ and therefore S, we just need to solve Ω in 3N dimensions. Thankfully, Ω can be solved generally for any integer N (see Volume of an n-ball), which gives
This equation is simultaneously two things: the entropy of a classical gas, and also profoundly wrong. Alas, this is not the entropy we were hoping for, and not because the math or the ensemble are wrong. It is wrong because the term lnV causes this entropy to not be extensive, despite by definition needing to be so. The culprit is to be found in quantum effects, namely the indistinguishability of particles, which makes many (most) states equivalent to each other and therefore not appear in the entropy. In other words, our Σ(E) function greatly overcounts states by not taking this into account. But we're working with a classical ensemble, why do quantum effects matter? See, the issue is that despite working with a classical framework, the components here are atoms, molecules, subatomic particles, you name it, whatever makes up the gas, and as it happens, these are quantum objects by themselves and are subject to quantum effects. Their individual quantum quirks end up being seen at a macroscopic level too because while the whole gas isn't quantum, it's made of quantum particles. Problems like these are in the nature of statistical mechanics: if we are to derive the macroscopic from the microscopic, we cannot ignore the quirks of the microscopic world. By the way, this wrong result is generally referred to as the Gibbs paradox.
The Hamiltonian of the ideal gas is separable (H=∑i=1NHi), which allows us to solve the split the integral into 2N integrals, each in three dimensions.
The first integral is just the volume V. The second integral can be rewritten in Spherical coordinates by noticing that there is no angular dependency, and so the two angle integrals just evaluate to 4π:
It is possible to derive the behavior of an ideal gas using the quantum microcanonical ensemble. Consider a cube of side L and volume V=L3 filled with the ideal gas. Like all quantum statistical systems, there are two cases: a fermion gas and a boson gas (actually, there's third, secret option called a Boltzmann gas, where all eigenfunctions are symmetric, like for bosons, but counted using correct Boltzmann counting. This essentially gives the classical results starting from the quantum description).
Let's consider N non-interacting particles. We wish to know the occupation numbers{np} of the momentum states, which are the number of particles in the momentum state ∣p⟩ at a given time. Since the particles are non-interacting, these are equivalent to energy eigenstates∣E⟩. The total number of particles is of course N=∑pnp, whereas the total system energy is E=∑pnpεp. The energy of each state is purely kinetic: εp=∣p∣2/2m.
The number of possible states is reliant on the energy/momentum spectrum of the system (which is assumed to be discrete). However, for a large number of particles (and in the thermodynamic limit), the number of states is so high and dense that it is approximately continuous. As such, to aid the counting of the states, we can divide the quasi-continuous spectrum in clearly discrete cells identified by an index i. Each cell contains a large number gi of states. gi should be large, but still small enough that each cell remains unresolved at a macroscopic scale. This is because these cells are just a mental construct to make the counting easier, and should in theory disappear by the time we are done with the derivation. We name these temporary values εi the energy of the cell and gi the cell degeneracy.
We call ni the sum of all occupation numbers present in cell i, which is just the sum of all single-state occupation number np in the cell: ni=∑in cellnp. Since this is just a regrouping of the same states, these also satisfy the constraints N=∑ini and E=∑iεini.
We call {ni} the cell occupation, which is the set of all cell occupation numbers. Cell occupation describes how the system's microstate is distributed based on the cells, instead of on each individual state (which would've been {np}). It gives us information on which cells contain the most particles and which contain the fewest. As usual, there is a huge number of ways {ni} can be arranged and, similarly to the classical microcanonical ensemble, we should expect there to be a most probable set {nˉi} which describes thermal equilibrium. The highest probability set should be the highest entropy set, as per the second law of thermodynamics.
Let's call W({ni}) the number of possible combinations of {ni}. Cells are fictitious objects, so what cell each particle resides in has no real physical meaning. Thus, all cells are independent of each other and the number of total combinations is just the product of each individual cell's combinations:
W({ni})=j∏wj(nj)
where wj(nj) represents the possible state arrangements of the nj particles of the j-th cell. Finally, the state counting function for a certain system energy E is
Γ(E)={ni}∑W({ni})
What we need to solve the ensemble is to find all the W({ni}), and for that we need to find all the possible wj(nj).
Realistically though, we only care about the highest-entropy state {nˉi}, so
Let's start from the unrealistic-but-useful Boltzmann system. Here, particles are neither fermions nor bosons. They are entirely classical particles with no quantum-derived constraints on their wavefunction. As such, the method of counting their possible arrangements in the cells in immediate. Since we are trying to find how many ways there are of arranging N objects (particles) into some amount of boxes (cells), the number of combinations is given by the multinomial coefficient:
gjnj is the number of possible ways we can arrange nj particles in gj states. This number is here because we are counting combinations of cells, but each cell internally has its own number of combinations of particles therein. Since we have nj particles in the cell and we need to be distribute them over gj states, this yields wj(nj)=gjnj.
The highest entropy state is found by maximizing this function. To do this, we can use Lagrange multipliers (for a similar derivation, see Entropy from Lagrange multipliers)2. Our constraints γ1 and γ2 are particle number conservation and the energy conservation:
γ1=N−j∑nj,γ2=E−j∑εjnj
With this information, the Lagrangian to work on is
Terms are independent from each other, so the only way the sum can be zero is if each terms is individually zero:
lnnigi−α−βεi=0
which we can rearrange to get ni:
nˉi=eα+βεigi
where the bar over ni was added to remember that this is specifically the most likely/highest entropy ni. If we can figure out what α and β are, we can then substitute this back in lnW and use that to finally find the entropy. Right away, we can see a connection: this just the Maxwell-Boltzmann statistic, multiplied by gi and with α=−βμ and β=β. In fact, if we make this substitution, we get
A system of fermions is solved by exploiting the fact that nj∈{0,1}. Inside of a given cell j, to place nj fermions in gj states, we choose nj elements out of a set of gj elements. What we are looking for is the number of combinations, which is given by the binomial coefficient:
wj(nj)=(gjnj)=nj!(gj−nj)!gj!
Compared to the Boltzmann system, there are far fewer states, by a factor of (gj−nj)!. This is the consequence of constraining the wavefunction to be antisymmetric. Then
W({ni})=j∏nj!(gj−nj)!gj!
We now want the Boltzmann entropyS=kBlnW, so we need the logarithm:
Bosons require more attention than fermions because we can't rely on the exclusion principle. To figure out how many possible arrangements each cell can be put in, notice how the presences of gj distinct energy levels creates gj−1 partitions in each cell. While we can't modify the energy levels themselves, we can order them however we want to rearrange the partitions, keeping the particles where they are. This is a way of cycling through every possible arrangement of particle numbers. The number of ways to populate the cell with nj bosons is to throw them into the cell in any order (they will distribute themselves in the partitions) and then count the number of possible arrangements obtainable by permutations of nj bosons with gj−1 partitions3. These are
Now we want to determine what α and β are. Since the two quantum distributions differ only by a sign, we can deal with both of them together by writing
nj=eα+βεj±1gj
+ is for fermions, − is for bosons. The total number of particles is
N=j∑nj=j∑eα+βεj±1gj
Here we finally drop the cell notation. Remember that each cell contains gj states ∣p⟩. Thus, a sum over cells weighed by gj is the same as a sum over the states themselves
j∑gj≡p∑
where p is the momentum that identifies the state. Thus we can say
N=p∑eα+βεp±11
where p=∣p∣. Remember that we've known εp since the very beginning: εp=∣p∣2/2m.
To determine α and β, we can move to the thermodynamic limit, in which we look for the particle density n=N/V and the sum becomes an integral. Since integration changes the dimensions, we add a constant h with the dimensions of an angular momentum to correct them4:
To understand the change to Spherical coordinates, consider this: the previous sum occurs over all of the momenta in the ensemble. When we change to integration, we integrate over all momenta in the ensemble. But the integral tells us the number of particles (well, density) in a certain range of momenta, so if we integrate over a range that no particle is in, we get zero. So, we can trivially extend the integral from all momenta in the ensemble to all space. Anything that's not present will cancel out anyway. Integration over all space can be easily done with an infinite-radius sphere.
We now make the substitution βεp=x2, which gives us p=x2m/β. The integral becomes
n=h34π(β2m)3/2∫0∞eα+x2±1x2dx
To make physical sense, the density needs to remain finite even when β→0, despite β being at the denominator. For that to be true, the integral needs to go to zero, which means the denominator needs to go to infinity:
β→0limeα+x2=β→0limeα=∞
where we omitted the ±1 since it makes no difference. The second term is because limβ→0x2=limβ→0βεp=0. In this limit we have
β→0limnp=eα+x21=eα+βεp1
But this is precisely the Maxwell-Boltzmann statistic. So we found that our system (this time the whole system, not just an imaginary cell) is correctly described by the classical statistic for state occupation. Thus, we can definitively state that α=−βμ and β=1/kBT, with μ the chemical potential, kB the Boltzmann constant and T the temperature. We can also define the fugacity as z=e−α=eβμ. With this, we can write the final distribution
Notice how both quantum distributions converge to the same classical distribution at low β/high temperatures. This is because the higher the temperature gets, the more excited states become available, but the particle number remains the same. This means that the average occupation of the states becomes progressively lower and lower until it is so low that the Pauli exclusion principle does not even need to apply (there are so many available states compared to fermions that they don't need to compete on which occupies a state). With the principle gone, bosons and fermions end up behaving the same, which is why we get the same distribution for both.
For pressure, we can use a similar discussion as in the classical ideal gas (see Ideal gas > Pressure). The pressure is given the momentum transferred by a collision between a particle and a wall, times the flux of those particles on the wall. We found that to be
P=∫vx>02mvxvxf(p)dp=m∫vx>0vx2f(p)dp
where f(p) is the Maxwell-Boltzmann distribution for momentum, scaled by the particle density. We can instead express this distribution through the appropriate statistics by stating
We also cannot solve this, but we can do the usual spherical-coordinates-into-βεp=x2-substitution procedure to end up with an integral that we can directly compare to the pressure above. Doing so leads us this remarkable result:
PV=32U
This is the ideal gas law, the classical one. It might be in a somewhat unfamiliar form, but if we use the classical equipartition theorem (or the Boltzmann gas, see below) we can state U=3N/2β, which when put in returns PV=N/β=NkBT. Of course, this form does not apply in the quantum case, as the equipartition theorem is for classical gases only, but the more generic, internal-energy-based one does apply. This is a fascinating result because it's one of the few cases where a quantum system directly inherits classical behavior. The reason it remains the same is that the only physical dependency behind this law is for 3D motion to satisfy εp∝p2, which is true for all free particles, regardless of them being classical or quantum.
Now that we have the distributions, we can use them to find the lnW and then S=kBlnW for both fermions and bosons. For brevity, we call z−1eβεp=ξ, which makes the distributions into
Despite being inaccurate at a quantum level, a Boltzmann gas can still give us useful results at high temperatures. We can follow a similar procedure as we did when determining the parameters.
We can calculate the number of particles in the Boltzmann system as
N=p∑np
Using the Maxwell-Boltzmann statistic that we found yields
N=p∑z−1eβεp1=p∑ze−βεp
The deceptively important part here is the second step. Since there is no ±1, we can bring everything up to the numerator. When we jump into the thermodynamic limit to get the particle density, the integral can now be solved pretty easily:
Notice that in the boson/fermion cases, we never actually solved the integral. Here on the other hand, it ended up being pretty straight-forward. Using the quantum grand canonical ensemble (see below), one can prove that this is actually the leading order approximation of the quantum ideal gas density for both fermions and bosons.
Since 1/β=kBT, this returns the well-known result regarding the average energy of a particle in a three dimensional ideal gas, as given by the equipartition theorem:
In the quantum canonical ensemble, analytic calculation is actually often not possible. The reason is that the summation in the quantum canonical partition function QN is tough to solve. In fact, given the sets of occupation numbers{n} identified by some quantity (say, momentum p), we have
QN(V,T)=Trρ^={n}∑pnp=N∑e−βE({n})
where the sum happens over all sets {n} constrained by ∑pnp=N. It is this constraint that makes the sum so hard to manage, along with all thermodynamic quantities. That said, it is possible in some cases where the states are cleanly ordered and labeled, such as in a quantum harmonic oscillator. In that case, one must make sure to abide by the wavefunction constraints and their effects on state counting. More discussion on this in the Partition function > Properties page.
where the inner sum satisfies ∑pnp=N (see quantum canonical ensemble above). The important part in this equation is that the two sums can be merged, removing the inner sum's constraint:
N=0∑∞{n}∑pnp=N∑≡{n}∑
This is because constraining to a specific N no longer matters when you are summing over all possible N's, leaving us with the same sum as the canonical ensemble, but over every possible set, not just ones whose total is N. As such, representing the sums as separate or single is just a matter of preference over how you group the terms, just like how a+b+c+d is the same as (a+b)+(c+d). Thus
Z(z,V,T)={n}∑zNe−βE({n})=…
with no constraint. We can use the property e∑n=∏nen to rewrite both terms, since both N and E({n}) are sums:
…={n}∑p∏znpp∏e−βεpnp={n}∑p∏(ze−βεp)np={n}∑(ze−βε0)n0(ze−βε1)n1…=n0=0∑1 or ∞(ze−βε0)n0n1=0∑1 or ∞(ze−βε1)n1…=p∏np=0∑1 or ∞(ze−βεp)np
where we momentarily expanded the product by labeling each momentum state with a number. The sum now has two possibilities, depending on whether we are dealing with fermions or bosons:
where the first is directly obtained and the second is from the geometric series. Now that we have the grand partition function, we can derive everything else.
where + is for fermions, − is for bosons. Calculating the actual value is, unfortunately, not possible analytically. However, we can check the thermodynamic limit and find an approximate quantum solution.
This equation substitutes (and extends) the well-known classical PV=NkBT. Notice that volume does not make an appearance here, instead substituted by the cube of the thermal wavelength. Clearly then, a quantum gas depends not on the size of its enclosure (actually it does, just not directly), but rather on the wave properties of its components.
From the previous steps we can retroactively state
We ideally want to reuse the previous integral. However, the integral does not look the same at all. The trick is to reverse engineer a logarithm into existence by remembering that the derivative of a logarithm is a fraction of the argument. Conveniently, the denominator here is just the argument we need:
This is pleasantly compact, but the derivative is an eyesore. Thankfully, now that we know that we are working with f5/2, we can compute its derivative:
This result is actually a specific case of a more general recurrence relation among Fermi (and Bose) functions. It inverts to f3/2(z)=z∂z∂f5/2(z), which very nicely exists in our previous result as-is. As such, our final formula is
The process is the same as with fermions, except we use Bose functionsgk instead. We can find
kBTP=h34π∫0∞p2ln(1−ze−βεp)dp
which resolves to
kBTP=λ31g5/2(z)
Similarly, the particle density is
n=h34π∫0∞p2z−1eβεp1dp
which yields
n=λ31g3/2(z)
A more precise result can be reached by taking Bose-Einstein condensation into consideration. Condensation occurs at minimal temperatures, which in turn implies minimal particle energies, εp→0. In this state, the occupation number blows up and causes a singularity, making it technically impossible to calculate the integral at the lower bound p=0. Because of this, we can extract the term p=εp=0 from the equation of state sum before going to integral notation, which leaves us with
kBTP=λ31g5/2(z)−V1ln(1−z)
Similarly, the particle density is
n=λ31g3/2(z)+V11−zz
Both of these terms behave like ∼N when z≪1, so in the classical limit they spontaneously disappear. That said, only the additional density term is relevant. When z rises towards its limiting value of 1, the additional density term tends to blow up. At first glance, the equation of state term appears to do so too. However, notice how the number of particles in the ground state can be expressed in terms of z:
N0=⟨np=0⟩=n0V=1−zz
This is because λ→∞ when p=05, so we only keep the latter term. Conversely, the other term is excited boson number
Nexc=⟨np>0⟩=λ31g3/2(z)
Typically, Nexc≫N0, but near condensation temperature, this no longer holds true. Invert the ground state number and we get
z=N0+1N0
Among other things, this shows how closely tied ground state particle number and fugacity are in a boson gas. If we substitute this in the additional equation of state term we see
−V1ln(1−N0+1N0)=V1ln(N0+1)
Since V∝N, this entire term is ∼N1lnN, which disappears for large N.
Since the equation of state of bosons is identical to that of fermions, but with Bose functions instead of Fermi functions, the internal energy is itself identical, derived in the same way as above. It should be noted that the additional term due to condensation in the equation of state does not make a difference.
The form PV=nRT exists because, besides being convenient in a laboratory setting, thermodynamics was historically developed at a time where the existence of the atom had yet to be proven and with it, the particle division of matter. In fact, classical thermodynamics as a whole does not strictly require the existence of particles like atoms. ↩
Note that we are technically maximizing lnW here, not S. However, since S=kBlnW, they share maxima, so the result is the same. ↩
Think of it like this. Imagine you have four buckets and some marbles. You throw the marbles in the buckets randomly. Now each bucket contains some number of marbles, say n1, n2, n3 and n4. You want to know how many other outcomes you could have had if those same marbles counts ended up in different buckets. Like for example, if instead of (n1,n2,n3,n4) you ended up with (n2,n1,n3,n4). The amounts in the buckets are the same, they're just ordered differently. This time, the amounts in bucket 1 and 2 are reversed. (Crucially, the n's themselves are the same. You didn't throw them in again, you just moved the already existing amounts from one bucket to another.) There's two ways you can go about counting these possibilities. One way is to empty out two buckets and fill them back, just with reversed amounts. But here's a simpler way: just move the buckets. Instead of emptying and refilling them, just swap the actual buckets. The result is the same. Now go ahead and count in how many distinct ways you can reorder those buckets. And this is all just for one outcome of randomly throwing the marbles in, n1,n2,n3,n4. You can repeat this reordering count for every single possible set of n1,n2,n3,n4. But what you're doing here is finding every possible permutation of marbles in four buckets. Now just call them bosons instead of marbles and cell partitions instead of buckets and you're good. ↩
n has dimensions of inverse cubic length (1/L3). The integral gives a cubic momentum. So h, if used at the denominator, has to be length times momentum, which is angular momentum. ↩
If you are not convinced, remember that temperature is tied to kinetic energy. If you remove the momentum, and so the kinetic energy, you remove the temperature too. Since λ∝T−1/2, if T→0 then λ→∞. In other words, ground state bosons (and particles in general, really) are "stuck" at zero temperature. ↩