1 Introduction

The Klein–Gordon (KG) equation has been investigated by various methods due to its application in different fields. The case of a scalar field has an increasing interest because of its connections with the axion, a hypothesized particle that may have a relevant role in Astrophysics and in studies of Dark-Matter [1,2,3,4].

In Astrophysics, the investigation of a possible bosonic phase in massive stars has triggered the study of the solutions of the relativistic equation with an external potential. The possibility of a condensate regime inside the stars has been considered. Several methods have been used to solve the equation for different potentials [5, 6]. In the case of self-interacting particles, the problem becomes particularly difficult, and in Ref. [7], the authors claim that it is not possible to find a solution for this case. Nevertheless, they investigated the axion star and the possibility of the formation of a condensate.

Systems formed by interacting bosons are also of interest in High-Energy Physics and in Hadron Physics, where the possibility of a gluonic field in the condensate regime has been considered [8,9,10]. With the advent of colliders such as the EIC, FAIR and NICA, with the capability to investigate the hadron structure in detail, we can expect important advances in our understanding of the complex hadronic structure. The effects of the interaction of the components of the system with an external potential have been extensively studied in connection with the Bose–Einstein condensate [11, 12]. The interaction can favor or disfavor the formation of the condensate. The correlations and interactions among the particles do not prevent the formation of the condensate [13] and can lead to non-extensive forms of the condensate described in terms of the Tsallis statistics [14, 15]. The characteristics of the non-extensive condensate have been described in Ref. [16, 17].

In this work, we investigate the solutions of the KG equation for a system of bosons under the influence of an external potential, in particular for the Coulombic potential and for the harmonic potential, and then, we include the self-interaction through a mean-field approach. We investigate the ground-state solution and obtain the chemical potential for the case of the external harmonic potential, and with the self-interaction regulated by the scattering length. We use the Feshbach–Villars formalism, which allows us to evaluate the transition from the relativistic to the non-relativistic regimes. This is particularly useful in the case of self-interacting particles in a harmonic potential, for which the Schrödinger equation is known [18, 19]. We show that our results with the KG equation smoothly approach those for the Schrödinger equation as the systems become non-relativistic.

2 The Feshbach–Villars formalism

The KG equation for free particles is

$$\begin{aligned} \left[ \frac{1}{c^2} \frac{\partial }{\partial t^2} - \mathbf {\nabla }^2 + \frac{m^2 c^2}{\hbar ^2} \right] \psi (t,\mathbf {r}) = 0\,. \end{aligned}$$

This equation can be written in a convenient form by using the Feshbach–Villars formalism [20] (see also Ref. [21]). In this case, we define the spinor

$$\begin{aligned} \Psi (t,\mathbf {r}) = \left( \begin{array}{c} \varphi (t,\mathbf {r}) \\ \chi (t,\mathbf {r}) \end{array} \right) \,, \end{aligned}$$

where \(\varphi (t,\mathbf {r})\) and \(\chi (t,\mathbf {r})\) are wave-functions related to \(\psi (t,\mathbf {r})\) by

$$\begin{aligned} {\left\{ \begin{array}{ll} \psi (t,\mathbf {r}) &{}= \quad \varphi (t,\mathbf {r}) + \chi (t,\mathbf {r}) \\ i \hbar \frac{\partial \psi (t,\mathbf {r})}{dt} &{}= \quad mc^2 \left( \varphi (t,\mathbf {r}) - \chi (t,\mathbf {r}) \right) \end{array}\right. } \,. \end{aligned}$$

In the Feshbach–Villars formalism, the KG equation is written for the spinor as a Schrödinger-like equation, i.e.,

$$\begin{aligned} i\hbar \frac{\partial }{\partial t} \Psi (t,\mathbf {r}) = H \Psi (t,\mathbf {r}) \,, \end{aligned}$$


$$\begin{aligned} H = (\sigma _3 + i \sigma _2) \frac{\hat{\mathbf {p}}^2}{2m} + m c^2 \sigma _3 \,. \end{aligned}$$

In the equation above \(\sigma _i \; (i=1,2,3)\) are the Pauli matrices, and \(\hat{\mathbf {p}} = -i \hbar \mathbf {\nabla }\). The conserved charge and current are given by

$$\begin{aligned} {\left\{ \begin{array}{ll} \rho = \Psi ^\dagger \sigma _3 \Psi \\ \mathbf {J} = \frac{\hbar }{i2m} \left[ \Psi ^\dagger \sigma _3 (\sigma _3 + i \sigma _2) \mathbf {\nabla } \Psi - (\mathbf {\nabla } \Psi ^\dagger ) \sigma _3 (\sigma _3 + i \sigma _2) \Psi \right] \end{array}\right. } \,, \end{aligned}$$

respectively. The spinor representation is equivalent to the coupled differential equations

$$\begin{aligned} {\left\{ \begin{array}{ll} i\hbar \frac{\partial \varphi }{\partial t} = \frac{\hat{\mathbf {p}}^2}{2m}(\varphi + \chi ) + m c^2 \varphi \\ i\hbar \frac{\partial \chi }{\partial t} = -\frac{\hat{\mathbf {p}}^2}{2m}(\varphi + \chi ) - m c^2 \chi \end{array}\right. } \,. \end{aligned}$$

The Feshbach–Villars formalism becomes especially convenient to study the non-relativistic regime, in which the relativistic wave equation reduces to the solution of the Schrödinger equation. We will study below some solutions of the KG equation for different potentials.

The time independent form of the KG equation is

$$\begin{aligned} H \Psi (\mathbf {r}) = E \Psi (\mathbf {r}) \,, \end{aligned}$$

and the corresponding solution of the time-dependent equation, Eq. (4), is

$$\begin{aligned} \Psi (t,\mathbf {r}) = e^{-iEt/\hbar } \Psi (\mathbf {r}) \,. \end{aligned}$$

3 Introduction of the chemical potential

In the present work, we are interested in the investigation of the Bose–Einstein condensate formed in a relativistic system. We include the chemical potential, by assuming that the ground-state energy coincides with the chemical potential. The stationary-state solution is

$$\begin{aligned} \Psi ^{\pm }(t,\mathbf {r}) = e^{\mp i\mu t/\hbar } \Psi (\mathbf {r}) \,, \end{aligned}$$

where ± corresponds to the positive(negative) chemical potential solution. Then, the original KG equation, Eq. (1), leads to a time independent KG equation which writes

$$\begin{aligned} \left[ - \hbar ^2 c^2 \mathbf {\nabla }^2 + m^2 c^4 - \mu ^2 \right] \psi ({\mathbf {r}}) = 0 \,, \end{aligned}$$

whose solution in the spinor representation is

$$\begin{aligned} \Psi _{\mathbf {p}}^\pm (t,\mathbf {r}) = e^{ \mp i \mu t/\hbar } \Psi _0^\pm (\mathbf {p}) \left( A_\pm e^{i\mathbf {p} \cdot \mathbf {r} /\hbar } + B_\pm e^{-i\mathbf {p} \cdot \mathbf {r} /\hbar } \right) \,, \end{aligned}$$

where the spinor

$$\begin{aligned} \Psi _0^\pm (\mathbf {p}) = \left( \begin{array}{c} \varphi _0^\pm (\mathbf {p}) \\ \chi _0^\pm (\mathbf {p}) \end{array} \right) \,, \end{aligned}$$

has the amplitudes

$$\begin{aligned} {\left\{ \begin{array}{ll} \varphi _0^\pm (\mathbf {p}) = \frac{\pm \mu + mc^2}{2\sqrt{mc^2 \mu }} \\ \chi _0^\pm (\mathbf {p}) = \frac{\mp \mu + mc^2}{2\sqrt{mc^2 \mu }} \end{array}\right. } \,. \end{aligned}$$

Notice that \([\varphi _0^\pm (\mathbf {p})]^2 - [\chi _0^\pm (\mathbf {p})]^2 = \pm 1\), and \(\mu \equiv E_p = \sqrt{p^2 c^2 + m^2 c^4}\).

4 Introduction of an external potential

The Bose–Einstein condensation can happen even in the presence of an external potential. To study the effects of an external potential, let us solve the time independent KG equation

$$\begin{aligned} \mathbf {\nabla }^2 \psi (\mathbf {r}) + \frac{1}{\hbar ^2 c^2} \left[ (\mu -V(\mathbf {r}))^2 - m^2 c^4 \right] \psi (\mathbf {r}) = 0 \,, \end{aligned}$$

in different cases. This equation has been obtained and studied in the literature in several contexts, see, e.g., Refs. [22,23,24,25,26,27,28,29,30]. It can be derived by applying the correspondence principle in quantum mechanics: \(E \rightarrow i\hbar \frac{\partial }{\partial t}\), \(\mathbf {p} \rightarrow -i\hbar \mathbf {\nabla }\); to the relativistic expression for the energy \(E = \sqrt{ \mathbf {p}^2 c^2 + m^2 c^4} + V(\mathbf {r})\). Using the Feshbach–Villars formalism, we obtain the relation

$$\begin{aligned} \mu \psi = mc^2 (\varphi - \chi ) + V(\mathbf {r}) (\varphi + \chi ) \,, \end{aligned}$$

with \(\psi = \varphi + \chi \). Then, we find from Eq. (16) that the spinor components \(\varphi \) and \(\chi \) can be computed from the wave function \(\psi \) as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} \varphi (\mathbf {r}) = \frac{1}{2}\left( 1 + \frac{\mu - V(\mathbf {r})}{mc^2} \right) \psi (\mathbf {r}) \\ \chi (\mathbf {r}) = \frac{1}{2}\left( 1 - \frac{\mu - V(\mathbf {r})}{mc^2} \right) \psi (\mathbf {r}) \end{array}\right. } \,. \end{aligned}$$

In the massless case, one has to consider \(m=0\) in Eq. (15), and replace \(m \rightarrow \mathcal N\) in Eqs. (16) and (17), where \(\mathcal N\) is an arbitrary real nonzero parameter [31].

The Schrödinger equation can be obtained from the KG equation (15) by considering the non-relativistic limit, i.e., \(c \rightarrow \infty \). To see that, let us define the energy with the rest-mass energy subtracted, \(\bar{\mu }\), as:

$$\begin{aligned} \mu \equiv mc^2 + \bar{\mu }\,. \end{aligned}$$

Then, we can write the KG equation (15) in a form similar to the Schrödinger equation, but with an explicit relativistic correction. This is

$$\begin{aligned} -\frac{\hbar ^2}{2m}\mathbf {\nabla }^2 \psi (\mathbf {r}) + \left( V(\mathbf {r}) - \bar{\mu }\right) \left[ 1 - \frac{(V(\mathbf {r}) - \bar{\mu })}{2mc^2} \right] \psi (\mathbf {r}) = 0 \,, \end{aligned}$$

which is completely equivalent to Eq. (15). Then, the Schrödinger equation is obtained from the KG equation in the limit \(|V(\mathbf {r}) - \bar{\mu }| \ll m c^2\). Notice that in this limit one has from Eq. (17) that \(\varphi (\mathbf {r}) \simeq _{{c \rightarrow \infty }} \psi (\mathbf {r})\) and \(\chi (\mathbf {r}) \simeq _{{c \rightarrow \infty }} 0\).

4.1 Coulombic potential

Let us study the case of a Coulombic potential

$$\begin{aligned} V(r) = -\frac{g}{r} \,, \qquad g > 0 \,. \end{aligned}$$

We consider Eq. (15) in spherical coordinates, and assume \(\ell = 0\) (zero angular momentum), obtaining the equation

$$\begin{aligned} \psi ^{\prime \prime }(r) + \frac{2}{r} \psi ^\prime (r) + \frac{1}{\hbar ^2 c^2}\left[ (\mu - V(r))^2 - m^2 c^4 \right] \psi (r) = 0 \,. \end{aligned}$$

This equation can be written in a simpler form by introducing the reduced radial wave function:

$$\begin{aligned} u(r) \equiv r \psi (r) \,. \end{aligned}$$

Then one gets

$$\begin{aligned} u^{\prime \prime }(r) + \frac{1}{\hbar ^2 c^2} \left[ (\mu - V(r))^2 - m^2 c^4 \right] u(r) = 0 \,. \end{aligned}$$

The solution of Eq. (23) with the potential of Eq. (20) can be obtained analytically as a linear combination of two independent solutions, i.e.,

$$\begin{aligned} u(r) = r^{\beta _+} e^{-\frac{\Delta }{\hbar c} r } \left[ C_1 \cdot L_{-\beta _+ + \frac{g \mu }{\hbar c \Delta }}^{\beta _+ - \beta _-}\left( \frac{2\Delta }{\hbar c} r \right) + C_2 \cdot U\left( \beta _+ - \frac{g\mu }{\hbar c \Delta }, 2 \beta _p, \frac{2\Delta }{\hbar c} r \right) \right] \,, \end{aligned}$$

where \(L_{n}^a(z)\) and U(abz) are the generalized Laguerre polynomial and the confluent hypergeometric function, respectively, while we have defined \(\Delta \equiv \sqrt{m^2 c^4 - \mu ^2}\) and

$$\begin{aligned} \beta _\pm \equiv \frac{1}{2}\left( 1 \pm \sqrt{1-\frac{4 g^2}{\hbar ^2 c^2 }} \right) \,. \end{aligned}$$

The solution at short distances behaves as:

$$\begin{aligned} u(r) \mathop {\simeq }_{{r \rightarrow 0 }} C_- r^{\beta _-} + C_+ r^{\beta _+} \,, \end{aligned}$$

with \(+(-)\) standing for the dominant behavior of the \(L_n^a(z)(U(a,b,z))\) solution. The physical (regular) solution corresponds to \(r^{\beta _+}\), so that the coefficient \(C_-\) should vanish and then we should consider \(C_2=0\) in Eq. (24). From the behavior of the L-solution at large distances, one finds that the square-integrable condition for the wave function leads to the exact result for the eigenvalue problem of Eq. (23) which we will denote by \(\mu _n^{{\text {KG}}}\), corresponding to the solutions of the equation:

$$\begin{aligned} \frac{g\mu _n^{{\text {KG}}}}{\hbar c \sqrt{m^2 c^4 - \mu _n^{{\text {KG}}\, 2} } } - \beta _{+} = n-1 \,, \qquad n = 1,2,3, \cdots \,, \end{aligned}$$

leading to the chemical potential

$$\begin{aligned} \mu _n^{{\text {KG}}} = m c^2 \frac{n - 1 +\beta _{+}}{\sqrt{\frac{g^2}{(\hbar c)^2} + (n - 1 +\beta _{+})^2}} \,, \qquad n = 1,2,3,\cdots \,. \end{aligned}$$

Notice that the form of Eq. (28) implies that \(|\mu _n^{{\text {KG}}}| < mc^2\), so that the eigenfunction associated with the eigenvalue \(\mu _n^{{\text {KG}}}\) behaves as \(u(r) \simeq _{{r \rightarrow \infty }} e^{-\kappa r}\) with \(\kappa \equiv \Delta _n/(\hbar c) > 0\), thus corresponding to a bound state. To consider the non-relativistic limit, we make c to be large enough. Then, we have

$$\begin{aligned} \beta _\pm = \left\{ \begin{array}{cc} 1 - \frac{1}{(\hbar c)^2} g^2 + \cdots &{} (+) \\ \frac{1}{(\hbar c)^2} g^2 + \cdots &{} \qquad (-) \end{array} \,. \right. \end{aligned}$$

We can compare our results in the non-relativistic limit with the results obtained with the Schrödinger equation. In this latter case, the eigenvalues are

$$\begin{aligned} \bar{\mu }_{n}^{{\text {NR}}} = - \frac{m g^2}{2\hbar ^2 n^2} \,, \qquad n = 1,2,3, \cdots \,. \end{aligned}$$

Let us define \(\delta \mu _n\) as the difference between the result for the eigenvalue obtained with the KG equation (after subtracting the rest-mass energy), and the non-relativistic result of Eq. (30), i.e.,

$$\begin{aligned} \mu _n^{{\text {KG}}} = m c^2 + \bar{\mu }_n^{{\text {NR}}} + \delta \mu _n \,. \end{aligned}$$

In the limit of \(c \gg 1\), the expression of Eq. (28) has the following expansion:

$$\begin{aligned} \mu _n^{{\text {KG}}} \mathop {=}_{c \gg 1} m c^2 \left[ 1 -\frac{g^2}{2(\hbar c)^2 n^2 } - \frac{g^4}{(\hbar c)^4} \left( \frac{1}{n^3} - \frac{3}{8} \frac{1}{n^4} \right) + {\mathscr {O}}\left( c^{-6} \right) \right] \,, \end{aligned}$$

so that one can easily identify the correction \(\delta \mu _n\) at order \({\mathscr {O}}(c^{-2})\) from a comparison with Eq. (31). Before displaying the results, it is convenient to define the dimensionless variables

$$\begin{aligned} \bar{r} \equiv \frac{mc^2}{\hbar c} r \,, \qquad \bar{u}(\bar{r}) \equiv \sqrt{\frac{\hbar c}{mc^2}} \cdot u(r) \,, \qquad M_n^{{\text {KG}}} \equiv \frac{\mu _n^{{\text {KG}}}}{m c^2} \,, \qquad \lambda \equiv \frac{g}{\hbar c} \,. \end{aligned}$$

Then, the dimensionless eigenvalues

$$\begin{aligned} M_n^{{\text {KG}}} = \frac{n-1+\beta _+}{\sqrt{\lambda ^2 + (n-1+\beta _+)^2}} \qquad \text {with} \qquad \beta _{\pm } = \frac{1}{2}\left( 1 \pm \sqrt{1-4\lambda ^2} \right) \end{aligned}$$

are functions only of the parameter \(\lambda \). In particular, the decomposition of Eq. (31) writes in dimensionless units as:

$$\begin{aligned} M_n^{{\text {KG}}} = 1 - \frac{\lambda ^2}{2n^2} + \delta M_n \quad \text {with} \quad \delta M_n \equiv \frac{\delta \mu _n}{mc^2} = -\lambda ^4 \left( \frac{1}{n^3} - \frac{3}{8} \frac{1}{n^4}\right) + \mathcal O\left( \lambda ^6 \right) \,. \end{aligned}$$

The non-relativistic limit corresponds to \(\lambda \rightarrow 0\), or equivalently \(c \rightarrow \infty \). We display in Fig. 1 (left and middle panels) the dimensionless reduced wave function \(\bar{u}(\bar{r})\), as well as the spinor components \(\bar{u}_\varphi (\bar{r}) \equiv \sqrt{\frac{\hbar c}{mc^2} } \cdot r \varphi (r)\) and \(\bar{u}_\chi (\bar{r}) \equiv \sqrt{\frac{\hbar c}{mc^2} } \cdot r \chi (r)\). We display also in Fig. 1 (right) the behavior of \(\delta M_n\) as a function of \(\lambda \). Notice that , as it is already clear from Eq. (35), showing that the result of the Schrödinger equation is recovered in the non-relativistic limit.

Fig. 1
figure 1

Left panel: Dimensionless reduced wave functions \(\bar{u}(\bar{r})\) obtained by solving the KG equation with a Coulombic potential (cf. Eqs. (24) and (33)) We display the wave functions for the first three levels: \(n = 1, 2, 3\). Middle panel: Reduced wave function \(\bar{u}(\bar{r})\) and the spinor components (\(\bar{u}_\varphi (\bar{r})\), \(\bar{u}_\chi (\bar{r})\)) for \(n = 1\). In both panels we have considered \(\lambda = 0.1\) and we have normalized the wave functions such that \(\displaystyle \bar{u}(\bar{r}) \mathop {\simeq }_{r \rightarrow 0} \bar{r}^{\beta _+}\) (cf. Eq. (26)). Right panel: \(-\delta M_n\) as a function of \(\lambda \) for the first three levels (cf. Eq. (35))

Finally, let us note that the eigenvalue \(\mu _n^{{\text {KG}}}\) is real only for real values of \(\beta _{+}\), and this happens for

$$\begin{aligned} g < \frac{\hbar c}{2} \,, \end{aligned}$$

i.e., for \(\lambda < 1/2\). One can see that in the regime \(g > \hbar c/2\), the asymptotic behaviors of the reduced wave function are

$$\begin{aligned} u(r) \mathop {\sim }_{r \rightarrow 0} r^{\frac{1}{2} + i \text {Im}(\beta _+)} \,, \qquad \qquad u(r) \mathop {\sim }_{r \rightarrow \infty } e^{-\kappa r} \qquad \text {with} \qquad \text {Re}(\kappa ) > 0 \,, \end{aligned}$$

so that while it is a square-integrable function, it is not a regular solution at \(r \rightarrow 0\).

4.2 System of N interacting particles

Another interesting case that we will study is a system of N interacting particles under the influence of an external potential. In the non-relativistic limit, such a system is usually described in terms of the Gross–Pitaevskii nonlinear Schrödinger equation, which is given by

$$\begin{aligned} -\frac{\hbar ^2}{2m} \mathbf {\nabla }^2 \psi (\mathbf {r}) + V(\mathbf {r}) \psi (\mathbf {r}) = \bar{\mu } \psi (\mathbf {r}) \,. \end{aligned}$$

In Ref. [18] (see also [19]), this system was studied with an harmonic external potential and a mean-field potential for the interaction term given in terms of a scattering-length, a, that is,

$$\begin{aligned} V(r) = \frac{1}{2} m \omega ^2 r^2 - \frac{4\pi \hbar ^2 |a|}{m} |\psi (r)|^2 \,. \end{aligned}$$

Here, we study this case in the relativistic regime and evaluate its non-relativistic limit comparing our results with the results from Ref. [18]. In the relativistic case, from Eq. (23) and using the potential of Eq. (39), one has

$$\begin{aligned} u^{\prime \prime }(r) + \frac{1}{\hbar ^2 c^2}\left[ \left( \mu - \frac{1}{2} m \omega ^2 r^2 + \frac{4\pi \hbar ^2 |a|}{m} \frac{|u(r)|^2}{r^2} \right) ^2 - m^2 c^4 \right] u(r) = 0 \,. \end{aligned}$$

Let us define the dimensionless variables

$$\begin{aligned} x \equiv \sqrt{\frac{2m\omega }{\hbar }} \cdot r \,, \quad \Phi (x) \equiv \sqrt{8\pi |a|} \cdot u(r) \,, \quad \beta \equiv \frac{\mu }{\hbar \omega } \,, \quad \bar{\beta }\equiv \frac{\bar{\mu }}{\hbar \omega } \,, \quad \alpha \equiv \frac{\hbar \omega }{mc^2} \,. \end{aligned}$$

Using Eq. (18) one finds \(\beta = 1/\alpha + \bar{\beta }\). Then, Eq. (40) can be written in the equivalent form:

$$\begin{aligned} \Phi ^{\prime \prime }(x) + \left( \bar{\beta }- \frac{1}{4} x^2 + \frac{|\Phi (x)|^2}{x^2} \right) \left[ 1 + \frac{\alpha }{2} \left( \bar{\beta }- \frac{1}{4} x^2 + \frac{|\Phi (x)|^2}{x^2} \right) \right] \Phi (x) = 0 \,. \end{aligned}$$

The non-relativistic limit corresponds to \(\alpha \rightarrow 0\), or equivalently \(c \rightarrow \infty \). In the non-relativistic case, we define the normalization as \(N = \int d^3r |\psi (r)|^2 = 4\pi \int _0^\infty dr \, r^2 |u(r)|^2\) where N is the number of atoms or partons. The corresponding normalization for the dimensionless wave function is

$$\begin{aligned} n = \int _0^\infty dx \, |\Phi (x)|^2 \,, \qquad \text {where} \qquad n \equiv N \frac{|a|}{\ell _s} \quad \text {and} \quad \ell _s \equiv \frac{1}{2} \sqrt{ \frac{\hbar }{2m\omega } } \,. \end{aligned}$$

The length \(\ell _s\) is the characteristic length of the system. In the relativistic case, it is better to define the normalization in terms of the conserved charge, i.e.,

$$\begin{aligned} Q = 4\pi \int _0^\infty dr \, r^2 \rho (r) \,, \qquad \text {with} \qquad \rho (r) = |\varphi (r)|^2 - |\chi (r)|^2 \,, \end{aligned}$$

which for the dimensionless spinor components of the wave function \(\Phi _{f}(x) \equiv \sqrt{8\pi |a|} \cdot r f(r) \,, \; f = \varphi , \chi \), leads to

$$\begin{aligned} q = \int _0^\infty dx \, \left( |\Phi _\varphi (x)|^2 - |\Phi _\chi (x)|^2 \right) \,, \qquad \text {where} \qquad q \equiv Q \frac{|a|}{\ell _s} \,. \end{aligned}$$

Obviously \(\displaystyle Q \mathop {\longrightarrow }_{c \rightarrow \infty } N\) and \(\displaystyle q \mathop {\longrightarrow }_{c \rightarrow \infty } n\). We show in Fig. 2 the results of \(\bar{\beta }\) and q by solving the Gross–Pitaevskii nonlinear equation in the relativistic case, Eq. (42), and compared with the non-relativistic result \((\alpha =0)\) of Ref. [18]. Even though the curves of Fig. 2 contain all the relevant information, it would be interesting to show explicitly the dependence of \(\bar{\beta }\) with the scattering length a, by using that \(\bar{\beta }(q) = \bar{\beta }\left( Q |a|/\ell _s\right) \). To do so, we display in Fig. 3 the results of \(\bar{\beta }\) as a function of Q for several values of \(|a|/\ell _s\) (left panel), and as a function of \(|a|/\ell _s\) for several values of Q (middle panel). One can see that for fixed \(\bar{\beta }\), the larger the value of |a|, the smaller the value of Q. This can be easily understood by noticing that the relation \(\bar{\beta }= \bar{\beta }(q)\) given by Fig. 2 (middle) can be inverted to give the one-valued function \(q = q(\bar{\beta })\), so that using Eq. (45) one finds \(Q = \ell _s q(\bar{\beta })/|a|\). Notice that the normalization of \(\bar{\beta }\) given by Eq. (41) does not contain any dependence in a, so that the dependence of \(\bar{\mu }\) with a is proportional to the dependence of \(\bar{\beta }\) with a, i.e., \(\bar{\mu }(a) = \hbar \omega \cdot \bar{\beta }\left( Q |a|/\ell _s \right) \). Finally, we display in Fig. 3 (right) the dependence of N/Q with the parameter \(\alpha \) for \(\Phi ^\prime (0) = 2.5\), where N is computed in the relativistic case by using Eq. (43) with \(\Phi (x) = \Phi _\varphi (x) + \Phi _\chi (x)\) the solution of Eq. (42). Notice that in the non-relativistic limit \((\alpha \rightarrow 0)\) both quantities are equal, but in the relativistic regime one finds \(N < Q\).

Fig. 2
figure 2

Left and middle panels: Results for the dimensionless chemical potential \(\bar{\beta }\) after solving the Gross–Pitaevskii nonlinear equation in the relativistic case, Eq. (42). We display the relativistic result of \(\bar{\beta }\) as a function of \(\Phi ^\prime (0)\) (left panel) and as a function of q (middle panel) for \(\alpha = 0.1, 0.2\) and 0.3, and compared to the non-relativistic result corresponding to \(\alpha = 0\) and displayed as solid (black) line. Right panel: q as a function of \(\Phi ^\prime (0)\) for \(\alpha = 0, 0.1, 0.2\) and 0.3. Notice that \(q(\alpha = 0) = n\)

Fig. 3
figure 3

Left and middle panels: Dimensionless chemical potential \(\bar{\beta }\) as a function of Q for fixed values of the scattering length: \(|a|/\ell _s = 1,2,3\) and 5 (left panel), and as a function of \(|a|/\ell _s\) for fixed values of Q: \(Q = 1,2,3\) and 5 (middle panel) (cf. Eq. (45)). We have considered \(\alpha = 0.1\) in both panels. Right panel: N/Q as a function of \(\alpha \) for \(\Phi ^\prime (0) = 2.5\)

5 Discussion and conclusions

Concluding, in this work we analyzed the time independent solutions of the nonlinear Klein–Gordon equation. We used the Feshbach–Villars approach with potential and analyzed the behavior of the system under different external potentials, namely the Coulombic potential and the harmonic potential.

With the introduction of the chemical potential as the eigenvalue of the Hamiltonian operator for the ground-state, we obtained the relevant conditions for the formation of the Bose–Einstein condensate in a relativistic system. The use of the Feshbach–Villars formalism allowed us to easily investigate the transition of the system from the relativistic to the non-relativistic regimes. We compare the results obtained for the relativistic system with a mean-field potential and an harmonic external potential, with those for the non-relativistic system under the same conditions. We observe a smooth transition of several parameters as the relativistic effects diminish, for both the Coulombic potential and the harmonic potential.

The effects of the interaction between the particles of the system, described by the scattering length in a mean-field approach, are analyzed, and in particular, we study the variation of the chemical potential with the scattering length.

The study of the nonlinear Klein–Gordon equation to investigate condensation of relativistic particles invites us to pursue extensions of this work. One possibility is to use the same formalism of the present work to investigate condensation in the relativistic hadronic matter, and another option is to study a modified form of the Gross–Pitaevskii equation with fractional derivatives.