  The universal density functional $F$ of density-functional theory is a
complicated and ill-behaved function of the density-in particular, $F$ is not
differentiable, making many formal manipulations more complicated. Whilst $F$
has been well characterized in terms of convex analysis as forming a conjugate
pair $(E,F)$ with the ground-state energy $E$ via the Hohenberg-Kohn and Lieb
variation principles, $F$ is nondifferentiable and subdifferentiable only on a
small (but dense) set of its domain. In this article, we apply a tool from
convex analysis, Moreau-Yosida regularization, to construct, for any
$\epsilon>0$, pairs of conjugate functionals $({}^\epsilon\!E,{}^\epsilon\!F)$
that converge to $(E,F)$ pointwise everywhere as $\epsilon\rightarrow 0^+$, and
such that ${}^\epsilon\!F$ is (Fr\'echet) differentiable. For technical
reasons, we limit our attention to molecular electronic systems in a finite but
large box. It is noteworthy that no information is lost in the Moreau-Yosida
regularization: the physical ground-state energy $E(v)$ is exactly recoverable
from the regularized ground-state energy ${}^\epsilon\!E(v)$ in a simple way.
All concepts and results pertaining to the original $(E,F)$ pair have direct
counterparts in results for $({}^\epsilon\! E, {}^\epsilon\!F)$. The
Moreau-Yosida regularization therefore allows for an exact, differentiable
formulation of density-functional theory. In particular, taking advantage of
the differentiability of ${}^\epsilon\!F$, a rigorous formulation of Kohn-Sham
theory is presented that does not suffer from the noninteracting
representability problem in standard Kohn-Sham theory.
