1 Introduction

The properties of Casimir forces attracted broad attention in recent years. Various systems enclosed by walls of varied geometries have been studied both experimentally and theoretically [1,2,3,4,5,6,7]. In particular, the critical region turned out to be of special interest because there the Casimir forces are expected to gain, for large wall separations, a universal form.

A special role among systems investigated theoretically is played by the ideal Bose gas enclosed between two infinite parallel walls. On the one hand the bulk system displays the Bose–Einstein condensation while on the other hand various boundary conditions, usually taken to be Dirichlet (D), periodic (P), or Neumann (N) type, can be straightforwardly incorporated into the analysis. The energy spectrum of the gas enclosed in a \(L_{1} \times L_{2} \times L_{3}\) box is composed of one-particle energy levels \(\epsilon _{\mathbf{k}} = \hslash ^2 \mathbf{k}^2/2m\) with the boundary-conditions dependent wave vector \(\mathbf{k}= (k_{1}, k_{2}, k_{3})\). In contradistinction to the periodic or Neumann boundary conditions for which the ground state energies vanish, \(\epsilon _{G}^{P}=\epsilon _{G}^{N}=0\), the Dirichlet boundary conditions imply the spectrum \(k_{i} = \pi n_i/L_{i}\), with \( n_i=1,2, ...\) , \(i=1,2,3\), so that the ground state energy \(\epsilon _{G}^{D} = \pi ^2\,\hbar ^2/2m( L_{1}^{-2} + L_{2}^{-2} + L_{3}^{-2} ) \) is strictly positive, depends on system size and vanishes only in the thermodynamic limit. This important aspect of the energy spectrum has to be properly taken into account when discussing the Bose–Einstein condensation in the grand canonical ensemble parametrized by temperature T, chemical potential \(\mu \), and volume \(V=L_{1}L_{2}L_{3}\).

The macroscopic occupation of the ground state takes place in the thermodynamic limit only when \(T < T_{c}\) and \(\mu = 0 \). Here \(T_{c}\) denotes the critical temperature defined by \(\rho \lambda _{c}^3 = \zeta (3/2)\), where \(\rho = \lim \limits _{\infty } <N>/V\) is the density of the gas evaluated in the thermodynamic limit, \(\lambda _{c}\) denotes the thermal de Broglie wavelength \(\lambda =h/\sqrt{2\pi m k_{B} T}\) evaluated at \(T=T_{c}\), and \(\zeta \) denotes the Riemann zeta function. The condensate density \(\rho _{0}(T) = \lim \limits _{\infty }<n_G>/V\) is non-zero for \(T < T_{c}\) and \(\mu =0\).

The crucial element of theoretical analysis of Bose–Einstein condensation consists in choosing the correct path along which the thermodynamic state of infinite system with \(\rho _0>0\) is approached [8,9,10]. Along this path, taken at constant temperature \(T < T_{c}\), the chemical potential \(\mu \rightarrow \epsilon _{G}\) and volume \(V \rightarrow \infty \) vary simultaneously in such a way that the equality

$$\begin{aligned} \frac{<n_{G}>}{V} = \frac{1}{V}\, \left[ \exp \left( \frac{\epsilon _{G}-\mu }{k_{B}T} \right) -1\right] ^{-1} = \rho _{0} \end{aligned}$$
(1)

holds. The choice of \(\mu (T,V)\) is constrained by the requirement that in the thermodynamic limit a particular thermodynamic state \((T,\mu =0)\) with a condensate is attained. The constraint specified in Eq.(1) forms an immanent part of analysis leading to the bulk Bose–Einstein condensation. We note that there is an essential difference in the explicit form of the above formula for Neumann and periodic boundary conditions on one hand, and the Dirichlet boundary conditions on the other hand. This constraint should be consistently applied to the evaluation of both bulk and surface quantities as they follow from the same total grand canonical free energy of the system. In particular, it should be followed when determining the Casimir forces. In the case of Dirichlet boundary conditions this implies that \(\mu \) tends to zero when \(V \rightarrow \infty \) according to the formula [8,9,10]

$$\begin{aligned} \mu =\mu ^{D}(T,V)=\epsilon _{G}^{D} - k_{B}T \ln \left( 1+\frac{1}{V \rho _{0}}\right) . \end{aligned}$$
(2)

The excellent review [9] contains a particularly clear discussion of this point. If, however, one chooses a different procedure in which one sets in Eq. (1) \(\mu =0\) first, and only then takes the thermodynamic limit, one is led to the erroneous conclusion about non-existence of Bose–Einstein condensation for Dirichlet boundary conditions [11]. This issue has then been thoroughly analyzed, see [10, 12].

2 Casimir Forces

In this Section we consider the ideal Bose gas enclosed in a \(L \times L \times D\) slab with walls represented by Dirichlet boundary conditions. We study the grand canonical free energy \(\varOmega (T,\mu ,L,D)\) with the purpose of calculating Casimir forces at approach to Bose–Einstein condensation. The relevant quantity is then the surface free energy per unit area obtained by subtracting from \(\varOmega (T,\mu ,L,D)\) the bulk term \( - L^2D\, p(T,0)\), where p(T, 0) denotes the ideal Bose gas pressure at \(\mu = 0\) and is given by the well known formula \(p(T,0) = k_{B}T \zeta (5/2)/\lambda ^3 \) [8, 9]

$$\begin{aligned} \varPhi _{s}(T,\mu ,D) = \varPhi (T,\mu ,D) + D p(T,0) , \end{aligned}$$
(3)

where

$$\begin{aligned} \varPhi (T,\mu ,D) = \lim \limits _{L \rightarrow \infty } \frac{\varOmega (T,\mu ,L,D)}{L^2} \end{aligned}$$
(4)

is the grand canonical free energy per unit wall area. By definition, the Casimir force \({F}_{C}(T,\mu ,D)\) acting between the walls separated by distance D measures the rate of change with distance D of the surface free energy per unit area \(\varPhi _{s}(T,\mu ,D)\) at fixed values of temperature and chemical potential. It is evaluated according to the formula

$$\begin{aligned} {F}_{C}(T,\mu ,D) = -\frac{\partial \varPhi _{s}(T,\mu ,D)}{\partial D} = - \frac{\partial \varPhi (T,\mu ,D) }{\partial D} - p(T,0) . \end{aligned}$$
(5)

The quantity \(\varPhi (T,\mu ,D)\) has the following form

$$\begin{aligned} \varPhi (T,\mu ,D) = \frac{k_BT}{\lambda ^2} \int \limits _{0}^{\infty } dw \sum \limits _{n=1}^{\infty } \ln \left\{ 1-\exp [-w- s^2\,n^2 + \beta \mu )] \right\} \,, \end{aligned}$$
(6)

where \(s = \sqrt{\pi }\lambda /2D\) and thus \( \beta \epsilon _{G}^{D} \rightarrow s^2\) for \(L/\lambda \rightarrow \infty \). In this limit the total number density \(\rho \) in the slab is given by

$$\begin{aligned} \rho= & {} \lim _{L\rightarrow \infty } \frac{<N>}{L^2D} = \frac{1}{D \lambda ^2}\int _0^{\infty } \, dw \sum _{n=1}^{\infty } \frac{1}{\exp \left[ w + n^2 s^2 - \beta \mu \right] - 1} \, = \nonumber \\&\quad - \frac{1}{D \lambda ^2} \sum _{n=1}^{\infty } \log \left( 1- \exp ( - n^2 s^2 + \beta \mu )\right) . \end{aligned}$$
(7)

We note that the above expression, in particular the term corresponding to \(n=1\), diverges for \(\beta \mu = s^2\) and thus signals the possibility of macroscopic occupation of the ground state. This divergence is a trace of the Bose–Einstein condensation taking place in the bulk system in thermodynamic limit. In our analysis the infinite volume limit is taken in two steps. First, we take the \(L/\lambda \rightarrow \infty \) limit and evaluate both the free energy per unit area and the number density in this limit. Then we consider the large wall separation \(D/\lambda \gg 1\) . The above mentioned divergence permits to obtain a finite contribution \( \overline{\rho }_{0}\) to the density \(\rho \) from the \(n=1\) state. The chemical potential must then approach the value \(s^2\) along the path

$$\begin{aligned} \beta \overline{\mu }^{D}(T,D) = s^2 + \ln \left( 1-e^{-D \lambda ^2 \overline{\rho }_{0}}\right) \quad . \end{aligned}$$
(8)

One can check (see Eqs. (21), (27), (28) in the Appendix) that for \(D \gg \lambda \) (\(s \ll 1\)) one has

$$\begin{aligned} \rho = \overline{\rho }_{0} + \frac{1}{\lambda ^3} \left[ \zeta (3/2) + 3 \frac{\lambda }{D} \ln \left( \frac{\lambda }{D}\right) + \frac{\lambda }{D} \ln \left( \frac{\sqrt{\pi }}{8}\right) +o\left( \frac{\lambda }{D}\right) \right] . \end{aligned}$$
(9)

In the limit \(D=\infty \) one recovers the well known formula \(\rho = \rho _{0} + \rho _{c}\) with the critical density \(\rho _{c} = \zeta (3/2)/\lambda ^3 \), which holds for \(\mu =0\).

We also note that while in the case of bulk three-dimensional ideal Bose gas one observes the nonequivalence of canonical and grand canonical ensembles when condensate is present, see e.g. [9], there is no such problem in the presently considered case of slabs for which \(D<\infty \), and thus there is as yet no conventional Bose–Einstein condensation. Indeed, the ground state contribution \({\overline{\rho }}_{0}\) represents the density of condensate only after the limit \(D \rightarrow \infty \) has been taken.

Our purpose is to evaluate the Casimir force along the path defined in Eq. (8), i.e., \(F(T,D) = {F}_{C}(T,\overline{\mu }^D(T,D),D)\) and to determine its large D behavior. The large D behavior of F(TD) is then compared with that of the Casimir force evaluated at \(\mu =0\), i.e., \(F_{0}(T,D) = F_{C}(T,0,D)\). The latter procedure corresponds to setting \(\mu =0\) first, and only then analyzing the large D behavior of Casimir force. As stressed before, this order of evaluating bulk properties leads in the case of Dirichlet boundary conditions to misleading results. In particular, if in Eq. (7) the term corresponding to \(n=1\) is, instead at \(\mu ={\overline{\mu }}^{D}(T,D)\), evaluated at \(\mu =0\) then, instead of \({\overline{\rho }}_{0}\), one obtains \( - \frac{1}{D \lambda ^2} \ln \left( \frac{\lambda }{D}\right) + O\left( \frac{\lambda }{D}\right) \). This contribution vanishes for \(\lambda /D \rightarrow 0\) and the state with the condensate is thus not approached [11].

It follows directly from Eqs. (5) and (6) that the Casimir force F(TD) can be written as

$$\begin{aligned} F(T,D)= & {} \frac{\pi }{2} k_{B}T \left( \frac{\lambda }{D}\right) ^2 \overline{\rho }_{0} \, + \nonumber \\&- \frac{\pi k_{B}T}{2 D^3} \sum \limits _{n=2}^{\infty } n^2\,\ln \left[ 1- e^{-s^2(n^2-1)}\right] - p(T,0) + O\left( e^{-D\lambda ^2 {\overline{\rho }}_{0}}\right) \end{aligned}$$
(10)

which highlights the contribution from \(\overline{\rho }_{0}\) (which is not present in the case of periodic or Neumann boundary conditions). In order to determine the leading contributions to the second term on the rhs for \(D \gg \lambda \) (\(s \ll 1\)) we performed an asymptotic analysis. For reasons of clarity we present the final result first, and only then sketch the essential steps of calculations in the Appendix.

Our final result is

$$\begin{aligned} F(T,D)= & {} \frac{\pi k_{B}T}{2} \left( \frac{\lambda }{D}\right) ^2 \overline{\rho }_{0} \, + \, \frac{\pi k_{B}T}{4 \lambda ^3} \left[ \zeta (3/2) \left( \frac{\lambda }{D}\right) ^2 +\right. \nonumber \\&\left. +\, 4 \left( \frac{\lambda }{D}\right) ^3\ln \left( \frac{\lambda }{D}\right) \, - \left( \frac{\lambda }{D}\right) ^3 \left[ \frac{\zeta (3)}{\pi ^2} + 4 \ln 2 \right] + o\left( \frac{\lambda }{D}\right) ^3 \right] . \end{aligned}$$
(11)

This result should be compared with the asymptotic behavior of \(F_{0}(T,D)\) as discussed e.g., in [13] . For \(D\gg \lambda \) one finds

$$\begin{aligned} F_{0}(T,D) = - \frac{k_{B}T \zeta (3)}{4\pi } \frac{1}{D^3} + o\left( \left( \frac{\lambda }{D}\right) ^3\right) . \end{aligned}$$
(12)

We note the essential difference in the large D behavior of F(TD) and \(F_{0}(T,D)\). The leading term in F(TD) is proportional to \(1/D^2\) with a positive coefficient. Thus the dominant contribution to F(TD) for large distances D represents a repulsive force. This term is followed by \(\ln (D/\lambda )/D^3\) term with a negative coefficient. Finally, the last of the three contributions to the Casimir force exposed in Eq. (11) is proportional to \(1/D^3\) with a negative coefficient. On the contrary, the leading contribution to \(F_{0}(T,D)\) decays like \(1/D^3\) with a negative coefficient which, however, is different from the \(1/D^3\) coefficient in F(TD). Moreover, while the coefficient in front of the dominant term in \(F_{0}(T,D)/k_{B}T\) is universal (\(-\zeta (3)/4\pi \)), the dominant term in \(F(T,D)/k_{B}T\) is not universal and depends on temperature. The non-universality of the \(1/D^2\) term is clear for dimensional reasons. The above discussed nonequivalence shows that the rough thermodynamic classification of states into those with \(\mu <0\) and those with \(\mu =0\) turns out to be insufficient for the calculation of the Casimir forces for Dirichlet b.c. [14]. This issue could be also approached from the perspective of the generalized Bose–Einstein condensation taking place in various geometries [15, 16].

The expression for the Casimir force F(TD) can be rewritten using the total density \(\rho \) instead of \(\overline{\rho }_{0}\), see Eq. (9). Then it takes the following form

$$\begin{aligned} F(T,D)= & {} \frac{\pi k_{B}T}{2} \left( \frac{\lambda }{D}\right) ^2 \rho \, - \, \frac{\pi k_{B}T}{4 \lambda ^3} \left[ \zeta (3/2) \left( \frac{\lambda }{D}\right) ^2 +\right. \nonumber \\&\left. + \left( \frac{\lambda }{D}\right) ^3\ln \left( \left( \frac{\sqrt{\pi }\lambda }{2D}\right) ^2\right) \, + \left( \frac{\lambda }{D}\right) ^3 \frac{\zeta (3)}{\pi ^2} + o\left( \frac{\lambda }{D}\right) ^3 \right] \quad . \end{aligned}$$
(13)

We observe that in Eq. (13) there appears a contribution to the Casimir force F(TD) of the order \(1/D^3\) which coincides with the leading contribution to \(F_{0}(T,D)\). We also note that the second term on the rhs of Eq. (13) corresponds to the total derivative of \(\varPhi (T,\overline{\mu }^D(T,D),D)\) with respect to D

$$\begin{aligned} F_{tot}(T,D) = - \frac{d \varPhi (T,{\overline{\mu }}^D(T,D),D)}{d D} - p(T,0) . \end{aligned}$$
(14)

Thus

$$\begin{aligned} F(T,D) = \frac{\pi k_{B}T}{2} \left( \frac{\lambda }{D}\right) ^2 \rho + F_{tot}(T,D) , \end{aligned}$$
(15)

where the first term on the rhs of Eq. (15) corresponds (up to dominant terms) to \(\left. \frac{\partial \varPhi (T,\mu ,D)}{\partial \mu }\right| _{\mu ={\overline{\mu }}^D} \frac{\partial \overline{\mu }^D(T,D)}{\partial D}\). It is interesting to note the important qualitative difference between the Casimir force F as discussed here and the total force \(F_{tot}\), Eq. (14). Whereas the dominant term in F represents repulsive force and depends on the density \({\overline{\rho }}_{0}\), the dominant term in \(F_{tot}\) is attractive, and does not depend on \({\overline{\rho }}_{0}\).