1 Introduction

The properties of ideal Fermi and Bose gases are the starting points for the understanding of the low-temperature behaviour of a broad range of physical systems, including electrons in metals [1, 2], the helium liquids [3, 4] and systems of trapped gases [5]. Associated with these is interest in systems of lower dimensionality including graphene [6], helium films [7] and ultra-cold atoms in quasi-1d and quasi-2d traps [8].

The properties of ideal quantum gases are expressed, conveniently and succinctly in terms of the so-called Fermi–Dirac and Bose–Einstein functions. And essential to this is knowledge of the chemical potential [9].

Traditionally Fermi–Dirac and Bose–Einstein functions have been found from tables and power series expansions. The 1938 paper by McDougall and Stoner [10] gave extensive tables for fermions and there was a discussion of the corresponding functions for bosons by London [11], with series expansions given by Robinson [12] and generalized by Clunie [13]. A consolidated treatment of these functions is found in Pathria [14].

The problem with the McDougal–Stoner tables and the above treatments was that the functions were given for different values of \(\mu /kT\) which made for difficulties finding the chemical potential \(\mu \). In 1974 Betts [15] published tables of (reduced) chemical potential as a function of (reduced) temperature for 3d fermions and bosons; at that time, it was a heroic achievement of minicomputer programming. Ebner and Fu [16] gave useful series expressions for 3d fermions and analytic expressions for 2d fermions. Also they produced extensive tables [17], sadly now unavailable.

A further provision of series expansions for fermions was by Hore and Frankel [18] who gave expressions for the intermediate quantum region. These series were expanded about \(z=1\) where z is the fugacity. Expansions in the intermediate region for both bosons and fermions have been given by Sotnikov et al. [19].

The advent of symbolic mathematics software such as Mathematica has revolutionized the way Fermi–Dirac and Bose–Einstein calculations may be carried out. Such software can perform series expansions, reversion of series, symbolic integration, numerical integration to arbitrary precision and general symbolic manipulation. Moreover Mathematica “knows of” a large number of the “special functions” and their properties. Also it has inverse function support.

The Fermi–Dirac and the Bose–Einstein integrals may both be expressed in terms of the polylogarithm functions, once the chemical potential is known. In this paper we provide Mathematica functions to obtain the chemical potential. From these it is then straightforward to evaluate properties of Bose and Fermi gases. For reference we include the classical (Maxwell) gas. Of course at low temperatures such a gas is un-physical; it violates the third law of thermodynamics. But at high temperatures the way that the Bose and Fermi gases deviate from the classical is instructive.

2 General Methodology

2.1 The Polylogarithm Functions

The expectation value of an extensive function of energy \(Q(\varepsilon )\) is given by

$$\begin{aligned} {\bar{Q}}=\alpha \sum _{i} Q(\varepsilon _{i})\,{n}(\varepsilon _{i}), \end{aligned}$$
(1)

where the sum is taken over the single particle energy states and \(\alpha \) is the factor which accounts for the degeneracy of the particles’ spin states. This is 2 for electrons (spin \(S= \frac{1}{2}\)); more generally, it will be \(2S + 1\). Here \(n(\varepsilon )\) is the Fermi–Dirac or the Bose–Einstein distribution function

$$\begin{aligned} n(\varepsilon ) = \frac{1}{e^{(\varepsilon -\mu )/kT}+ a}, \end{aligned}$$
(2)

where a is understood to be \(+1\) for fermions and \(-1\) for bosons. Classical particles also can be accommodated by taking \(a=0\). We may refer to such particles as “maxwellons”.

The distribution function involves the chemical potential \(\mu \), and so, this must be known before any later calculations. A key result of this paper is the provision of Mathematica functions for evaluation of the chemical potential for free fermion and boson gases in one, two and three dimensions.

In the thermodynamic limit Eq. (1) usually may be converted to an integral

$$\begin{aligned} {\bar{Q}}=\alpha \int \limits _{0}^{\infty } Q(\varepsilon )\, g(\varepsilon )\,{n}(\varepsilon )\, {\mathrm {d}}\varepsilon , \end{aligned}$$
(3)

where \(g(\varepsilon )\) is the energy density of states. Since \(Q(\varepsilon )\) and \(g(\varepsilon )\) are often proportional to powers of \(\varepsilon \) we require to evaluate thermodynamic integrals of the form

$$\begin{aligned} \int \limits _0^\infty \varepsilon ^n n(\varepsilon )\,{\mathrm {d}}\varepsilon = \int \limits _0^\infty \frac{\varepsilon ^n\,{\mathrm {d}}\varepsilon }{e^{(\varepsilon -\mu )/kT}+ a}= (kT)^{n+1} \int \limits _0^\infty \frac{{x}^n\,{\mathrm {d}}{x}}{e^{x} z^{-1}+a}, \end{aligned}$$
(4)

where \(z= e^{\mu /kT}\) is the fugacity. These integrals are related to the polylogarithm functions \({\text {Li}}_s(z)\) [20, 21]:

$$\begin{aligned} \begin{aligned} \int \limits _0^\infty \frac{{x}^{s-1}}{ e^{x}\, z^{-1} +1}\,{\mathrm {d}}{x}&\phantom {-}=-\Gamma (s){\text {Li}}_s(-z) \\ \int \limits _0^\infty \frac{{x}^{s-1}}{e^{x} z^{-1}-1}\,{\mathrm {d}}{x}&\phantom {-}=\phantom {-}\Gamma (s){\text {Li}}_s(z)\\ \int \limits _0^\infty \frac{{x}^{s-1}}{e^{x} z^{-1}\phantom {+1}}\,{\mathrm {d}}{x}&\phantom {-}=\phantom {-}\Gamma (s)\, z. \end{aligned} \end{aligned}$$
(5)

The Maxwell case has been added for completeness.

We see that the thermodynamic integrals in the Bose and the Fermi case are thus given in terms of the polylogarithm functions:

$$\begin{aligned} \begin{aligned} \int \limits _0^\infty \frac{\varepsilon ^n\,{\mathrm {d}}\varepsilon }{e^{(\varepsilon -\mu )/kT}+ 1}&=-(kT)^{n+1}\Gamma (n+1){\text {Li}}_{n+1}(-e^{\mu /kT})\\ \int \limits _0^\infty \frac{\varepsilon ^n\,{\mathrm {d}}\varepsilon }{e^{(\varepsilon -\mu )/kT}- 1}&=+(kT)^{n+1}\Gamma (n+1){\text {Li}}_{n+1}(+e^{\mu /kT})\\ \int \limits _0^\infty \frac{\varepsilon ^n\,{\mathrm {d}}\varepsilon }{e^{(\varepsilon -\mu )/kT}\phantom {\,\,- 1}}&=+(kT)^{n+1}\Gamma (n+1)\,e^{\mu /kT}. \end{aligned} \end{aligned}$$
(6)

It then follows that the calculation of thermodynamic functions of ideal Fermi and Bose gases boils down to the evaluation of polylogarithm functions—once the chemical potential is known.

2.2 Common Energy Scale

When discussing fermions it is customary to use the Fermi energy as a convenient energy scale. This is the energy of the highest filled state at \(T=0\). Such a definition is clearly not applicable to maxwellons and to bosons. But it would be convenient to have a common energy scale applicable to particles whatever their statistics. In 3d the Fermi energy \(\varepsilon _{{\mathrm {F}}}\) and the Fermi wave vector \(k_{{\mathrm {F}}}=(2m\varepsilon _{{\mathrm {F}}})^{1/2}/\hbar \) are given by

$$\begin{aligned} \varepsilon _{\mathrm{F}} =\frac{\hbar ^{2} }{2m} \left( \frac{6\pi ^{2} }{\alpha } \frac{N}{V} \right) ^{{2/ 3} }, \quad k_{{\mathrm {F}}} = \left( \frac{6 \pi ^2}{\alpha } \frac{N}{V} \right) ^{1/3}. \end{aligned}$$
(7)

The Fermi wave vector is a measure of the inverse particle spacing. And this measure is appropriate in the discussion of maxwellons and bosons. In this spirit we shall introduce a characteristic wave vector, which we call the quantum wave vector \(k_{{\mathrm {q}}}\), and relate this to a quantum energy \(\varepsilon _{{\mathrm {q}}}=\hbar ^2k_{{\mathrm {q}}}^2/2m\). This would be the Fermi energy in the case of fermions. In 1, 2 and 3d this is

$$\begin{aligned} \begin{aligned} \varepsilon _{{\mathrm {q}}}&=\frac{\hbar ^2}{2m} \left( \frac{\pi }{\alpha }\frac{N}{L}\right) ^2&\quad \text {1d}\\&=\frac{2\pi \hbar ^{2} }{\alpha m} \frac{N}{A}&\quad \text {2d}\\&= \frac{\hbar ^2}{2m}\left( \frac{6\pi ^2}{\alpha }\frac{N}{V} \right) ^{2/3}&\quad \text {3d}. \end{aligned} \end{aligned}$$
(8)

We note that Betts [15] uses different definitions for Bose and Fermi characteristic energies; this can be confusing.

2.3 Density of States

The (energy) density of states for free particles in one, two and three dimensions is [22]

$$\begin{aligned} \begin{aligned} g(\varepsilon )&= \frac{L}{\pi \hbar }\left( \frac{m}{2}\right) ^{1/2}\varepsilon ^{-1/2}&\quad \text {1d}\\&=\frac{Am}{2\pi \hbar ^2}&\quad \text {2d}\\&=\frac{V}{4\pi ^2\hbar ^3}(2m)^{3/2}\varepsilon ^{1/2}&\quad \text {3d}. \end{aligned} \end{aligned}$$
(9)

In terms of the quantum characteristic energy these may be expressed

$$\begin{aligned} \begin{aligned} g(\varepsilon )&=\frac{1}{2} \frac{N}{\alpha }\frac{1}{(\varepsilon \varepsilon _{{\mathrm {q}}})^{1/2}}\qquad \text {1d} \\&= \frac{N}{\alpha }\frac{1}{\varepsilon _{{\mathrm {q}}}} \,\,\qquad \qquad \,\,\,\,\,\,\,\text {2d}\\&=\frac{3}{2} \frac{N}{\alpha }\frac{\varepsilon ^{1/2}}{\varepsilon _{{\mathrm {q}}}^{3/2}}\qquad \quad \,\,\,\,\text {3d} \end{aligned} \end{aligned}$$
(10)

or, generally, in d dimensions

$$\begin{aligned} g(\varepsilon )=\frac{d}{2} \frac{N}{\alpha }\varepsilon ^{(d-2)/2}/\varepsilon _{{\mathrm {q}}}^{d/2}. \end{aligned}$$
(11)

We note that for atoms trapped in a harmonic trap the density of states is proportional to \(\varepsilon ^{d-2}\); then, polylogarithm functions of different orders (usually integer) will be needed in the thermodynamic limit.

3 Chemical Potential and Fugacity

The number of particles in the system is given by

$$\begin{aligned} N=\alpha \int \limits _0^\infty g(\varepsilon )\,n(\varepsilon )\,{\mathrm {d}}\varepsilon . \end{aligned}$$
(12)

However, the density of states \(g(\varepsilon )\) is proportional to N so that N cancels and Eq. (12) leads to an expression for the quantum energy

$$\begin{aligned} \varepsilon _{{\mathrm {q}}}^{d/2}= \frac{d}{2} \int \limits _0^\infty \varepsilon ^{(d-2)/2} n(\varepsilon )\,{\mathrm {d}}\varepsilon . \end{aligned}$$
(13)

This gives the quantum energy in terms of the chemical potential and the temperature. By inverting this relation we may find the chemical potential as a function of the quantum energy and the temperature.

For the Maxwell, Fermi and Bose cases Eq. (13) gives

$$\begin{aligned} \varepsilon _{\mathrm {q}}^{d/2}= & {} \quad (kT)^{d/2}\Gamma (1+d/2)e^{\mu /kT} \quad \qquad \qquad \quad \quad \text {Maxwell}\nonumber \\= & {} - (kT)^{d/2}\Gamma (1+d/2){\text {Li}}_{d/2}(-e^{\mu /kT}) \quad \quad \text {Fermi}\nonumber \\= & {} \quad (kT)^{d/2}\Gamma (1+d/2){\text {Li}}_{d/2}(e^{\mu /kT}) \qquad \quad \text {Bose}. \end{aligned}$$
(14)

In terms of the quantum energy we shall introduce the reduced chemical potential \(\mu ^*\), defined as

$$\begin{aligned} \mu ^*=\mu /\varepsilon _{{\mathrm {q}}} ; \end{aligned}$$
(15)

and this will be expressed as a function of \(\tau \), the reduced temperatureFootnote 1

$$\begin{aligned} \tau =kT/\varepsilon _{{\mathrm {q}}}. \end{aligned}$$
(16)

The fugacity is expressed in terms of \(\tau \) as \( z(\tau )=e^{\mu ^*(\tau )/\tau }. \) Using our reduced variables, Eq. (14) become

$$\begin{aligned} \begin{aligned} \tau ^{-d/2}&=\quad \Gamma (1+d/2)z(\tau ) \qquad \quad \qquad \qquad \text {Maxwell}\\&= - \Gamma (1+d/2){\text {Li}}_{d/2}(-z(\tau )) \quad \quad \,\text {Fermi}\\&=\quad \Gamma (1+d/2){\text {Li}}_{d/2}(z(\tau )) \quad \qquad \,\text {Bose}. \end{aligned} \end{aligned}$$
(17)

Then, from inversion of these equations, \(z(\tau )\) is given by

$$\begin{aligned} z(\tau )&= \frac{1}{\Gamma (1+d/2)}\tau ^{-d/2}\quad \qquad \qquad \quad \,\,\,\qquad \text {Maxwell} \end{aligned}$$
(18)
$$\begin{aligned}&=-{\text {Li}}_{d/2}^{-1}\left[ \frac{-1}{\Gamma (1+d/2)}\tau ^{-d/2}\right] \quad \qquad \text {Fermi} \end{aligned}$$
(19)
$$\begin{aligned}&=+{\text {Li}}_{d/2}^{-1}\left[ \frac{1}{\Gamma (1+d/2)}\tau ^{-d/2}\right] \quad \qquad \text {Bose} \end{aligned}$$
(20)

and then \(\mu ^*(\tau )\) by

$$\begin{aligned} \mu ^*(\tau )&= \tau \ln \left\{ \frac{1}{\Gamma (1+d/2)}\tau ^{-d/2}\right\} \quad \qquad \qquad \,\,\qquad \text {Maxwell} \end{aligned}$$
(21)
$$\begin{aligned}&=\tau \ln \left\{ -{\text {Li}}_{d/2}^{-1}\left[ \frac{-1}{\Gamma (1+d/2)}\tau ^{-d/2}\right] \right\} \qquad \text {Fermi} \end{aligned}$$
(22)
$$\begin{aligned}&=\tau \ln \left\{ +{\text {Li}}_{d/2}^{-1}\left[ \frac{1}{\Gamma (1+d/2)}\tau ^{-d/2}\right] \right\} \qquad \text {Bose}. \end{aligned}$$
(23)

Mathematica routines for these functions (Fermi and Bose) are given in Appendix A.

4 Functions and Their Series Expressions

Details of the calculation of the low-temperature and high-temperature series are given in the appendices. Associated Mathematica Notebooks are included in Supplementary Information, allowing evaluation of these series to arbitrary order.

A key point about the Mathematica calculations is that while Mathematica provides the InverseFunction command used in the chemical potential and fugacity expressions, the InverseFunction provision does not extend to symbolic series calculations. For this reason we have to perform the series expansion first and then obtain the inverse by reversing the power series.

In this section below we summarize the results of these calculations. We shall use the Mathematica functions of Appendix A to create plots of the chemical potential and the series approximations given. A Mathematica notebook creating the plots below is given in Supplementary Information MOESM1_ESM.nb.

4.1 Maxwellons in 1d

In Eqs. (21) and (18) we put \(d=1\) giving

$$\begin{aligned} \mu _{{\mathrm {M1}}}^*(\tau )&=\tau \log \left( \frac{2}{\sqrt{\pi } }\tau ^{-1/2}\right) , \end{aligned}$$
(24)
$$\begin{aligned} z_{{\mathrm {M1}}}(\tau )&=\frac{2}{\sqrt{\pi }}{\tau ^{-1/2}}. \end{aligned}$$
(25)

4.2 Fermions in 1d

In Eqs. (22) and (19) we put \(d=1\) giving

$$\begin{aligned} \mu _{{\mathrm {F1}}}^*(\tau )&=\tau \ln \left\{ -{\text {Li}}_{1/2}^{-1} \left[ -\frac{2}{\sqrt{\pi }}\tau ^{-1/2}\right] \right\} , \end{aligned}$$
(26)
$$\begin{aligned} z_{{\mathrm {F1}}}(\tau )&= -{\text {Li}}_{1/2}^{-1}\left[ -\frac{2}{\sqrt{\pi }}\tau ^{-1/2}\right] . \end{aligned}$$
(27)

Chemical potential—low-temperature series

$$\begin{aligned} \mu _{{\mathrm {F1}}}^*(\tau )= 1 +\frac{\pi ^2 }{12}\tau ^2 +\frac{\pi ^4 }{36}\tau ^4 +\frac{7 \pi ^6 }{144}\tau ^6+\cdots \end{aligned}$$
(28)

Chemical potential—high-temperature series

$$\begin{aligned} \begin{aligned} \mu _{{\mathrm {F1}}}^*(\tau )&= \tau \log \left( \frac{2}{\sqrt{\pi } }\tau ^{-1/2}\right) + \sqrt{\frac{2}{\pi }}{\tau }^{1/2} +\frac{\left( 9-4 \sqrt{3}\right) }{3 \pi }+{}\\&\quad +\frac{4 \left( 5 \sqrt{2}-4 \sqrt{6}+3\right) }{3 \pi ^{3/2}}\frac{1}{\tau ^{1/2}} -\frac{\left( 12 \sqrt{2}-48 \sqrt{3}+71\right) }{3 \pi ^2 }\frac{1}{\tau }+\cdots . \end{aligned} \end{aligned}$$
(29)

The first term is the Maxwell chemical potential.

The 1d Fermi chemical potential, together with low-T and high-T approximations, is shown in Fig. 1.

Fig. 1
figure 1

Fermi chemical potential in 1d. E is the exact result Eq. (26), L is the low-temperature approximation: the first two terms of Eq. (28), M is the Maxwell expression Eq. (24), H is the high-temperature approximation: the first two terms of Eq. (29)

Fugacity—low-temperature series. Since \(z_{{\mathrm {F1}}}(\tau )\) diverges as \(\tau \rightarrow 0\) there is no simple low-temperature power series. But the low-temperature behaviour can be expressed as

$$\begin{aligned} z_{{\mathrm {F1}}}(\tau )=e^{1/\tau }\left\{ 1+\frac{\pi ^2 }{12}\tau +\frac{\pi ^4 }{288}\tau ^2+\frac{\left( 288 \pi ^4+\pi ^6\right) }{10368}\tau ^3+\cdots \right\} \end{aligned}$$
(30)

with the limiting low-temperature behaviour

$$\begin{aligned} z_{{\mathrm {F1}}}(\tau )\sim e^{1/\tau }. \end{aligned}$$
(31)

Fugacity—high-temperature series

$$\begin{aligned} \begin{aligned} z_{{\mathrm {F1}}}(\tau )&= \frac{2}{\sqrt{\pi } }\frac{1}{\tau ^{1/2}} +\frac{2 \sqrt{2}}{\pi }\frac{1}{\tau } +\frac{8 \left( 3-\sqrt{3}\right) }{3 \pi ^{3/2} }\frac{1}{\tau ^{3/2}}+{}\\&\quad +\frac{4 \left( 15 \sqrt{2} -10 \sqrt{6} +6 \right) }{3 \pi ^2 }\frac{1}{\tau ^2}+\cdots . \end{aligned} \end{aligned}$$
(32)

The first term is the Maxwell fugacity.

4.3 Bosons in 1d

In Eqs. (23) and (20) we put \(d=1\) giving

$$\begin{aligned} \mu _{{\mathrm {B1}}}^*(\tau )&=\tau \ln \left\{ {\text {Li}}_{1/2}^{-1} \left[ \frac{2}{\sqrt{\pi }}\tau ^{-1/2}\right] \right\} , \end{aligned}$$
(33)
$$\begin{aligned} z_{{\mathrm {B1}}}(\tau )&= {\text {Li}}_{1/2}^{-1}\left[ \frac{2}{\sqrt{\pi }}\tau ^{-1/2}\right] . \end{aligned}$$
(34)

Chemical potential—low-temperature series

$$\begin{aligned} \begin{aligned} \mu _{{\mathrm {B1}}}^*(\tau )&=-\frac{1}{4}\pi ^2\tau ^2-\frac{1}{4}\pi ^{5/2}\zeta (\tfrac{1}{2})\tau ^{5/2} -\frac{3}{16}\zeta (\tfrac{1}{2})^2 \pi ^3\tau ^3\\&\quad +\frac{1}{16} \pi ^{7/2} \left( \pi \zeta \left( -\tfrac{1}{2}\right) -2 \zeta \left( \tfrac{1}{2}\right) ^3\right) \tau ^{7/2}+\cdots \end{aligned} \end{aligned}$$
(35)

where \(\zeta ()\) is the Reimann zeta function.

Chemical potential—high-temperature series

$$\begin{aligned} \begin{aligned} \mu _{{\mathrm {B1}}}^*(\tau )&=\tau \log \left( \frac{2}{\sqrt{\pi } }\tau ^{-1/2}\right) - \sqrt{\frac{2}{\pi }}{\tau }^{1/2} +\frac{\left( 9-4 \sqrt{3}\right) }{3 \pi }\\&\quad -\frac{4 \left( 5 \sqrt{2}-4 \sqrt{6}+3\right) }{3 \pi ^{3/2}}\frac{1}{\tau ^{1/2}} -\frac{\left( 12 \sqrt{2}-48 \sqrt{3}+71\right) }{3 \pi ^2 }\frac{1}{\tau }+\cdots . \end{aligned} \end{aligned}$$
(36)

The first term is the Maxwell chemical potential.

The 1d Bose chemical potential, together with low-T and high-T approximations, is shown in Fig. 2.

Fig. 2
figure 2

Bose chemical potential in 1d. E is the exact result Eq. (33), L is the low-temperature approximation: the first term of Eq. (35), M is the Maxwell expression Eq. (24), H is the high-temperature approximation: the first two terms of Eq. (36)

Fugacity—low-temperature series

$$\begin{aligned} z_{{\mathrm {B1}}}(\tau )=1-\frac{\pi ^2}{4} \tau -\frac{\pi ^{5/2}}{4} \zeta (\tfrac{1}{2})\tau ^{3/2}-\frac{1}{32} \left( {6} \pi ^3 \zeta \left( \tfrac{1}{2}\right) ^2-4\pi ^4\right) \tau ^2+ \cdots \end{aligned}$$
(37)

Fugacity—high-temperature series

$$\begin{aligned} \begin{aligned} z_{{\mathrm {B1}}}(\tau )&= \frac{2}{\sqrt{\pi } }\frac{1}{\tau ^{1/2}} -\frac{2 \sqrt{2}}{\pi }\frac{1}{\tau } +\frac{8 \left( 3-\sqrt{3}\right) }{3 \pi ^{3/2} }\frac{1}{\tau ^{3/2}}\\&\quad -\frac{4 \left( 15 \sqrt{2} -10 \sqrt{6} +6 \right) }{3 \pi ^2 }\frac{1}{\tau ^2}+\cdots . \end{aligned} \end{aligned}$$
(38)

The first term is the Maxwell fugacity.

4.4 Maxwellons in 2d

In Eqs. (21) and (18) we put \(d=2\) giving

$$\begin{aligned} \mu _{{\mathrm {M2}}}^*(\tau )&=-\tau \ln (\tau ), \end{aligned}$$
(39)
$$\begin{aligned} z_{{\mathrm {M2}}}(\tau )&= \frac{1}{\tau }. \end{aligned}$$
(40)

4.5 Fermions in 2d

In Eqs. (22) and (19) we put \(d=2\) giving

$$\begin{aligned} \mu _{{\mathrm {F2}}}^*(\tau )&=\tau \ln \left\{ -{\text {Li}}_{1}^{-1} \left( -\frac{1}{\tau }\right) \right\} , \end{aligned}$$
(41)
$$\begin{aligned} z_{{\mathrm {F2}}}(\tau )&= -{\text {Li}}_{1}^{-1}\left( -\frac{1}{\tau }\right) . \end{aligned}$$
(42)

But since \({\text {Li}}_1(-z)=-\ln (1+z)\), it follows that in 2d explicit expressions may be obtained. Thus:

$$\begin{aligned} \mu _{{\mathrm {F2}}}^*(\tau )&=\tau \ln (e^{1/\tau }-1), \end{aligned}$$
(43)
$$\begin{aligned} z_{{\mathrm {F2}}}(\tau )&= e^{1/\tau }-1. \end{aligned}$$
(44)

Our Eq. (43) corresponds to Eq. (1) of Ebner and Fu.

Chemical potential—low-temperature series There is no series in ascending powers of \(\tau \), but the following series of exponentials follows from Eq. (43) at low temperatures.

$$\begin{aligned} \mu _{{\mathrm {F2}}}^*(\tau )=1-\tau \left\{ e^{-1/\tau }+\frac{1}{2}e^{-2/\tau }+\frac{1}{3}e^{-3/\tau } +\cdots \right\} . \end{aligned}$$
(45)

Chemical potential—high-temperature series

$$\begin{aligned} \mu _{{\mathrm {F2}}}^*(\tau )= -\tau \log \left( {\tau }\right) +\frac{1}{2} +\frac{1}{24 }\frac{1}{\tau } -\frac{1}{2880 }\frac{1}{\tau ^3}+\cdots , \end{aligned}$$
(46)

corresponding to Eq. (2) of Ebner and Fu. The first term of Eq. (46) is the Maxwell chemical potential.

The 2d Fermi chemical potential, together with low-T and high-T approximations, is shown in Fig. 3.

Fig. 3
figure 3

Fermi gas in 2d. E is the exact result Eq. (43), L is the low-temperature approximation: the first two terms of Eq. (45), M is the Maxwell expression Eq. (39), H is the high-temperature approximation: the first two terms of Eq. (46)

Fugacity—low temperatures. Since \(z_{{\mathrm {F2}}}(\tau )\) diverges as \(\tau \rightarrow 0\) there is no simple low-temperature power series. But in the spirit of Eq. (45) and writing \(z_{{\mathrm {F2}}}(\tau )\) as

$$\begin{aligned} z_{{\mathrm {F2}}}(\tau )=e^{1/\tau }\left( 1-e^{-1/\tau } \right) \end{aligned}$$
(47)

we may regard the two terms in the brackets as a terminating low-temperature expansion, with the divergent

$$\begin{aligned} z_{{\mathrm {F2}}}(\tau ) \sim e^{1/\tau } \end{aligned}$$
(48)

giving the limiting low-temperature behaviour.

Fugacity—high-temperature series

$$\begin{aligned} z_{{\mathrm {F2}}}(\tau ) = \frac{1}{\tau }+\frac{1}{2}\frac{1}{\tau ^2}+\frac{1}{6}\frac{1}{\tau ^3}+\frac{1}{24}\frac{1}{\tau ^4}+\frac{1}{120}\frac{1}{\tau ^5}+\cdots . \end{aligned}$$
(49)

The first term is the Maxwell fugacity.

4.6 Bosons in 2d

In Eqs. (23) and (20) we put \(d=2\) giving

$$\begin{aligned} \mu _{{{{\mathrm {B2}}}}}^*(\tau )&=\tau \ln \left\{ {\text {Li}}_{1}^{-1} \left( \frac{1}{\tau }\right) \right\} , \end{aligned}$$
(50)
$$\begin{aligned} z_{{\mathrm {B2}}}(\tau )&= {\text {Li}}_{1}^{-1}\left( \frac{1}{\tau }\right) . \end{aligned}$$
(51)

But since \({\text {Li}}_1(z)=-\ln (1-z)\), it follows that in 2d explicit expressions may be obtained. Thus:

$$\begin{aligned} \mu _{{\mathrm {B2}}}^*(\tau )&=\tau \ln (1-e^{-1/\tau }), \end{aligned}$$
(52)
$$\begin{aligned} z_{{\mathrm {B2}}}(\tau )&= 1- e^{-1/\tau }. \end{aligned}$$
(53)

In 2d we have the special results

$$\begin{aligned} \mu _{{{\mathrm {B2}}}}^*(\tau )&=\mu _{{\mathrm {F2}}}^*(\tau )-1 \end{aligned}$$
(54)
$$\begin{aligned} z_{{{\mathrm {B2}}}}(\tau )&= z_{{\mathrm {F2}}}(\tau )/(1+z_{{\mathrm {F2}}}(\tau )), \end{aligned}$$
(55)

manifestations of May’s theorem on Fermi–Bose correspondence in 2d [23]. We note that May’s theorem holds only in the thermodynamic limit; it breaks down for finite systems [24].

Chemical potential—low-temperature series There is no series in ascending powers of \(\tau \), but the following series of exponentials follows from Eq. (52) at low temperatures.

$$\begin{aligned} \mu _{{\mathrm {B2}}}^*(\tau )=-\tau \left\{ e^{-1/\tau }+\frac{1}{2}e^{-2/\tau }+\frac{1}{3}e^{-3/\tau }+\cdots \right\} . \end{aligned}$$
(56)

Chemical potential—high-temperature series

$$\begin{aligned} \mu _{{{{\mathrm {B2}}}}}^*(\tau )= -\tau \log \left( {\tau }\right) -\frac{1}{2} +\frac{1}{24 \tau } -\frac{1}{2880 \tau ^3}+\cdots . \end{aligned}$$
(57)

The first term is the Maxwell chemical potential.

The 2d Bose chemical potential, together with low-T and high-T approximations, is shown in Fig. 4.

Fig. 4
figure 4

Bose gas in 2d. E is the exact result Eq. (52), L is the low-temperature approximation: the first term of Eq. (56), M is the Maxwell expression Eq. (39), H is the high-temperature approximation: the first two terms of Eq. (57)

Fugacity—low temperatures There is no low-temperature series for the fugacity, but we may regard the expression for \(z_{{\mathrm {B2}}}(\tau )\), Eq. (53), as a terminating low-temperature expansion:

$$\begin{aligned} z_{{{\mathrm {B2}}}}(\tau )= 1- e^{-1/\tau }+{}\text {no higher terms}, \end{aligned}$$
(58)

with low-temperature limit \(z_{{\mathrm {B2}}}(0)=1\).

Fugacity—high-temperature series

$$\begin{aligned} z_{{{\mathrm {B2}}}}(\tau ) = \frac{1}{\tau }-\frac{1}{2}\frac{1}{\tau ^2}+\frac{1}{6}\frac{1}{\tau ^3}-\frac{1}{24}\frac{1}{\tau ^4}+\frac{1}{120}\frac{1}{\tau ^5}+\cdots . \end{aligned}$$
(59)

The first term is the Maxwell fugacity.

4.7 Maxwellons in 3d

In Eqs. (21) and (18) we put \(d=3\) giving

$$\begin{aligned} \mu ^*_{{\mathrm {M3}}}(\tau )&=\tau \ln \left( \frac{4 }{3 \sqrt{\pi }}\frac{1}{\tau ^{3/2}}\right) , \end{aligned}$$
(60)
$$\begin{aligned} z_{{\mathrm {M3}}}(\tau )&=\frac{4}{3\sqrt{\pi }}\frac{1}{\tau ^{3/2}}. \end{aligned}$$
(61)

4.8 Fermions in 3d

In Eqs. (22) and (19) we put \(d=3\) giving

$$\begin{aligned} \mu _{{{\mathrm {F3}}}}^*(\tau )&=\tau \ln \left\{ -{\text {Li}}_{3/2}^{-1}\left[ -\frac{4}{3\sqrt{\pi }}\tau ^{-3/2}\right] \right\} , \end{aligned}$$
(62)
$$\begin{aligned} z_{{{\mathrm {F3}}}}(\tau )&= -{\text {Li}}_{3/2}^{-1}\left[ -\frac{4}{3\sqrt{\pi }}\tau ^{-3/2}\right] . \end{aligned}$$
(63)

Chemical potential—low-temperature series

$$\begin{aligned} \mu ^*_{{{{\mathrm {F3}}}}}(\tau )=1-\frac{\pi ^2 }{12}\tau ^2 -\frac{\pi ^4 }{80}\tau ^4 -\frac{247 \pi ^6 }{25920}\tau ^6 -\frac{16291 \pi ^8 }{777600}\tau ^8+\cdots \end{aligned}$$
(64)

Chemical potential—high-temperature series

$$\begin{aligned} \begin{aligned} \mu ^*_{{\mathrm {F3}}}(\tau )&=\tau \ln \left( \frac{4 }{3 \sqrt{\pi }}\frac{1}{\tau ^{3/2}}\right) +\frac{1}{3} \sqrt{\frac{2}{\pi }} {\frac{1}{{\tau ^{1/2}}}}-\frac{16 \sqrt{3}-27}{81 \pi }\frac{1}{\tau ^2}+{}\\&\quad +\frac{4 \left( 15 \sqrt{2}-16 \sqrt{6}+18\right) }{243 \pi ^{3/2}}\frac{1}{\tau ^{7/2}}+\cdots . \end{aligned} \end{aligned}$$
(65)

This equation corresponds to that given by Ebner and Fu after their Eq. (3). But their equation has a typo. The first term of Eq. (65) is the Maxwell chemical potential.

The 3d Fermi chemical potential, together with low-T and high-T approximations, is shown in Fig. 5.

Fig. 5
figure 5

Fermi gas in 3d. E is the exact result Eq. (62), L is the low-temperature approximation: the first two terms of Eq. (64), M is the Maxwell expression Eq. (60), H is the high-temperature approximation: the first two terms of Eq. (65)

Fugacity—low-temperature series Since \(z_{{\mathrm {F3}}}\) diverges as \(\tau \rightarrow 0\) there is no simple low-temperature power series. But the low-temperature behaviour can be expressed as

$$\begin{aligned} z_{{{{\mathrm {F3}}}}}(\tau )=e^{1/\tau }\left\{ 1-\frac{\pi ^2 }{12}\tau +\frac{\pi ^4}{288}\tau ^2- \frac{1}{3} \left( \frac{3\pi ^4}{80} +\frac{\pi ^6}{3456}\right) \tau ^3+\cdots \right\} \end{aligned}$$
(66)

with the limiting low-temperature behaviour

$$\begin{aligned} z_{{{{\mathrm {F3}}}}}(\tau )\sim e^{1/\tau }. \end{aligned}$$
(67)

Fugacity—high-temperature series

$$\begin{aligned} \begin{aligned} z_{{{{\mathrm {F3}}}}}(\tau )&=\frac{4 }{3 \sqrt{\pi } }\frac{1}{\tau ^{3/2}}+\frac{4 \sqrt{2}}{9 \pi }\frac{1}{\tau ^3}+\frac{16 \left( 9-4 \sqrt{3}\right) }{243 \pi ^{3/2} }\frac{1}{\tau ^{9/2}}+{}\\&\quad +\frac{8 \left( 45 \sqrt{2}-40 \sqrt{6}+36\right) }{729 \pi ^2 t^6}\frac{1}{\tau ^6}+\cdots . \end{aligned} \end{aligned}$$
(68)

The first term is the Maxwell fugacity.

4.9 Bosons in 3d

In three dimensions bosons can undergo Bose–Einstein condensation. When this happens the chemical potential will be zero and the fugacity will be unity. We denote the reduced Bose temperature by \(\tau _{{{{\mathrm {B}}}}}\).

In Eqs. (23) and (20) we put \(d=3\) to give \(\mu ^*\) and z when \(\tau >\tau _{{{{\mathrm {B}}}}}\). Then the reduced chemical potential and the fugacity are given by

$$\begin{aligned} \mu _{{\mathrm {B3}}}^*(\tau )= & {} 0 \qquad \qquad \qquad \qquad \qquad \qquad \tau <\tau _{{{{\mathrm {B}}}}}\nonumber \\= & {} \tau \ln \left\{ {\text {Li}}_{3/2}^{-1}\left[ \frac{4}{3\sqrt{\pi }}\tau ^{-3/2}\right] \right\} \qquad \qquad \tau >\tau _{{{{\mathrm {B}}}}} \end{aligned}$$
(69)
$$\begin{aligned} z_{{\mathrm {B3}}}(\tau )= & {} 1 \qquad \qquad \qquad \qquad \qquad \qquad \tau <\tau _{{{{\mathrm {B}}}}} \nonumber \\= & {} {\text {Li}}_{3/2}^{-1}\left[ \frac{4}{3\sqrt{\pi }}\tau ^{-3/2}\right] \qquad \quad \qquad \qquad \, \tau >\tau _{{{{\mathrm {B}}}}}. \end{aligned}$$
(70)

The Bose temperature \(\tau _{{{{\mathrm {B}}}}}\) is the zero of \(\mu ^*(\tau )\) of Eq. (69), that is,

$$\begin{aligned} \tau _{{{{\mathrm {B}}}}} = \left( \frac{3\sqrt{\pi }}{4}\zeta (\tfrac{3}{2}) \right) ^{-2/3} \approx 0.436\dots . \end{aligned}$$
(71)

Chemical potential—low-temperature series

$$\begin{aligned} \mu _{{\mathrm {B3}}}^*(\tau )&= 0&\tau <\tau _{{{{\mathrm {B}}}}}\nonumber \\&= -\frac{9 \zeta \left( \frac{3}{2}\right) ^2 }{16 \pi }\frac{(\tau -\tau _{{{{\mathrm {B}}}}})^2}{\tau _{{{{\mathrm {B}}}}}}+{}\nonumber \\&\qquad {}+\frac{27 \zeta \left( \frac{3}{2}\right) ^2 \left( \zeta \left( \frac{1}{2}\right) \zeta \left( \frac{3}{2}\right) +2 \pi \right) }{64 \pi ^2}\frac{(\tau -\tau _{{{{\mathrm {B}}}}})^3}{\tau _{{{{\mathrm {B}}}}}^2}+{}\cdots&\tau >\tau _{{{{\mathrm {B}}}}}. \end{aligned}$$
(72)

An expression equivalent to the first term of the series is given by London [11]; the author thanks Bill Mullin for drawing his attention to this.

Chemical potential—high-temperature series

$$\begin{aligned} \begin{aligned} \mu ^*_{{\mathrm {B3}}}(\tau )&=\tau \ln \left( \frac{4 }{3 \sqrt{\pi }}\frac{1}{\tau ^{3/2}}\right) -\frac{1}{3} \sqrt{\frac{2}{\pi }} {\frac{1}{{\tau ^{1/2}}}}-\frac{16 \sqrt{3}-27}{81 \pi }\frac{1}{\tau ^2}\\ {}&-\frac{4 \left( 15 \sqrt{2}-16 \sqrt{6}+18\right) }{243 \pi ^{3/2}}\frac{1}{\tau ^{7/2}}+{}\cdots . \end{aligned} \end{aligned}$$
(73)

The first term is the Maxwell chemical potential.

The 3d Bose chemical potential, together with low-T and high-T approximations, is shown in Fig. 6.

Fig. 6
figure 6

Bose gas in 3d. E is the exact result Eq. (69), L is the low-temperature approximation: the first term of Eq. (72), M is the Maxwell expression Eq. (60), H is the high-temperature approximation: the first two terms of Eq. (73)

Fugacity—low-temperature series

$$\begin{aligned} z_{{\mathrm {B3}}}(\tau )&= 1&\tau<\tau _{{{{\mathrm {B}}}}}\nonumber \\&=1-\frac{9 \zeta \left( \frac{3}{2}\right) ^2 }{16\pi } \left( \frac{\tau -\tau _{{{{\mathrm {B}}}}}}{\tau _{{{{\mathrm {B}}}}}}\right) ^2+{}\nonumber \\&\quad +\frac{9 \zeta \left( \frac{3}{2}\right) ^2 \left( 3 \zeta \left( \frac{1}{2}\right) \zeta \left( \frac{3}{2}\right) +10 \pi \right) }{64 \pi ^2 }\left( \frac{\tau -\tau _{{{{\mathrm {B}}}}}}{\tau _{{{{\mathrm {B}}}}}}\right) ^3+{}\cdots&\tau <\tau _{{{{\mathrm {B}}}}} \end{aligned}$$
(74)

Fugacity—high-temperature series

$$\begin{aligned} \begin{aligned} z_{{\mathrm {B3}}}(\tau )&=\frac{4 }{3 \sqrt{\pi } }\frac{1}{\tau ^{3/2}}-\frac{4 \sqrt{2} }{9 \pi }\frac{1}{\tau ^3}+\frac{16 \left( 9-4 \sqrt{3}\right) }{243 \pi ^{3/2} }\frac{1}{\tau ^{9/2}}\\&\quad -\frac{8 \left( 45 \sqrt{2}-40 \sqrt{6}+36\right) }{729 \pi ^2 t^6}\frac{1}{\tau ^6}+\cdots . \end{aligned} \end{aligned}$$
(75)

The first term is the Maxwell fugacity.

5 Chemical Potential Plots in 1, 2 and 3d

We now use the Mathematica functions to create plots of the chemical potential in one-, two- and three dimensions. These will contrast the differences and similarities of the Fermi, Bose and Maxwell cases.

Fig. 7
figure 7

Chemical potential in three dimensions—Fermi, Bose and Maxwell cases

5.1 Three Dimensions

The temperature dependence of the 3d chemical potential is shown in Fig. 7. At high temperatures the Fermi and Bose chemical potentials tend towards the classical Maxwell behaviour, Eq. (91/92),

$$\begin{aligned} \begin{aligned} \mu ^*(\tau )&=\tau \ln \left( \frac{4 }{3 \sqrt{\pi }}\frac{1}{\tau ^{3/2}}\right) +a\frac{1}{3} \sqrt{\frac{2}{\pi }} {\frac{1}{{\tau ^{1/2}}}}+\cdots \\&=\mu ^*_{{\mathrm {M}}}(\tau ) +a\frac{1}{3} \sqrt{\frac{2}{\pi }} {\frac{1}{{\tau ^{1/2}}}}+\cdots \end{aligned} \end{aligned}$$
(76)

becoming equal as \(\tau \rightarrow \infty \). (Recall \(a=+1\) for fermions, \(-1\) for bosons and 0 for maxwellons.)

At low temperatures the fermion \(\mu ^*(\tau )\rightarrow 1\) as \(\tau \rightarrow 0\) (\(\mu (T)\rightarrow \varepsilon _{{\mathrm {F}}}\) as \(T\rightarrow 0\)).

Upon cooling, bosons in 3d undergo BEC at the Bose temperature \(\tau _{{{{\mathrm {B}}}}}\) where the chemical potential goes to zero. Just above the Bose temperature \(\mu ^*(\tau )\) increases quadratically in \((\tau -\tau _{{{{\mathrm {B}}}}})\), while below the Bose temperature \(\mu ^*(\tau )\) is identically zero. There is a discontinuity in the second derivative of \(\mu ^*(\tau )\) at \(\tau =\tau _{{{{\mathrm {B}}}}}\). We shall in the following sections see that there is no BEC for \(d<3\); this is an example of the Mermin–Wagner theorem [25]. Then there is macroscopic occupation only at \(T=0\).

The maxwellon chemical potential increases from zero as the temperature increases from zero, with a nonzero slope; this is a violation of the third law of thermodynamics, which requires \(\partial \mu /\partial T\rightarrow 0\) as \(T\rightarrow 0\).

5.2 Two Dimensions

The temperature dependence of the 2d chemical potential is shown in Fig. 8.

Fig. 8
figure 8

Chemical potential in two dimensions—Fermi, Bose and Maxwell cases

At high temperatures the Fermi and Bose chemical potentials, Eq. (91/92), tend towards the classical Maxwell behaviour

$$\begin{aligned} \begin{aligned} \mu ^*(\tau )&= -\tau \log \left( {\tau }\right) +a\frac{1}{2} +\cdots \\&=\mu _{{\mathrm {M}}}^*(\tau )+a\frac{1}{2} +\cdots , \end{aligned} \end{aligned}$$
(77)

but they never actually get there. In 2d we have the May’s theorem result

$$\begin{aligned} \mu _{{{{\mathrm {B2}}}}}^*(\tau )=\mu _{{\mathrm {F2}}}^*(\tau )-1, \end{aligned}$$
(78)

and at high temperatures, the Maxwell \(\mu \) is midway between those of the Fermi and the Bose cases. In other words, in the high-temperature limit the Fermi chemical potential is \(\varepsilon _{{\mathrm {q}}}/2\) higher than the Maxwell value and the Bose chemical potential is \(\varepsilon _{{\mathrm {q}}}/2\) below.

At low temperatures the Bose chemical potential goes to zero. There is no BEC, so \(\mu \) is zero only at zero temperature. But the low-temperature \(\mu \) is “very flat” (see Fig. 8 right plot); it is as if the 2d bosons are “trying to” condense. We shall see in Sect. 5.3 that there is certainly no BEC in 1d. But here, in 2d, we might say that BEC is “marginal”.

The low-temperature Fermi chemical potential is similar to the Bose case, just shifted up by \(\varepsilon _{{\mathrm {q}}}\).

The Maxwell chemical potential increases from zero as the temperature increases from zero with nonzero slope, in violation of the third law of thermodynamics.

Fig. 9
figure 9

Chemical potential in one dimension—Fermi, Bose and Maxwell cases

5.3 One Dimension

The temperature dependence of the 1d chemical potential is shown in Fig. 9.

At high temperatures the Fermi and Bose chemical potentials, Eq. (91/92), are going in the same direction as the Maxwell case: the Fermi above and the Bose below

$$\begin{aligned} \begin{aligned} \mu ^*(\tau )&= \tau \log \left( \frac{2}{\sqrt{\pi } }\tau ^{-1/2}\right) +a \sqrt{\frac{2}{\pi }}{\tau }^{1/2} +\cdots \\&=\mu ^*_{{\mathrm {M}}}(\tau ) +a \sqrt{\frac{2}{\pi }}{\tau }^{1/2} +\cdots , \end{aligned} \end{aligned}$$
(79)

but as the temperature increases the Fermi and Bose curves move further away from the Maxwell. The fractional deviation \((\mu _{{\mathrm {F,B}}}^*(\tau )-\mu _{{\mathrm {M}}}^*(\tau ))/\mu _{{\mathrm {M}}}^*(\tau )\) does go to zero as \(\tau \rightarrow \infty \).

The low-temperature Bose chemical potential goes to zero as \(\tau ^2\). There is not even a hint of BEC; the macroscopic occupation of the ground state occurs only at \(T=0\).

The low-temperature Fermi chemical potential has an interesting form. As the temperature increases from zero \(\mu \) increases a little before turning over and decreasing. This is not a violation of the third law since \(\partial \mu /\partial T \rightarrow 0\) as \(T\rightarrow 0\).

The Maxwell chemical potential increases from zero with nonzero slope as the temperature increases from zero, in violation of the third law of thermodynamics.