The functional derivative of with respect to is a Dirac delta function
The typical situations in physics involve functions of more than one variable. For example, set two systems of Coordinates, and . Each one has four coordinates.
The result above is expressed in terms of a four-Dimensional Dirac delta function.
Fundiff handles tensor functions (see Tensors - a complete guide). Define, for instance, as a spacetime tensor with two indices
Consider now the tensor field, here represented by the indexed function of = .
The functional derivative of this function with respect to is given by:
This result is expressed in terms of a four-Dimensional Dirac delta function with the two metric g_ factors, corresponding to the two indices of the tensor function . If instead of the above you "functionally differentiate" with respect to , the index nu, also present in the derivand, is then repeated, and so summed from 1 to the spacetime dimension. By default, and in this help page, the Dimension is , meaning that you are working in 3 + 1 Minkowski (pseudo-Euclidean) spacetime with signature -,-,-,+ (to change this default, see Setup), so you obtain the following:
It is sometimes convenient to represent the functional derivative instead of actually computing it. For that purpose, you can either use 'delay evaluation quotes,' or use the inert form %Fundiff. Note that the delay evaluation quotes can be evaluated by simply reexecuting the output, but you must use the value command to evaluate the inert form.
Fundiff knows about the spacetime differentiation operator d_[mu] and the d'Alembertian operation dAlembertian(A[mu,nu](X))
In the following example, the output of Fundiff is expressed as the derivative of a four-dimensional Dirac delta function.
For example, integrate (in four dimensions) the above from -infinity to infinity (see Intc).
This integral can be computed by using the value command.
The derivand passed to Fundiff can be any algebraic expression, including integrals, specifically functionals. Consider, for example, the Action (functional of the physical system) for a one-dimensional oscillator.
The equations of motion for this problem can be derived from this functional by using a variational principle; that is, obtained by computing the functional derivative of this Action with respect to .
As an example of the use of Fundiff in a field model, consider the Lagrangian function for the model in 3+1 spacetime dimensions. For best readability, use the facility for compact display.
The Action for this model is given by:
The field equations satisfied by Phi are given by:
Note that the display above is expressed in terms of , which are not the default differentiation variables, and so the symbol appears explicitly and redundantly in the display. To have the output free of redundancies, when the integral can be computed you can omit the functionality of the differentiation variable and have the output expressed using the integration variables (in this case ):
or else replace by the default differentiation variables (see Setup),
To express the dAlembertian in diff notation, use convert.
Note also that the actual Maple mathematical expression behind this default compact display is the one expected, depending on (see lprint).
Phi(X)^3*lambda-Phi(X)*m^2-Physics:-dAlembertian(Phi(X),[X])
| |
Maxwell equations can also be derived from a variational principle, by taking the functional derivative of the corresponding Action. For that purpose, define the Action for the problem in terms of the 4-vector . Use the redo option of the Define command to erase and write over the previous definition for .
Introduce now the electromagnetic field tensor .
So the action in empty space is given by:
The "equations of motion" (Maxwell equations): use delay evaluation quotes to display the operation before evaluating it.
In order to obtain Maxwell equations, a simplification of the contracted indices is necessary.
General Relativity
When computing functional derivatives in curved spacetimes, the output includes the factor . Set a curved spacetime, for example with an arbitrary metric for which you can use the shortcut syntax
For a true (not relative) tensor, the functional derivative, e.g. of , now includes a factor in the denominator related to the determinant of the metric
Besides the factor in the denominator, related to how the Dirac function appears in the result of functional differentiation (see [2]), the key concepts at play are those of relative scalars and tensors (see Chapter 4 of [3]). The two interrelated Physics:-Library commands are: Library:-GetRelativeWeight, Library:-GetRelativeTerm (related to computing covariant derivatives of relative tensors).