  Perdew et al. [Phys. Rev. Lett 49, 1691 (1982)] discovered and proved two
different properties of exact Kohn-Sham density functional theory (DFT): (i)
The exact total energy versus particle number is a series of linear segments
between integer electron points; (ii) Across an integer number of electrons,
the exchange-correlation potential may "jump" by a constant, known as the
derivative discontinuity (DD). Here, we show analytically that in both the
original and the generalized Kohn-Sham formulation of DFT, the two are in fact
two sides of the same coin. Absence of a derivative discontinuity necessitates
deviation from piecewise linearity, and the latter can be used to correct for
the former, thereby restoring the physical meaning of the orbital energies.
Using selected small molecules, we show that this results in a simple
correction scheme for any underlying functional, including semi-local and
hybrid functionals as well as Hartree-Fock theory, suggesting a practical
correction for the infamous gap problem of DFT. Moreover, we show that
optimally-tuned range-separated hybrid functionals can inherently minimize both
DD and curvature, thus requiring no correction, and show that this can be used
as a sound theoretical basis for novel tuning strategies.
