We investigate the particle and kinetic-energy densities for a system of
N fermions confined in a potential $V(\bfr)$. In an earlier paper [J. Phys. A: Math. Gen. {\bf 36}, 1111 (2003)], some exact and asymptotic relations involving the particle density and the kinetic-energy density locally, i.e. at any given point $\bfr$, were derived for isotropic harmonic oscillators in arbitrary dimensions. In this paper we show that these {\it local virial theorems} (LVT) also hold exactly for linear potentials in arbitrary dimensions and for the one-dimensional box. We also investigate the validity of these LVTs when they are applied to arbitrary smooth potentials. We formulate generalized LVTs that are supported by a semiclassical theory which relates the density oscillations to the closed non-periodic orbits of the classical system. We test the validity of these generalized theorems numerically for various local potentials. Although they formally are only valid asymptotically for large particle numbers
N, we show that they practically are surprisingly accurate also for moderate values of
N.
We present a Green's-function method for the evaluation of the particle density profile and of the higher moments of the one-body density matrix in mesoscopic systems containing a large number N of Fermi particles moving independently on a line under an external potential. The usefulness of the method is illustrated by applications to a Fermi gas confined in a harmonic potential well, for which we evaluate the momentum flux density, entering the equations of generalized hydrodynamics, and the kinetic energy density, which is relevant to the density-functional theory. As a further application of the method we explicitly display the quantum mean square fluctuations of these quantities. We also study some properties of the kinetic energy functional
Ekin[n(x)] in the same system. Whereas a local approximation to the kinetic energy density is demonstrably wrong, an exact single-valued relationship between the density derivative of
Ekin[n(x)] and the particle density
n(x) is demonstrated and evaluated for various values of the number of particles in the system.