Concept in calculus of variation
In the calculus of variations , a field of mathematical analysis , the functional derivative (or variational derivative )[ 1] relates a change in a functional (a functional in this sense is a function that acts on functions) to a change in a function on which the functional depends.
In the calculus of variations, functionals are usually expressed in terms of an integral of functions, their arguments , and their derivatives . In an integrand L of a functional, if a function f is varied by adding to it another function δf that is arbitrarily small, and the resulting integrand is expanded in powers of δf , the coefficient of δf in the first order term is called the functional derivative.
For example, consider the functional
J
[
f
]
=
∫
a
b
L
(
x
,
f
(
x
)
,
f
′
(
x
)
)
d
x
,
{\displaystyle J[f]=\int _{a}^{b}L(\,x,f(x),f'{(x)}\,)\,dx\,,}
where f ′(x ) ≡ df /dx . If f is varied by adding to it a function δf , and the resulting integrand L (x , f +δf , f ′+δf ′) is expanded in powers of δf , then the change in the value of J to first order in δf can be expressed as follows:[ 1] [ Note 1]
δ
J
=
∫
a
b
(
∂
L
∂
f
δ
f
(
x
)
+
∂
L
∂
f
′
d
d
x
δ
f
(
x
)
)
d
x
=
∫
a
b
(
∂
L
∂
f
−
d
d
x
∂
L
∂
f
′
)
δ
f
(
x
)
d
x
+
∂
L
∂
f
′
(
b
)
δ
f
(
b
)
−
∂
L
∂
f
′
(
a
)
δ
f
(
a
)
{\displaystyle {\begin{aligned}\delta J&=\int _{a}^{b}\left({\frac {\partial L}{\partial f}}\delta f(x)+{\frac {\partial L}{\partial f'}}{\frac {d}{dx}}\delta f(x)\right)\,dx\,\\[1ex]&=\int _{a}^{b}\left({\frac {\partial L}{\partial f}}-{\frac {d}{dx}}{\frac {\partial L}{\partial f'}}\right)\delta f(x)\,dx\,+\,{\frac {\partial L}{\partial f'}}(b)\delta f(b)\,-\,{\frac {\partial L}{\partial f'}}(a)\delta f(a)\end{aligned}}}
where the variation in the derivative, δf ′ was rewritten as the derivative of the variation (δf ) ′ , and integration by parts was used in these derivatives.
In this section, the functional differential (or variation or first variation)[ Note 2] is defined. Then the functional derivative is defined in terms of the functional differential.
Functional differential [ edit ]
Suppose
B
{\displaystyle B}
is a Banach space and
F
{\displaystyle F}
is a functional defined on
B
{\displaystyle B}
.
The differential of
F
{\displaystyle F}
at a point
ρ
∈
B
{\displaystyle \rho \in B}
is the linear functional
δ
F
[
ρ
,
⋅
]
{\displaystyle \delta F[\rho ,\cdot ]}
on
B
{\displaystyle B}
defined[ 2] by the condition that, for all
ϕ
∈
B
{\displaystyle \phi \in B}
,
F
[
ρ
+
ϕ
]
−
F
[
ρ
]
=
δ
F
[
ρ
;
ϕ
]
+
ε
‖
ϕ
‖
{\displaystyle F[\rho +\phi ]-F[\rho ]=\delta F[\rho ;\phi ]+\varepsilon \left\|\phi \right\|}
where
ε
{\displaystyle \varepsilon }
is a real number that depends on
‖
ϕ
‖
{\displaystyle \|\phi \|}
in such a way that
ε
→
0
{\displaystyle \varepsilon \to 0}
as
‖
ϕ
‖
→
0
{\displaystyle \|\phi \|\to 0}
. This means that
δ
F
[
ρ
,
⋅
]
{\displaystyle \delta F[\rho ,\cdot ]}
is the Fréchet derivative of
F
{\displaystyle F}
at
ρ
{\displaystyle \rho }
.
However, this notion of functional differential is so strong it may not exist,[ 3] and in those cases a weaker notion, like the Gateaux derivative is preferred. In many practical cases, the functional differential is defined[ 4] as the directional derivative
δ
F
[
ρ
,
ϕ
]
=
lim
ε
→
0
F
[
ρ
+
ε
ϕ
]
−
F
[
ρ
]
ε
=
[
d
d
ε
F
[
ρ
+
ε
ϕ
]
]
ε
=
0
.
{\displaystyle {\begin{aligned}\delta F[\rho ,\phi ]&=\lim _{\varepsilon \to 0}{\frac {F[\rho +\varepsilon \phi ]-F[\rho ]}{\varepsilon }}\\[1ex]&=\left[{\frac {d}{d\varepsilon }}F[\rho +\varepsilon \phi ]\right]_{\varepsilon =0}.\end{aligned}}}
Note that this notion of the functional differential can even be defined without a norm.
Functional derivative [ edit ]
In many applications, the domain of the functional
F
{\displaystyle F}
is a space of differentiable functions
ρ
{\displaystyle \rho }
defined on some space
Ω
{\displaystyle \Omega }
and
F
{\displaystyle F}
is of the form
F
[
ρ
]
=
∫
Ω
L
(
x
,
ρ
(
x
)
,
D
ρ
(
x
)
)
d
x
{\displaystyle F[\rho ]=\int _{\Omega }L(x,\rho (x),D\rho (x))\,dx}
for some function
L
(
x
,
ρ
(
x
)
,
D
ρ
(
x
)
)
{\displaystyle L(x,\rho (x),D\rho (x))}
that may depend on
x
{\displaystyle x}
, the value
ρ
(
x
)
{\displaystyle \rho (x)}
and the derivative
D
ρ
(
x
)
{\displaystyle D\rho (x)}
.
If this is the case and, moreover,
δ
F
[
ρ
,
ϕ
]
{\displaystyle \delta F[\rho ,\phi ]}
can be written as the integral of
ϕ
{\displaystyle \phi }
times another function (denoted δF /δρ )
δ
F
[
ρ
,
ϕ
]
=
∫
Ω
δ
F
δ
ρ
(
x
)
ϕ
(
x
)
d
x
{\displaystyle \delta F[\rho ,\phi ]=\int _{\Omega }{\frac {\delta F}{\delta \rho }}(x)\ \phi (x)\ dx}
then this function δF /δρ is called the functional derivative of F at ρ .[ 5] [ 6] If
F
{\displaystyle F}
is restricted to only certain functions
ρ
{\displaystyle \rho }
(for example, if there are some boundary conditions imposed) then
ϕ
{\displaystyle \phi }
is restricted to functions such that
ρ
+
ε
ϕ
{\displaystyle \rho +\varepsilon \phi }
continues to satisfy these conditions.
Heuristically,
ϕ
{\displaystyle \phi }
is the change in
ρ
{\displaystyle \rho }
, so we 'formally' have
ϕ
=
δ
ρ
{\displaystyle \phi =\delta \rho }
, and then this is similar in form to the total differential of a function
F
(
ρ
1
,
ρ
2
,
…
,
ρ
n
)
{\displaystyle F(\rho _{1},\rho _{2},\dots ,\rho _{n})}
,
d
F
=
∑
i
=
1
n
∂
F
∂
ρ
i
d
ρ
i
,
{\displaystyle dF=\sum _{i=1}^{n}{\frac {\partial F}{\partial \rho _{i}}}\ d\rho _{i},}
where
ρ
1
,
ρ
2
,
…
,
ρ
n
{\displaystyle \rho _{1},\rho _{2},\dots ,\rho _{n}}
are independent variables.
Comparing the last two equations, the functional derivative
δ
F
/
δ
ρ
(
x
)
{\displaystyle \delta F/\delta \rho (x)}
has a role similar to that of the partial derivative
∂
F
/
∂
ρ
i
{\displaystyle \partial F/\partial \rho _{i}}
, where the variable of integration
x
{\displaystyle x}
is like a continuous version of the summation index
i
{\displaystyle i}
.[ 7] One thinks of δF /δρ as the gradient of F at the point ρ , so the value δF /δρ(x) measures how much the functional F will change if the function ρ is changed at the point x . Hence the formula
∫
δ
F
δ
ρ
(
x
)
ϕ
(
x
)
d
x
{\displaystyle \int {\frac {\delta F}{\delta \rho }}(x)\phi (x)\;dx}
is regarded as the directional derivative at point
ρ
{\displaystyle \rho }
in the direction of
ϕ
{\displaystyle \phi }
. This is analogous to vector calculus, where the inner product of a vector
v
{\displaystyle v}
with the gradient gives the directional derivative in the direction of
v
{\displaystyle v}
.
Like the derivative of a function, the functional derivative satisfies the following properties, where F [ρ ] and G [ρ ] are functionals:[ Note 3]
Linearity:[ 8]
δ
(
λ
F
+
μ
G
)
[
ρ
]
δ
ρ
(
x
)
=
λ
δ
F
[
ρ
]
δ
ρ
(
x
)
+
μ
δ
G
[
ρ
]
δ
ρ
(
x
)
,
{\displaystyle {\frac {\delta (\lambda F+\mu G)[\rho ]}{\delta \rho (x)}}=\lambda {\frac {\delta F[\rho ]}{\delta \rho (x)}}+\mu {\frac {\delta G[\rho ]}{\delta \rho (x)}},}
where λ , μ are constants.
Product rule:[ 9]
δ
(
F
G
)
[
ρ
]
δ
ρ
(
x
)
=
δ
F
[
ρ
]
δ
ρ
(
x
)
G
[
ρ
]
+
F
[
ρ
]
δ
G
[
ρ
]
δ
ρ
(
x
)
,
{\displaystyle {\frac {\delta (FG)[\rho ]}{\delta \rho (x)}}={\frac {\delta F[\rho ]}{\delta \rho (x)}}G[\rho ]+F[\rho ]{\frac {\delta G[\rho ]}{\delta \rho (x)}}\,,}
Chain rules:
If F is a functional and G another functional, then[ 10]
δ
F
[
G
[
ρ
]
]
δ
ρ
(
y
)
=
∫
d
x
δ
F
[
G
]
δ
G
(
x
)
G
=
G
[
ρ
]
⋅
δ
G
[
ρ
]
(
x
)
δ
ρ
(
y
)
.
{\displaystyle {\frac {\delta F[G[\rho ]]}{\delta \rho (y)}}=\int dx{\frac {\delta F[G]}{\delta G(x)}}_{G=G[\rho ]}\cdot {\frac {\delta G[\rho ](x)}{\delta \rho (y)}}\ .}
If G is an ordinary differentiable function (local functional) g , then this reduces to[ 11]
δ
F
[
g
(
ρ
)
]
δ
ρ
(
y
)
=
δ
F
[
g
(
ρ
)
]
δ
g
[
ρ
(
y
)
]
d
g
(
ρ
)
d
ρ
(
y
)
.
{\displaystyle {\frac {\delta F[g(\rho )]}{\delta \rho (y)}}={\frac {\delta F[g(\rho )]}{\delta g[\rho (y)]}}\ {\frac {dg(\rho )}{d\rho (y)}}\ .}
Determining functional derivatives [ edit ]
A formula to determine functional derivatives for a common class of functionals can be written as the integral of a function and its derivatives. This is a generalization of the Euler–Lagrange equation : indeed, the functional derivative was introduced in physics within the derivation of the Lagrange equation of the second kind from the principle of least action in Lagrangian mechanics (18th century). The first three examples below are taken from density functional theory (20th century), the fourth from statistical mechanics (19th century).
Given a functional
F
[
ρ
]
=
∫
f
(
r
,
ρ
(
r
)
,
∇
ρ
(
r
)
)
d
r
,
{\displaystyle F[\rho ]=\int f({\boldsymbol {r}},\rho ({\boldsymbol {r}}),\nabla \rho ({\boldsymbol {r}}))\,d{\boldsymbol {r}},}
and a function
ϕ
(
r
)
{\displaystyle \phi ({\boldsymbol {r}})}
that vanishes on the boundary of the region of integration, from a previous section Definition ,
∫
δ
F
δ
ρ
(
r
)
ϕ
(
r
)
d
r
=
[
d
d
ε
∫
f
(
r
,
ρ
+
ε
ϕ
,
∇
ρ
+
ε
∇
ϕ
)
d
r
]
ε
=
0
=
∫
(
∂
f
∂
ρ
ϕ
+
∂
f
∂
∇
ρ
⋅
∇
ϕ
)
d
r
=
∫
[
∂
f
∂
ρ
ϕ
+
∇
⋅
(
∂
f
∂
∇
ρ
ϕ
)
−
(
∇
⋅
∂
f
∂
∇
ρ
)
ϕ
]
d
r
=
∫
[
∂
f
∂
ρ
ϕ
−
(
∇
⋅
∂
f
∂
∇
ρ
)
ϕ
]
d
r
=
∫
(
∂
f
∂
ρ
−
∇
⋅
∂
f
∂
∇
ρ
)
ϕ
(
r
)
d
r
.
{\displaystyle {\begin{aligned}\int {\frac {\delta F}{\delta \rho ({\boldsymbol {r}})}}\,\phi ({\boldsymbol {r}})\,d{\boldsymbol {r}}&=\left[{\frac {d}{d\varepsilon }}\int f({\boldsymbol {r}},\rho +\varepsilon \phi ,\nabla \rho +\varepsilon \nabla \phi )\,d{\boldsymbol {r}}\right]_{\varepsilon =0}\\&=\int \left({\frac {\partial f}{\partial \rho }}\,\phi +{\frac {\partial f}{\partial \nabla \rho }}\cdot \nabla \phi \right)d{\boldsymbol {r}}\\&=\int \left[{\frac {\partial f}{\partial \rho }}\,\phi +\nabla \cdot \left({\frac {\partial f}{\partial \nabla \rho }}\,\phi \right)-\left(\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}\right)\phi \right]d{\boldsymbol {r}}\\&=\int \left[{\frac {\partial f}{\partial \rho }}\,\phi -\left(\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}\right)\phi \right]d{\boldsymbol {r}}\\&=\int \left({\frac {\partial f}{\partial \rho }}-\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}\right)\phi ({\boldsymbol {r}})\ d{\boldsymbol {r}}\,.\end{aligned}}}
The second line is obtained using the total derivative , where ∂f /∂∇ρ is a derivative of a scalar with respect to a vector .[ Note 4]
The third line was obtained by use of a product rule for divergence . The fourth line was obtained using the divergence theorem and the condition that
ϕ
=
0
{\displaystyle \phi =0}
on the boundary of the region of integration. Since
ϕ
{\displaystyle \phi }
is also an arbitrary function, applying the fundamental lemma of calculus of variations to the last line, the functional derivative is
δ
F
δ
ρ
(
r
)
=
∂
f
∂
ρ
−
∇
⋅
∂
f
∂
∇
ρ
{\displaystyle {\frac {\delta F}{\delta \rho ({\boldsymbol {r}})}}={\frac {\partial f}{\partial \rho }}-\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}}
where ρ = ρ (r ) and f = f (r , ρ , ∇ρ ) . This formula is for the case of the functional form given by F [ρ ] at the beginning of this section. For other functional forms, the definition of the functional derivative can be used as the starting point for its determination. (See the example Coulomb potential energy functional .)
The above equation for the functional derivative can be generalized to the case that includes higher dimensions and higher order derivatives. The functional would be,
F
[
ρ
(
r
)
]
=
∫
f
(
r
,
ρ
(
r
)
,
∇
ρ
(
r
)
,
∇
(
2
)
ρ
(
r
)
,
…
,
∇
(
N
)
ρ
(
r
)
)
d
r
,
{\displaystyle F[\rho ({\boldsymbol {r}})]=\int f({\boldsymbol {r}},\rho ({\boldsymbol {r}}),\nabla \rho ({\boldsymbol {r}}),\nabla ^{(2)}\rho ({\boldsymbol {r}}),\dots ,\nabla ^{(N)}\rho ({\boldsymbol {r}}))\,d{\boldsymbol {r}},}
where the vector r ∈ R n , and ∇(i ) is a tensor whose ni components are partial derivative operators of order i ,
[
∇
(
i
)
]
α
1
α
2
⋯
α
i
=
∂
i
∂
r
α
1
∂
r
α
2
⋯
∂
r
α
i
where
α
1
,
α
2
,
…
,
α
i
=
1
,
2
,
…
,
n
.
{\displaystyle \left[\nabla ^{(i)}\right]_{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}={\frac {\partial ^{\,i}}{\partial r_{\alpha _{1}}\partial r_{\alpha _{2}}\cdots \partial r_{\alpha _{i}}}}\qquad \qquad {\text{where}}\quad \alpha _{1},\alpha _{2},\dots ,\alpha _{i}=1,2,\dots ,n\ .}
[ Note 5]
An analogous application of the definition of the functional derivative yields
δ
F
[
ρ
]
δ
ρ
=
∂
f
∂
ρ
−
∇
⋅
∂
f
∂
(
∇
ρ
)
+
∇
(
2
)
⋅
∂
f
∂
(
∇
(
2
)
ρ
)
+
⋯
+
(
−
1
)
N
∇
(
N
)
⋅
∂
f
∂
(
∇
(
N
)
ρ
)
=
∂
f
∂
ρ
+
∑
i
=
1
N
(
−
1
)
i
∇
(
i
)
⋅
∂
f
∂
(
∇
(
i
)
ρ
)
.
{\displaystyle {\begin{aligned}{\frac {\delta F[\rho ]}{\delta \rho }}&{}={\frac {\partial f}{\partial \rho }}-\nabla \cdot {\frac {\partial f}{\partial (\nabla \rho )}}+\nabla ^{(2)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(2)}\rho \right)}}+\dots +(-1)^{N}\nabla ^{(N)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(N)}\rho \right)}}\\&{}={\frac {\partial f}{\partial \rho }}+\sum _{i=1}^{N}(-1)^{i}\nabla ^{(i)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}\ .\end{aligned}}}
In the last two equations, the ni components of the tensor
∂
f
∂
(
∇
(
i
)
ρ
)
{\displaystyle {\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}}
are partial derivatives of f with respect to partial derivatives of ρ ,
[
∂
f
∂
(
∇
(
i
)
ρ
)
]
α
1
α
2
⋯
α
i
=
∂
f
∂
ρ
α
1
α
2
⋯
α
i
{\displaystyle \left[{\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}\right]_{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}={\frac {\partial f}{\partial \rho _{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}}}}
where
ρ
α
1
α
2
⋯
α
i
≡
∂
i
ρ
∂
r
α
1
∂
r
α
2
⋯
∂
r
α
i
{\displaystyle \rho _{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}\equiv {\frac {\partial ^{\,i}\rho }{\partial r_{\alpha _{1}}\,\partial r_{\alpha _{2}}\cdots \partial r_{\alpha _{i}}}}}
, and the tensor scalar product is,
∇
(
i
)
⋅
∂
f
∂
(
∇
(
i
)
ρ
)
=
∑
α
1
,
α
2
,
⋯
,
α
i
=
1
n
∂
i
∂
r
α
1
∂
r
α
2
⋯
∂
r
α
i
∂
f
∂
ρ
α
1
α
2
⋯
α
i
.
{\displaystyle \nabla ^{(i)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}=\sum _{\alpha _{1},\alpha _{2},\cdots ,\alpha _{i}=1}^{n}\ {\frac {\partial ^{\,i}}{\partial r_{\alpha _{1}}\,\partial r_{\alpha _{2}}\cdots \partial r_{\alpha _{i}}}}\ {\frac {\partial f}{\partial \rho _{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}}}\ .}
[ Note 6]
Thomas–Fermi kinetic energy functional[ edit ]
The Thomas–Fermi model of 1927 used a kinetic energy functional for a noninteracting uniform electron gas in a first attempt of density-functional theory of electronic structure:
T
T
F
[
ρ
]
=
C
F
∫
ρ
5
/
3
(
r
)
d
r
.
{\displaystyle T_{\mathrm {TF} }[\rho ]=C_{\mathrm {F} }\int \rho ^{5/3}(\mathbf {r} )\,d\mathbf {r} \,.}
Since the integrand of T TF [ρ ] does not involve derivatives of ρ (r ) , the functional derivative of T TF [ρ ] is,[ 12]
δ
T
T
F
δ
ρ
(
r
)
=
C
F
∂
ρ
5
/
3
(
r
)
∂
ρ
(
r
)
=
5
3
C
F
ρ
2
/
3
(
r
)
.
{\displaystyle {\frac {\delta T_{\mathrm {TF} }}{\delta \rho ({\boldsymbol {r}})}}=C_{\mathrm {F} }{\frac {\partial \rho ^{5/3}(\mathbf {r} )}{\partial \rho (\mathbf {r} )}}={\frac {5}{3}}C_{\mathrm {F} }\rho ^{2/3}(\mathbf {r} )\,.}
Coulomb potential energy functional [ edit ]
For the electron-nucleus potential , Thomas and Fermi employed the Coulomb potential energy functional
V
[
ρ
]
=
∫
ρ
(
r
)
|
r
|
d
r
.
{\displaystyle V[\rho ]=\int {\frac {\rho ({\boldsymbol {r}})}{|{\boldsymbol {r}}|}}\ d{\boldsymbol {r}}.}
Applying the definition of functional derivative,
∫
δ
V
δ
ρ
(
r
)
ϕ
(
r
)
d
r
=
[
d
d
ε
∫
ρ
(
r
)
+
ε
ϕ
(
r
)
|
r
|
d
r
]
ε
=
0
=
∫
ϕ
(
r
)
|
r
|
d
r
.
{\displaystyle {\begin{aligned}\int {\frac {\delta V}{\delta \rho ({\boldsymbol {r}})}}\ \phi ({\boldsymbol {r}})\ d{\boldsymbol {r}}&{}=\left[{\frac {d}{d\varepsilon }}\int {\frac {\rho ({\boldsymbol {r}})+\varepsilon \phi ({\boldsymbol {r}})}{|{\boldsymbol {r}}|}}\ d{\boldsymbol {r}}\right]_{\varepsilon =0}\\[1ex]&{}=\int {\frac {\phi ({\boldsymbol {r}})}{|{\boldsymbol {r}}|}}\ d{\boldsymbol {r}}\,.\end{aligned}}}
So,
δ
V
δ
ρ
(
r
)
=
1
|
r
|
.
{\displaystyle {\frac {\delta V}{\delta \rho ({\boldsymbol {r}})}}={\frac {1}{|{\boldsymbol {r}}|}}\ .}
For the classical part of the electron-electron interaction , Thomas and Fermi employed the Coulomb potential energy functional
J
[
ρ
]
=
1
2
∬
ρ
(
r
)
ρ
(
r
′
)
|
r
−
r
′
|
d
r
d
r
′
.
{\displaystyle J[\rho ]={\frac {1}{2}}\iint {\frac {\rho (\mathbf {r} )\rho (\mathbf {r} ')}{|\mathbf {r} -\mathbf {r} '|}}\,d\mathbf {r} d\mathbf {r} '\,.}
From the definition of the functional derivative ,
∫
δ
J
δ
ρ
(
r
)
ϕ
(
r
)
d
r
=
[
d
d
ε
J
[
ρ
+
ε
ϕ
]
]
ε
=
0
=
[
d
d
ε
(
1
2
∬
[
ρ
(
r
)
+
ε
ϕ
(
r
)
]
[
ρ
(
r
′
)
+
ε
ϕ
(
r
′
)
]
|
r
−
r
′
|
d
r
d
r
′
)
]
ε
=
0
=
1
2
∬
ρ
(
r
′
)
ϕ
(
r
)
|
r
−
r
′
|
d
r
d
r
′
+
1
2
∬
ρ
(
r
)
ϕ
(
r
′
)
|
r
−
r
′
|
d
r
d
r
′
{\displaystyle {\begin{aligned}\int {\frac {\delta J}{\delta \rho ({\boldsymbol {r}})}}\phi ({\boldsymbol {r}})d{\boldsymbol {r}}&{}=\left[{\frac {d\ }{d\varepsilon }}\,J[\rho +\varepsilon \phi ]\right]_{\varepsilon =0}\\&{}=\left[{\frac {d\ }{d\varepsilon }}\,\left({\frac {1}{2}}\iint {\frac {[\rho ({\boldsymbol {r}})+\varepsilon \phi ({\boldsymbol {r}})]\,[\rho ({\boldsymbol {r}}')+\varepsilon \phi ({\boldsymbol {r}}')]}{|{\boldsymbol {r}}-{\boldsymbol {r}}'|}}\,d{\boldsymbol {r}}d{\boldsymbol {r}}'\right)\right]_{\varepsilon =0}\\&{}={\frac {1}{2}}\iint {\frac {\rho ({\boldsymbol {r}}')\phi ({\boldsymbol {r}})}{|{\boldsymbol {r}}-{\boldsymbol {r}}'|}}\,d{\boldsymbol {r}}d{\boldsymbol {r}}'+{\frac {1}{2}}\iint {\frac {\rho ({\boldsymbol {r}})\phi ({\boldsymbol {r}}')}{|{\boldsymbol {r}}-{\boldsymbol {r}}'|}}\,d{\boldsymbol {r}}d{\boldsymbol {r}}'\\\end{aligned}}}
The first and second terms on the right hand side of the last equation are equal, since r and r′ in the second term can be interchanged without changing the value of the integral. Therefore,
∫
δ
J
δ
ρ
(
r
)
ϕ
(
r
)
d
r
=
∫
(
∫
ρ
(
r
′
)
|
r
−
r
′
|
d
r
′
)
ϕ
(
r
)
d
r
{\displaystyle \int {\frac {\delta J}{\delta \rho ({\boldsymbol {r}})}}\phi ({\boldsymbol {r}})d{\boldsymbol {r}}=\int \left(\int {\frac {\rho ({\boldsymbol {r}}')}{|{\boldsymbol {r}}-{\boldsymbol {r}}'|}}d{\boldsymbol {r}}'\right)\phi ({\boldsymbol {r}})d{\boldsymbol {r}}}
and the functional derivative of the electron-electron Coulomb potential energy functional J [ρ ] is,[ 13]
δ
J
δ
ρ
(
r
)
=
∫
ρ
(
r
′
)
|
r
−
r
′
|
d
r
′
.
{\displaystyle {\frac {\delta J}{\delta \rho ({\boldsymbol {r}})}}=\int {\frac {\rho ({\boldsymbol {r}}')}{|{\boldsymbol {r}}-{\boldsymbol {r}}'|}}d{\boldsymbol {r}}'\,.}
The second functional derivative is
δ
2
J
[
ρ
]
δ
ρ
(
r
′
)
δ
ρ
(
r
)
=
∂
∂
ρ
(
r
′
)
(
ρ
(
r
′
)
|
r
−
r
′
|
)
=
1
|
r
−
r
′
|
.
{\displaystyle {\frac {\delta ^{2}J[\rho ]}{\delta \rho (\mathbf {r} ')\delta \rho (\mathbf {r} )}}={\frac {\partial }{\partial \rho (\mathbf {r} ')}}\left({\frac {\rho (\mathbf {r} ')}{|\mathbf {r} -\mathbf {r} '|}}\right)={\frac {1}{|\mathbf {r} -\mathbf {r} '|}}.}
Weizsäcker kinetic energy functional[ edit ]
In 1935 von Weizsäcker proposed to add a gradient correction to the Thomas-Fermi kinetic energy functional to make it better suit a molecular electron cloud:
T
W
[
ρ
]
=
1
8
∫
∇
ρ
(
r
)
⋅
∇
ρ
(
r
)
ρ
(
r
)
d
r
=
∫
t
W
d
r
,
{\displaystyle T_{\mathrm {W} }[\rho ]={\frac {1}{8}}\int {\frac {\nabla \rho (\mathbf {r} )\cdot \nabla \rho (\mathbf {r} )}{\rho (\mathbf {r} )}}d\mathbf {r} =\int t_{\mathrm {W} }\ d\mathbf {r} \,,}
where
t
W
≡
1
8
∇
ρ
⋅
∇
ρ
ρ
and
ρ
=
ρ
(
r
)
.
{\displaystyle t_{\mathrm {W} }\equiv {\frac {1}{8}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho }}\qquad {\text{and}}\ \ \rho =\rho ({\boldsymbol {r}})\ .}
Using a previously derived formula for the functional derivative,
δ
T
W
δ
ρ
(
r
)
=
∂
t
W
∂
ρ
−
∇
⋅
∂
t
W
∂
∇
ρ
=
−
1
8
∇
ρ
⋅
∇
ρ
ρ
2
−
(
1
4
∇
2
ρ
ρ
−
1
4
∇
ρ
⋅
∇
ρ
ρ
2
)
where
∇
2
=
∇
⋅
∇
,
{\displaystyle {\begin{aligned}{\frac {\delta T_{\mathrm {W} }}{\delta \rho ({\boldsymbol {r}})}}&={\frac {\partial t_{\mathrm {W} }}{\partial \rho }}-\nabla \cdot {\frac {\partial t_{\mathrm {W} }}{\partial \nabla \rho }}\\&=-{\frac {1}{8}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho ^{2}}}-\left({\frac {1}{4}}{\frac {\nabla ^{2}\rho }{\rho }}-{\frac {1}{4}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho ^{2}}}\right)\qquad {\text{where}}\ \ \nabla ^{2}=\nabla \cdot \nabla \ ,\end{aligned}}}
and the result is,[ 14]
δ
T
W
δ
ρ
(
r
)
=
1
8
∇
ρ
⋅
∇
ρ
ρ
2
−
1
4
∇
2
ρ
ρ
.
{\displaystyle {\frac {\delta T_{\mathrm {W} }}{\delta \rho ({\boldsymbol {r}})}}=\ \ \,{\frac {1}{8}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho ^{2}}}-{\frac {1}{4}}{\frac {\nabla ^{2}\rho }{\rho }}\ .}
The entropy of a discrete random variable is a functional of the probability mass function .
H
[
p
(
x
)
]
=
−
∑
x
p
(
x
)
log
p
(
x
)
{\displaystyle H[p(x)]=-\sum _{x}p(x)\log p(x)}
Thus,
∑
x
δ
H
δ
p
(
x
)
ϕ
(
x
)
=
[
d
d
ε
H
[
p
(
x
)
+
ε
ϕ
(
x
)
]
]
ε
=
0
=
[
−
d
d
ε
∑
x
[
p
(
x
)
+
ε
ϕ
(
x
)
]
log
[
p
(
x
)
+
ε
ϕ
(
x
)
]
]
ε
=
0
=
−
∑
x
[
1
+
log
p
(
x
)
]
ϕ
(
x
)
.
{\displaystyle {\begin{aligned}\sum _{x}{\frac {\delta H}{\delta p(x)}}\,\phi (x)&{}=\left[{\frac {d}{d\varepsilon }}H[p(x)+\varepsilon \phi (x)]\right]_{\varepsilon =0}\\&{}=\left[-\,{\frac {d}{d\varepsilon }}\sum _{x}\,[p(x)+\varepsilon \phi (x)]\ \log[p(x)+\varepsilon \phi (x)]\right]_{\varepsilon =0}\\&{}=-\sum _{x}\,[1+\log p(x)]\ \phi (x)\,.\end{aligned}}}
Thus,
δ
H
δ
p
(
x
)
=
−
1
−
log
p
(
x
)
.
{\displaystyle {\frac {\delta H}{\delta p(x)}}=-1-\log p(x).}
Let
F
[
φ
(
x
)
]
=
e
∫
φ
(
x
)
g
(
x
)
d
x
.
{\displaystyle F[\varphi (x)]=e^{\int \varphi (x)g(x)dx}.}
Using the delta function as a test function,
δ
F
[
φ
(
x
)
]
δ
φ
(
y
)
=
lim
ε
→
0
F
[
φ
(
x
)
+
ε
δ
(
x
−
y
)
]
−
F
[
φ
(
x
)
]
ε
=
lim
ε
→
0
e
∫
(
φ
(
x
)
+
ε
δ
(
x
−
y
)
)
g
(
x
)
d
x
−
e
∫
φ
(
x
)
g
(
x
)
d
x
ε
=
e
∫
φ
(
x
)
g
(
x
)
d
x
lim
ε
→
0
e
ε
∫
δ
(
x
−
y
)
g
(
x
)
d
x
−
1
ε
=
e
∫
φ
(
x
)
g
(
x
)
d
x
lim
ε
→
0
e
ε
g
(
y
)
−
1
ε
=
e
∫
φ
(
x
)
g
(
x
)
d
x
g
(
y
)
.
{\displaystyle {\begin{aligned}{\frac {\delta F[\varphi (x)]}{\delta \varphi (y)}}&{}=\lim _{\varepsilon \to 0}{\frac {F[\varphi (x)+\varepsilon \delta (x-y)]-F[\varphi (x)]}{\varepsilon }}\\&{}=\lim _{\varepsilon \to 0}{\frac {e^{\int (\varphi (x)+\varepsilon \delta (x-y))g(x)dx}-e^{\int \varphi (x)g(x)dx}}{\varepsilon }}\\&{}=e^{\int \varphi (x)g(x)dx}\lim _{\varepsilon \to 0}{\frac {e^{\varepsilon \int \delta (x-y)g(x)dx}-1}{\varepsilon }}\\&{}=e^{\int \varphi (x)g(x)dx}\lim _{\varepsilon \to 0}{\frac {e^{\varepsilon g(y)}-1}{\varepsilon }}\\&{}=e^{\int \varphi (x)g(x)dx}g(y).\end{aligned}}}
Thus,
δ
F
[
φ
(
x
)
]
δ
φ
(
y
)
=
g
(
y
)
F
[
φ
(
x
)
]
.
{\displaystyle {\frac {\delta F[\varphi (x)]}{\delta \varphi (y)}}=g(y)F[\varphi (x)].}
This is particularly useful in calculating the correlation functions from the partition function in quantum field theory .
Functional derivative of a function [ edit ]
A function can be written in the form of an integral like a functional. For example,
ρ
(
r
)
=
F
[
ρ
]
=
∫
ρ
(
r
′
)
δ
(
r
−
r
′
)
d
r
′
.
{\displaystyle \rho ({\boldsymbol {r}})=F[\rho ]=\int \rho ({\boldsymbol {r}}')\delta ({\boldsymbol {r}}-{\boldsymbol {r}}')\,d{\boldsymbol {r}}'.}
Since the integrand does not depend on derivatives of ρ , the functional derivative of ρ (r ) is,
δ
ρ
(
r
)
δ
ρ
(
r
′
)
≡
δ
F
δ
ρ
(
r
′
)
=
∂
∂
ρ
(
r
′
)
[
ρ
(
r
′
)
δ
(
r
−
r
′
)
]
=
δ
(
r
−
r
′
)
.
{\displaystyle {\frac {\delta \rho ({\boldsymbol {r}})}{\delta \rho ({\boldsymbol {r}}')}}\equiv {\frac {\delta F}{\delta \rho ({\boldsymbol {r}}')}}={\frac {\partial \ \ }{\partial \rho ({\boldsymbol {r}}')}}\,[\rho ({\boldsymbol {r}}')\delta ({\boldsymbol {r}}-{\boldsymbol {r}}')]=\delta ({\boldsymbol {r}}-{\boldsymbol {r}}').}
Functional derivative of iterated function [ edit ]
The functional derivative of the iterated function
f
(
f
(
x
)
)
{\displaystyle f(f(x))}
is given by:
δ
f
(
f
(
x
)
)
δ
f
(
y
)
=
f
′
(
f
(
x
)
)
δ
(
x
−
y
)
+
δ
(
f
(
x
)
−
y
)
{\displaystyle {\frac {\delta f(f(x))}{\delta f(y)}}=f'(f(x))\delta (x-y)+\delta (f(x)-y)}
and
δ
f
(
f
(
f
(
x
)
)
)
δ
f
(
y
)
=
f
′
(
f
(
f
(
x
)
)
(
f
′
(
f
(
x
)
)
δ
(
x
−
y
)
+
δ
(
f
(
x
)
−
y
)
)
+
δ
(
f
(
f
(
x
)
)
−
y
)
{\displaystyle {\frac {\delta f(f(f(x)))}{\delta f(y)}}=f'(f(f(x))(f'(f(x))\delta (x-y)+\delta (f(x)-y))+\delta (f(f(x))-y)}
In general:
δ
f
N
(
x
)
δ
f
(
y
)
=
f
′
(
f
N
−
1
(
x
)
)
δ
f
N
−
1
(
x
)
δ
f
(
y
)
+
δ
(
f
N
−
1
(
x
)
−
y
)
{\displaystyle {\frac {\delta f^{N}(x)}{\delta f(y)}}=f'(f^{N-1}(x)){\frac {\delta f^{N-1}(x)}{\delta f(y)}}+\delta (f^{N-1}(x)-y)}
Putting in N = 0 gives:
δ
f
−
1
(
x
)
δ
f
(
y
)
=
−
δ
(
f
−
1
(
x
)
−
y
)
f
′
(
f
−
1
(
x
)
)
{\displaystyle {\frac {\delta f^{-1}(x)}{\delta f(y)}}=-{\frac {\delta (f^{-1}(x)-y)}{f'(f^{-1}(x))}}}
Using the delta function as a test function [ edit ]
In physics, it is common to use the Dirac delta function
δ
(
x
−
y
)
{\displaystyle \delta (x-y)}
in place of a generic test function
ϕ
(
x
)
{\displaystyle \phi (x)}
, for yielding the functional derivative at the point
y
{\displaystyle y}
(this is a point of the whole functional derivative as a partial derivative is a component of the gradient):[ 15]
δ
F
[
ρ
(
x
)
]
δ
ρ
(
y
)
=
lim
ε
→
0
F
[
ρ
(
x
)
+
ε
δ
(
x
−
y
)
]
−
F
[
ρ
(
x
)
]
ε
.
{\displaystyle {\frac {\delta F[\rho (x)]}{\delta \rho (y)}}=\lim _{\varepsilon \to 0}{\frac {F[\rho (x)+\varepsilon \delta (x-y)]-F[\rho (x)]}{\varepsilon }}.}
This works in cases when
F
[
ρ
(
x
)
+
ε
f
(
x
)
]
{\displaystyle F[\rho (x)+\varepsilon f(x)]}
formally can be expanded as a series (or at least up to first order) in
ε
{\displaystyle \varepsilon }
. The formula is however not mathematically rigorous, since
F
[
ρ
(
x
)
+
ε
δ
(
x
−
y
)
]
{\displaystyle F[\rho (x)+\varepsilon \delta (x-y)]}
is usually not even defined.
The definition given in a previous section is based on a relationship that holds for all test functions
ϕ
(
x
)
{\displaystyle \phi (x)}
, so one might think that it should hold also when
ϕ
(
x
)
{\displaystyle \phi (x)}
is chosen to be a specific function such as the delta function . However, the latter is not a valid test function (it is not even a proper function).
In the definition, the functional derivative describes how the functional
F
[
ρ
(
x
)
]
{\displaystyle F[\rho (x)]}
changes as a result of a small change in the entire function
ρ
(
x
)
{\displaystyle \rho (x)}
. The particular form of the change in
ρ
(
x
)
{\displaystyle \rho (x)}
is not specified, but it should stretch over the whole interval on which
x
{\displaystyle x}
is defined. Employing the particular form of the perturbation given by the delta function has the meaning that
ρ
(
x
)
{\displaystyle \rho (x)}
is varied only in the point
y
{\displaystyle y}
. Except for this point, there is no variation in
ρ
(
x
)
{\displaystyle \rho (x)}
.
^ According to Giaquinta & Hildebrandt (1996) , p. 18, this notation is customary in physical literature.
^ Called first variation in (Giaquinta & Hildebrandt 1996 , p. 3), variation or first variation in (Courant & Hilbert 1953 , p. 186), variation or differential in (Gelfand & Fomin 2000 , p. 11, § 3.2) and differential in (Parr & Yang 1989 , p. 246).
^
Here the notation
δ
F
δ
ρ
(
x
)
≡
δ
F
δ
ρ
(
x
)
{\displaystyle {\frac {\delta {F}}{\delta \rho }}(x)\equiv {\frac {\delta {F}}{\delta \rho (x)}}}
is introduced.
^ For a three-dimensional Cartesian coordinate system,
∂
f
∂
∇
ρ
=
∂
f
∂
ρ
x
i
^
+
∂
f
∂
ρ
y
j
^
+
∂
f
∂
ρ
z
k
^
,
{\displaystyle {\frac {\partial f}{\partial \nabla \rho }}={\frac {\partial f}{\partial \rho _{x}}}\mathbf {\hat {i}} +{\frac {\partial f}{\partial \rho _{y}}}\mathbf {\hat {j}} +{\frac {\partial f}{\partial \rho _{z}}}\mathbf {\hat {k}} \,,}
where
ρ
x
=
∂
ρ
∂
x
,
ρ
y
=
∂
ρ
∂
y
,
ρ
z
=
∂
ρ
∂
z
{\displaystyle \rho _{x}={\frac {\partial \rho }{\partial x}}\,,\ \rho _{y}={\frac {\partial \rho }{\partial y}}\,,\ \rho _{z}={\frac {\partial \rho }{\partial z}}}
and
i
^
{\displaystyle \mathbf {\hat {i}} }
,
j
^
{\displaystyle \mathbf {\hat {j}} }
,
k
^
{\displaystyle \mathbf {\hat {k}} }
are unit vectors along the x, y, z axes.
^ For example, for the case of three dimensions (n = 3 ) and second order derivatives (i = 2 ), the tensor ∇(2) has components,
[
∇
(
2
)
]
α
β
=
∂
2
∂
r
α
∂
r
β
{\displaystyle \left[\nabla ^{(2)}\right]_{\alpha \beta }={\frac {\partial ^{\,2}}{\partial r_{\alpha }\,\partial r_{\beta }}}}
where
α
{\displaystyle \alpha }
and
β
{\displaystyle \beta }
can be
1
,
2
,
3
{\displaystyle 1,2,3}
.
^ For example, for the case n = 3 and i = 2 , the tensor scalar product is,
∇
(
2
)
⋅
∂
f
∂
(
∇
(
2
)
ρ
)
=
∑
α
,
β
=
1
3
∂
2
∂
r
α
∂
r
β
∂
f
∂
ρ
α
β
,
{\displaystyle \nabla ^{(2)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(2)}\rho \right)}}=\sum _{\alpha ,\beta =1}^{3}\ {\frac {\partial ^{\,2}}{\partial r_{\alpha }\,\partial r_{\beta }}}\,{\frac {\partial f}{\partial \rho _{\alpha \beta }}},}
where
ρ
α
β
≡
∂
2
ρ
∂
r
α
∂
r
β
{\displaystyle \rho _{\alpha \beta }\equiv {\frac {\partial ^{\,2}\rho }{\partial r_{\alpha }\,\partial r_{\beta }}}}
.
^ a b Giaquinta & Hildebrandt (1996) , p. 18
^ Gelfand & Fomin (2000) , p. 11.
^ Giaquinta & Hildebrandt (1996) , p. 10.
^ Giaquinta & Hildebrandt (1996) , p. 10.
^ Parr & Yang (1989) , p. 246, Eq. A.2.
^ Greiner & Reinhardt (1996) , p. 36,37.
^ Parr & Yang (1989) , p. 246.
^ Parr & Yang (1989) , p. 247, Eq. A.3.
^ Parr & Yang (1989) , p. 247, Eq. A.4.
^ Greiner & Reinhardt (1996) , p. 38, Eq. 6.
^ Greiner & Reinhardt (1996) , p. 38, Eq. 7.
^ Parr & Yang (1989) , p. 247, Eq. A.6.
^ Parr & Yang (1989) , p. 248, Eq. A.11.
^ Parr & Yang (1989) , p. 247, Eq. A.9.
^ Greiner & Reinhardt (1996) , p. 37
Courant, Richard ; Hilbert, David (1953). "Chapter IV. The Calculus of Variations". Methods of Mathematical Physics . Vol. I (First English ed.). New York, New York: Interscience Publishers , Inc. pp. 164– 274. ISBN 978-0471504474 . MR 0065391 . Zbl 0001.00501 . .
Frigyik, Béla A.; Srivastava, Santosh; Gupta, Maya R. (January 2008), Introduction to Functional Derivatives (PDF) , UWEE Tech Report, vol. UWEETR-2008-0001, Seattle, WA: Department of Electrical Engineering at the University of Washington, p. 7, archived from the original (PDF) on 2017-02-17, retrieved 2013-10-23 .
Gelfand, I. M. ; Fomin, S. V. (2000) [1963], Calculus of variations , translated and edited by Richard A. Silverman (Revised English ed.), Mineola, N.Y.: Dover Publications , ISBN 978-0486414485 , MR 0160139 , Zbl 0127.05402 .
Giaquinta, Mariano ; Hildebrandt, Stefan (1996), Calculus of Variations 1. The Lagrangian Formalism , Grundlehren der Mathematischen Wissenschaften, vol. 310 (1st ed.), Berlin: Springer-Verlag , ISBN 3-540-50625-X , MR 1368401 , Zbl 0853.49001 .
Greiner, Walter ; Reinhardt, Joachim (1996), "Section 2.3 – Functional derivatives" , Field quantization , With a foreword by D. A. Bromley, Berlin–Heidelberg–New York: Springer-Verlag, pp. 36–38 , ISBN 3-540-59179-6 , MR 1383589 , Zbl 0844.00006 .
Parr, R. G.; Yang, W. (1989). "Appendix A, Functionals". Density-Functional Theory of Atoms and Molecules . New York: Oxford University Press. pp. 246– 254. ISBN 978-0195042795 .
Spaces
Theorems Operators Algebras Open problems Applications Advanced topics