For an ultrarelativistic particle, . Including the two spin states of an electron, counting wavevectors in a sphere gives the density of states
The grand canonical partition function of the ideal Fermi gas is therefore
Since the grand potential satisfies , integration by parts gives
Thus
This is the equation of state of an ideal ultrarelativistic gas.