required density $$\rho_\gamma(x)=\int_0^{\infty}\eta\left(\frac{t}{\rho(x)}\right)\,dt=\rho(x).$$ Hence $\gamma$ is admissible and it can be used to get an upper bound on $T(\rho)$. From , its kinetic energy is $$\begin{gathered}
{{\rm Tr}\,}(-\Delta)\gamma=\int_{{\mathbb{R}}^d}dx\int_0^{\infty}dt  \left|\nabla_x\sqrt{\eta\left(\frac{t}{\rho(x)}\right)}\right|^2\\
+c_{\rm TF}\int_{{\mathbb{R}}^d}\rho(x)^{1+\frac2d}dx\int_0^{\infty}\eta(t)t^{\frac2d}\,dt.\end{gathered}$$ Note that $$\begin{aligned}
\int_{{\mathbb{R}}^d}dx\int_0^{\infty}dt  \left|\nabla_x\sqrt{\eta\left(\frac{t}{\rho(x)}\right)}\right|^2=& \int_{{\mathbb{R}}^d}dx\int_0^{\infty}dt  \frac{\left|\nabla_x\eta\left(\frac{t}{\rho(x)}\right)\right|^2}{4\eta\left(\frac{t}{\rho(x)}\right)}\\
=& \int_{{\mathbb{R}}^d}dx\frac{|\nabla\rho(x)|^2}{4\rho(x)^{4}}\int_0^{\infty}t^2dt  \frac{\left|\eta'\left(\frac{t}{\rho(x)}\right)\right|^2}{\eta\left(\frac{t}{\rho(x)}\right)}\\
=& \int_{{\mathbb{R}}^d}|\nabla\sqrt{\rho}(x)|^2\,dx\int_0^{\infty}\frac{t^2\eta'(t)^2}{\eta(t)}\,dt.\end{aligned}$$ Hence we have proved that $$\begin{gathered}
{{\rm Tr}\,}(-\Delta)\gamma=\int_{{\mathbb{R}}^d}|\nabla\sqrt{\rho}(x)|^2\,dx\int_0^{\infty}\frac{t^2\eta'(t)^2}{\eta(t)}\,dt\\
+c_{\rm TF}\int_{{\mathbb{R}}^d}\rho(x)^{1+\frac2d}dx\int_0^{\infty}\eta(t)t^{\frac2d}\,dt\end{gathered}$$ for all $\eta{\geqslant}0$ satisfying the two constraints . The smallest constant we can get in front of the $\rho^{1+2/d}$ term is $c_{\rm TF}$, by concentrating $\eta$ at the point $t=1$, but this makes the other term blow up. If we fix $$\int_0^{\infty}\eta(t)t^{\frac2d}\,dt=1+{\varepsilon}$$ then the best constant we can get in front of the gradient term is given by the variational problem $$C({\varepsilon}):=\inf_{\substack{\eta{\geqslant}0\\ \int_0^{\infty}\eta=1\\ \int_0^{\infty}\eta/t{\leqslant}1\\ \int_0^{\infty}t^{2/d}\eta{\leqslant}1+{\varepsilon}}}\int_0^{\infty}\frac{t^2\eta'(t)^2}{\eta(t)}\,dt.$$ We claim that $C({\varepsilon}){\leqslant}{\rm const.}(1+{\varepsilon}^{-1})$ for ${\varepsilon}$ small enough, which we prove by an appropriate choice of $\eta$.

Let us first take, for instance, $$\eta_{\varepsilon}(t)=\frac{3}{2{\varepsilon}^3}(t-1)^2{{\ensuremath {\mathds 1} }}(1{\leqslant}t{\leqslant}1+{\varepsilon})+\frac{3}{2{\varepsilon}^3}(1+2{\varepsilon}-t)^2{{\ensuremath {\mathds 1} }}(1+{\varepsilon}{\leqslant}t{\leqslant}1+2{\varepsilon}).
\label{eq:choice_eta_1}$$ Then $\int \eta_{\varepsilon}=1$ and $\int \eta_{\varepsilon}(t)/t\,dt{\leqslant}1$ since $\eta_{\varepsilon}$ is supported on $[1,{\infty})$. Using the simple bounds $$\int_0^{\infty}\eta(t)t^{\frac2d}\,dt{\leqslant}(1+2{\varepsilon})^{2/d}$$ and $$\int_0^{\infty}\frac{t^2\eta'(t)^2}{\eta(t)}\,dt{\leqslant}(1+2{\varepsilon})^2\int_0^{\infty}\frac{\eta'(t)^2}{\eta(t)}\,dt=\frac{12(1+2{\varepsilon})^2}{{\varepsilon}^2},$$ we obtain (after changing ${\varepsilon}$ into ${\varepsilon}/2$) $$T(\rho){\leqslant}c_{\rm TF}(1+{\varepsilon})^{\frac2d}\int_{{\mathbb{R}}^d}\rho(x)^{1+\frac2d}dx
 +\frac{48(1+{\varepsilon})^2}{{\varepsilon}^2}\int_{{\mathbb{R}}^d}|\nabla\sqrt{\rho}(x)|^2\,dx,\qquad \forall {\varepsilon}>0.
 \label{eq:upper_bound_T}$$

The behavior of the correction in front of the semi-classical term $c_{\rm TF}$ is not optimal for small 