We propose a way to improve energy density functionals (EDFs) in the density functional theory based on the combination of the inverse Kohn-Sham method and the density functional perturbation theory. Difference between the known EDF and the exact one is treated as the first-order perturbation. As benchmark calculations, we reproduce the theoretical exchange and correlation functionals in the local density approximation. Systems of noble-gas atoms are used for benchmark calculations, and the ground-state energies and densities, as well as the functionals, are reproduced with good accuracies.