To derive the Kohn-Sham equations, we must first take the derivative
of a functional, which is the basic subject of the calculus of
variations. Despite the mystique associated with the calculus of
variations, it is really no more complicated than taking derivatives
of multi-variable functions. This is because any functional, say
, may be viewed as just a function of a large collection of
variables, namely the values of its argument function
at each
point in space
. One can think of a function
as a (very
long) vector of values, one for each value of
, just as we think of
a vector
as a set of values
, one for each value of the
index
. With this perspective, the points in space
are the
analogue of the index
, so that we can think of the function
also as the indexed set of values
.
With this perspective, we see that, just as the first-order variation
of a multi-variable function
with changes in its
argument
is given by a sum over the index

As an example, let us consider the functional derivative of
with respect to
. First, we shall carry out
the variation formally, and then we shall show how quickly we
arrive at the same result by analogy with multi-variable calculus.
Applying the formal definition (13) of the functional
derivative to
in
(11), we find
![\begin{eqnarray*}
\delta E_{xc} & \equiv & E_{xc}[n(\vec x)+\delta n(\vec
x)]-E_...
...\delta n(\vec x) \,\,
dV \mbox{\ \ \ (to first order)},\nonumber
\end{eqnarray*}](img78.png)
Alternatively, we note that
Eq. (11) is just the integral of the result of applying
the function
to each component of
separately. If this were a
multi-variable problem, the analogous function would be a sum over the
values of a function evaluated separately on each component,
Tomas Arias 2004-01-26