# Functional derivative

In the calculus of variations, a field of mathematical analysis, the **functional derivative** (or **variational derivative**)^{[1]} relates a change in a functional to a change in a function that the functional depends on.

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

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]}

The coefficient of *δf(x)*, denoted as *δJ*/*δf(x)*, is called the **functional derivative** of *J* with respect to *f* at the point *x*.^{[2]} For this example functional, the functional derivative is the left hand side of the Euler-Lagrange equation,^{[3]}

## Definition

The functional derivative is defined. Then the functional differential is defined in terms of the functional derivative.

### Functional derivative

Given a manifold *M* representing (continuous/smooth/with certain boundary conditions/etc.) functions *ρ* and a functional *F* defined as

the **functional derivative** of *F*[*ρ*], denoted *δF/δ**ρ*, is defined by^{[4]}

where is an arbitrary function. is called the variation of *ρ*.
In other words,
is a linear functional, so by the Riesz representation theorem, this functional is given by integration against some measure.
Then is defined to be the Radon-Nikodym derivative of this measure.
We think of the function as the gradient of *F* at the point
*ρ* and as the directional derivative at point *ρ* in the direction of *φ*.
Then analogous to vector calculus, the inner product with the gradient gives the directional derivative.

### Functional differential

The differential (or variation or first variation) of the functional *F*[*ρ*] is,^{[5]} ^{[Note 2]}

Heuristically, *φ* is the change in *ρ*, so we 'formally' have *φ = δρ*, and then
this is similar in form to the total differential of a function *F*(*ρ*_{1}, *ρ*_{2}, ..., *ρ*_{n}),

where *ρ _{1}, ρ_{2}, ... , ρ_{n}* are independent variables.
Comparing the last two equations, the functional derivative

*δF*/

*δ*

*ρ*(

*x*) has a role similar to that of the partial derivative

*∂F/∂*

*ρ*, where the variable of integration

_{i}*x*is like a continuous version of the summation index

*i*.

^{[2]}

### Formal description

The definition of a functional derivative may be made more mathematically precise and formal by defining the space of functions more carefully. For example, when the space of functions is a Banach space, the functional derivative becomes known as the Fréchet derivative, while one uses the Gâteaux derivative on more general locally convex spaces. Note that the well-known Hilbert spaces are special cases of Banach spaces. The more formal treatment allows many theorems from ordinary calculus and analysis to be generalized to corresponding theorems in functional analysis, as well as numerous new theorems to be stated.

## Properties

Like the derivative of a function, the functional derivative satisfies the following properties, where *F*[*ρ*] and *G*[*ρ*] are functionals:

- Linear:
^{[6]}

- Product rule:
^{[7]}

- Chain rules:

## Determining functional derivatives

We give a formula to determine functional derivatives for a common class of functionals that 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).

### Formula

Given a functional

and a function *ϕ*(** r**) that vanishes on the boundary of the region of integration, from a previous section Definition,

The second line is obtained using the total derivative, where *∂f* /*∂∇**ρ* is a derivative of a scalar with respect to a vector.^{[Note 3]} 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 on the boundary of the region of integration. Since *ϕ* is also an arbitrary function, applying the fundamental lemma of calculus of variations to the last line, the functional derivative is

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,

where the vector * r* ∈ ℝ

^{n}, and ∇

^{(i)}is a tensor whose

*n*components are partial derivative operators of order

^{i}*i*,

An analogous application of the definition of the functional derivative yields

In the last two equations, the *n ^{i}* components of the tensor are partial derivatives of

*f*with respect to partial derivatives of

*ρ*,

and the tensor scalar product is,

### Examples

#### Thomas–Fermi kinetic energy functional

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:

Since the integrand of *T*_{TF}[*ρ*] does not involve derivatives of *ρ*(* r*), the functional derivative of

*T*

_{TF}[

*ρ*] is,

^{[10]}

#### Coulomb potential energy functional

For the **electron-nucleus potential**, Thomas and Fermi employed the Coulomb potential energy functional

Applying the definition of functional derivative,

So,

For the classical part of the **electron-electron interaction**, Thomas and Fermi employed the Coulomb potential energy functional

From the definition of the functional derivative,

The first and second terms on the right hand side of the last equation are equal, since * r* and

*in the second term can be interchanged without changing the value of the integral. Therefore,*

**r′**and the functional derivative of the electron-electron coulomb potential energy functional *J*[*ρ*] is,^{[11]}

The second functional derivative is

#### Weizsäcker kinetic energy functional

In 1935 von Weizsäcker proposed to add a gradient correction to the Thomas-Fermi kinetic energy functional to make it suit better a molecular electron cloud:

where

Using a previously derived formula for the functional derivative,

and the result is,^{[12]}

#### Entropy

The entropy of a discrete random variable is a functional of the probability mass function.

Thus,

Thus,

#### Exponential

Let

Using the delta function as a test function,

Thus,

This is particularly useful in calculating the correlation functions from the partition function in quantum field theory.

#### Functional derivative of a function

A function can be written in the form of an integral like a functional. For example,

Since the integrand does not depend on derivatives of *ρ*, the functional derivative of *ρ*(* r*) is,

# =Using the delta function as a test function {{ safesubst:#invoke:Unsubst||date=__DATE__ |$B

{{#invoke:Category handler|main}}{{#invoke:Category handler|main}}^{[citation needed]}
}}==
In physics, it's common to use the Dirac delta function in place of a generic test function , for yielding the functional derivative at the point (this is a point of the whole functional derivative as a partial derivative is a component of the gradient):

This works in cases when formally can be expanded as a series (or at least up to first order) in . The formula is however not mathematically rigorous, since is usually not even defined.

The definition given in a previous section is based on a relationship that holds for all test functions *ϕ*, so one might think that it should hold also when *ϕ* is chosen to be a specific function such as the delta function. However, the latter is not a valid test function.

In the definition, the functional derivative describes how the functional changes as a result of a small change in the entire function . The particular form of the change in is not specified, but it should stretch over the whole interval on which is defined. Employing the particular form of the perturbation given by the delta function has the meaning that is varied only in the point . Except for this point, there is no variation in .

## Notes

- ↑ According to Template:Harvtxt, this notation is customary in physical literature.
- ↑ Called
*differential*in Template:Harv,*variation*or*first variation*in Template:Harv, and*variation*or*differential*in Template:Harv. - ↑ For a three-dimensional cartesian coordinate system,
- ↑ For example, for the case of three dimensions (
*n*= 3) and second order derivatives (*i*= 2), the tensor ∇^{(2)}has components, - ↑ For example, for the case
*n*= 3 and*i*= 2, the tensor scalar product is,

## Footnotes

- ↑
^{1.0}^{1.1}Template:Harv - ↑
^{2.0}^{2.1}Template:Harv. - ↑ Template:Harv
- ↑ Template:Harv.
- ↑ Template:Harv.
- ↑ Template:Harv.
- ↑ Template:Harv.
- ↑ Template:Harv.
- ↑ Template:Harv.
- ↑ Template:Harv.
- ↑ Template:Harv.
- ↑ Template:Harv.

## References

- {{#invoke:citation/CS1|citation

|CitationClass=book }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=book }}

## External links

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}