Computing exact integrals of kinetic energy and DFT