The quantum pressure $E_{kin}$ of a Bose gas in the Thomas Fermi limit with contact interactions in a symmetric harmonic trap is determined by (Pitaevskij & Stringari, 2016):
$E_{kin}=\int d\mathbf{r}\frac{\hbar^2}{2m}\left|\nabla\sqrt{n}\right|^2$
In that same harmonic trap, the density profile is
$n_{TF}^0(\mathbf{r})=\frac{1}{g}\left(\mu_{TF}^0-V_{ext}(\mathbf{r})\right)$,
where $V_{{ext}}(\mathbf{r})=\frac{m\omega}{2}\left(x^2+y^2+z^2\right)$ is the trapping potential.
The following are derived constants;
- $g=\frac{4\pi\hbar^2a_s}{m}$ is the interaction parameter,
- $\mu_{TF}^0=\frac{\hbar\omega}{2}\left(\frac{15Na_s}{a_{ho}}\right)^{2/5}$ is the chemical potential,
- $a_{ho}=\sqrt{\hbar/m\omega}$ is the harmonic oscillator length,
- $R=a_{h o}\left(\frac{15 N a}{a_{h o}}\right)^{1 / 5}$ is the radius of the condensate.
Other terms in the equations are independent experimental constants.
To solve the integral, we can convert to spherical coordinates with $d \mathbf{r}=r^2 \sin (\varphi) d r d \theta d \varphi$, where $r=\sqrt{x^2+y^2+z^2}$. The limits of integration range from $0$ to $2\pi$ for $\theta$, $0$ to $\pi$ for $\varphi$, and $0$ to $R$ for $r$, where R is the radius of the condensate.
We get an integral that looks like this:
$E_{kin}=\int_0^{2\pi}d\theta\int_0^{\pi}sin(\varphi)d \varphi\int_0^{R} r^2\frac{\hbar^2}{2m}\left|\nabla\sqrt{n}\right|^2 dr$
The angular components can be separated from the rest of the integral since the density profile does not depend on the angle.
Let's expand that term near the end, $\left|\nabla\sqrt{n}\right|^2$. We get
$E_{kin}=\int_0^{2\pi}d\theta\int_0^{\pi}sin(\varphi)d \varphi\int_0^{R} r^2\frac{\hbar^2}{2m}\left(\frac{1}{2\pi R^2a_{ho}^4a_s}\frac{r^2}{1-r^2/R^2}\right) dr$.
The problem is that the $\frac{1}{1-r^2/R^2}$ part will blow up near $R$, which is where the limit of integration is. Putting the thing into wolfram alpha returns the message that the result does not converge, and solving it as an indefinite integral just returns an infinite result when you substitute $r=R$ into it.
How can this problem be resolved? It should be a textbook case but it is returning a divergent result?
Reference:
Pitaevskij, L.P. and Stringari, S. (2016) Bose-Einstein condensation and superfluidity. Oxford: Oxford University Press.