Lesson 20: Constructing a Field Theory from a Lagrangian
In the preceding lessons the Lagrangian and Hamiltonian formalisms were developed for systems possessing a finite number of degrees of freedom. The configuration of such a system at any instant is a point in a finite-dimensional manifold, and the dynamics are completely determined by a single function of the coordinates, velocities, and time. Many of the most important physical systems, however, are not of this kind. The electromagnetic field, the displacement field of an elastic solid, and the wave function of a quantum particle all require infinitely many degrees of freedom, where, at each event in spacetime, one must specify the value of one or more field variables. The purpose of the present lesson is to show how the Lagrangian apparatus already in hand extends, with only modest changes of language, to this continuum setting.
The central idea is simple. One begins with a discrete mechanical system whose Lagrangian is known, then imagines the number of degrees of freedom becoming larger and larger while the spacing between them becomes smaller and smaller. In the limit the discrete coordinates are replaced by a continuous field, the ordinary Lagrangian is replaced by an integral of a Lagrangian density, and the Euler–Lagrange equations become partial differential equations. Once that limit has been taken, the same variational principles, the same Noether correspondence between symmetries and conservation laws, and the same geometric language of configuration space and phase space continue to apply; only the dimension of the space has become infinite.
The sections that follow carry out this program in detail. We begin by extending a discrete system to a continuous one, thereby motivating the passage from a Lagrangian to a Lagrangian density. Classical field theory is then formulated in its own right, with the action principle written as an integral over a spacetime region. Two brief mathematical interludes introduce the d’Alembertian operator and the notion of a variational derivative, tools that make the subsequent calculations transparent. With these instruments in hand we return to the field equations, examine how coordinates and fields transform, and isolate the condition of invariance. The variation of the Lagrangian density under an infinitesimal transformation is computed, Noether’s theorem is stated for fields, and the associated conserved current is extracted. The lesson closes with a practical demonstration of how the entire apparatus is implemented in Mathematica.
Throughout, the emphasis remains on the geometric and variational ideas already familiar from finite-dimensional mechanics. The continuum limit does not replace those ideas; it merely supplies them with a larger arena in which to operate.
Extending a Discrete System to a Continuous System
Consider a chain of n particles, each of mass m, connected to its neighbors by identical springs of constant κ and unstretched length ℓ. Label the longitudinal displacement of the ith particle from its equilibrium position by
. The ends of the chain are held fixed, so the boundary conditions are
and
Figure 20.1: Discrete chain. Particles of mass $m$ are joined by springs of constant and unstretched length ℓ; the ends are held fixed.
The total kinetic energy is simply the sum of the individual contributions,
(20.1
Exercise 20.1: Explain why the kinetic-energy sum may be extended from n to n+1.
The potential energy stored in the spring that joins particle i-1 to particle i is
(20.2)
and the total potential energy of the chain is the sum of these terms. The Lagrangian of the discrete system is therefore
(20.3)
The Euler–Lagrange equation for each interior coordinate yields the familiar nearest-neighbor difference equation
(20.4)
Exercise 20.2: Derive the difference equation of motion from the discrete Lagrangian, showing each intermediate step.
To pass to the continuum, assign each spring a uniform cross-sectional area A, so that the volume of a single spring is
. The mass density of the material is then
. The spring constant may be expressed in terms of Young’s modulus ε,
(20.5)
Substitution converts the discrete Lagrangian into a sum over volume elements,
(20.6)
In the limit n->∞, ℓ->0 the sum becomes an integral over the volume of the string and the discrete index i is replaced by the continuous coordinate x. The integrand is the Lagrangian density
(20.7)
so that
(20.8)
The Euler–Lagrange equation derived from this density is the wave equation
(20.9)
The coordinate x is no longer a dynamical variable; it has become a continuous label that replaces the discrete particle index.
Figure 20.2: Continuum limit. As the number of particles tends to infinity and the spacing tends to zero, the discrete chain becomes a continuous string whose motion is governed by the wave equation.
A New Look at Classical Field Theory
The fields encountered so far fall into three broad classes. A scalar field assigns a single number to each event; the mass density
is an example. A vector field assigns a directed quantity; the velocity field
is an example. A tensor field assigns a multilinear object; the strain tensor
is an example. It is convenient to treat all of them on the same footing by collecting their independent components into a single list
. In this notation one may write, for instance,
(20.10)
Each
is simply called a field component.
Figure 20.3: Scalar, vector, and tensor fields are collected into a single list of components
so that a Lagrangian density may be written uniformly for all of them.
A classical field theory is completely specified once a function of these components and their derivatives is given. That function is the Lagrangian density already introduced in the continuum limit,
(20.11)
The action whose stationary value determines the dynamics is the integral of the density over a spacetime region,
(20.12)
The Euler–Lagrange equations that follow from δ S=0 are partial differential equations for the field components
.
As a concrete illustration consider a single scalar field φ(x). Before the Lagrangian density for this field can be written, a modest enlargement of notation is required.
Figure 20.4: Action for a field. The dynamics are obtained by requiring the integral of the Lagrangian density over a spacetime region to be stationary.
Mathematical Interlude: The d’Alembertian Operator
The operator that plays the same role in Minkowski spacetime that the Laplacian plays in ordinary three-dimensional space is the d’Alembertian. In a local inertial frame it is written
(20.13)
(The signature of
is the one already adopted in the course.) The operator is applied to whatever scalar, vector, or tensor field follows it.
For the continuous string examined in the preceding section the wave equation becomes, after the identification
),
(20.14)
Thus the d’Alembertian converts the second-order system of ordinary differential equations that governed the discrete chain into a single covariant partial differential equation for the continuum field.
Exercise 20.3. Verify that the wave equation for the continuous string is identical to □ q=0 once the wave speed is expressed in terms of the material constants.
Figure 20.5: The d’Alembertian. The operator
reduces in an inertial frame to the familiar wave operator; applied to the displacement field it yields the continuum wave equation.
Returning to Classical Fields
If the scalar field carries a mass parameter m, the simplest Lorentz-invariant Lagrangian density that is at most quadratic in the field and its first derivatives is
(20.15)
In an inertial frame this expands to
(20.16)
The constant m has the dimension of inverse length. The density is a Lorentz scalar by construction, and it is the unique choice of this degree of complexity that yields a linear field equation. More elaborate theories may require far more complicated densities; the sole criterion is that the resulting equations correctly describe the phenomena under study. When Lorentz invariance is not required, the density need not be a scalar.
The dynamics follow from the requirement that the action
(20.17)
be stationary under an arbitrary variation
that is differentiable and vanishes outside a bounded region. Expanding the variation and integrating by parts produces
(20.18)
Because the variation is arbitrary, the coefficient of
must vanish, yielding the Euler–Lagrange equation
(20.19)
(20.20)
and
(20.21)
and the field equation becomes the Klein–Gordon equation
(20.22)
Figure 20.6: Massive scalar field. Stationarity of the action constructed from the Lorentz-invariant density yields the Klein–Gordon equation.
Exercise 20.4. Verify that the given density is a Lorentz scalar and that its Euler–Lagrange equation is the Klein–Gordon equation.
Exercise 20.5. Carry out the integration by parts that converts the variation of the action into the Euler–Lagrange form.
An external disturbance is incorporated by adding a source term S(x) that does not depend on the field,
(20.23)
Variation with respect to φ (but not with respect to S) then replaces the homogeneous Klein–Gordon equation by the inhomogeneous equation
(20.24)
When the source is sinusoidal the equation is sometimes called the sine-Gordon equation.
The same density supplies a candidate energy density and energy current. In an inertial frame one may read off
(20.25)
and
(20.26)
Their four-divergence reduces, on shell, to
(20.27)
If the source is independent of time the divergence vanishes identically. Gauss’s theorem then implies that the total energy contained in any large volume is constant, provided the field falls off sufficiently rapidly at spatial infinity. In this situation
is the energy density and E is the energy flux: the rate of change of energy inside a volume equals the net flux through its boundary.
Figure 20.7: Energy balance. When the external source is independent of time the divergence of the energy current vanishes, so the total energy inside any large volume is constant.
Exercise 20.6. Show that the four-divergence of the energy current reduces to
when the field equation is used.
More generally, any vector field
that satisfies
defines a conserved charge
(20.28)
The integral may be rewritten as a surface integral over an arbitrary spacelike hypersurface,
(20.29)
showing that Q is a Lorentz scalar. An analogous construction applied to a conserved tensor current of rank N yields a charge that transforms as a tensor of rank N-1.
Exercise 20.7. Rewrite the surface element
in terms of the parametrization of an arbitrary hypersurface and confirm that Q is independent of that choice.
Finally, the canonical stress-energy tensor of any field theory is obtained by the same variational procedure. Given a Lagrangian density that may depend explicitly on the coordinates through an external source, we then write
(20.30)
Its divergence vanishes whenever the fields satisfy their Euler–Lagrange equations, recovering the local conservation of four-momentum already established in Lesson 12.
Exercise 20.8. Prove that the charges computed by two observers on their respective constant-time slices are equal.
Exercise 20.9. Expand the total derivative of the Lagrangian density and identify the terms that cancel when the Euler–Lagrange equation holds.
Exercise 20.10. Complete the demonstration that
is on shell.
Figure 20.8: Conserved charge. A divergenceless current defines a scalar charge that may be computed on any spacelike hypersurface.
Mathematical Interlude: Variational Derivatives
Given a Lagrangian density L that depends on the field components
and their derivatives, the action is the integral
(20.31)
An arbitrary variation of the fields produces a corresponding variation of the action that can be written
(20.32)
The coefficient of the arbitrary variation
is called the variational derivative of the action with respect to the field.
Figure 20.9: Variational derivative. The coefficient of an arbitrary field variation in the change of the action is the variational derivative; its vanishing is the field equation.
When the Lagrangian density depends on the field and its first and higher derivatives, the variational derivative is given by the Euler–Lagrange expression
(20.33)
Stationarity of the action then requires that the variational derivative itself vanish,
(20.34)
This is simply the field equation written in a compact notation that makes the parallel with ordinary mechanics transparent.
The existence of a variational principle of this form is the setting in which Noether’s theorem operates. As we have already discussed, Emmy Noether (1882–1935) completed the theorem in 1915; it establishes the precise correspondence between continuous symmetries of the action and conserved currents of the field theory. The variational derivative is the technical instrument that converts a symmetry of L into a divergenceless current.
Figure 20.10: Noether’s theorem. Continuous symmetries of the action are in one-to-one correspondence with conserved currents; the variational derivative is the tool that extracts the current.
Transformations of the Coordinates and Fields
A continuous transformation that carries one frame into another depends on a continuous parameter ε whose concrete meaning is fixed by the problem at hand. The transformed coordinates and the transformed field components are given by a pair of invertible functions
(20.35)
This is simply the field equation written in a compact notation that makes the parallel with ordinary mechanics transparent.
This is simply the field equation written in a compact notation that makes the parallel with ordinary mechanics transparent.
This is simply the field equation written in a compact notation that makes the parallel with ordinary mechanics transparent.
and
(20.36)
When the parameter vanishes both maps reduce to the identity,
(20.37)
and
(20.38)
Figure 20.11: Continuous transformation. Coordinates and field components are mapped by a pair of invertible functions that depend on a continuous parameter ε and reduce to the identity when ε=0.
A simple illustration is a planar rotation through an angle θ. The coordinate transformation is
(20.39)
while a two-component field transforms by the same rotation matrix,
(20.40)
The same pattern applies to any continuous family of transformations: the finite maps are determined by the infinitesimal generators obtained by differentiating with respect to the parameter at ε=0.
Figure 20.12: Planar rotation. Both the coordinates and a two-component field are rotated through the same angle θ.
Invariance
The action constructed from a Lagrangian density is
(20.41)
The same density may be used to form the action in the transformed coordinates and fields,
(20.42)
The action is said to be invariant under the continuous family of transformations if
(20.43)
for every value of the parameter ε and for every field configuration. Equivalently, the derivative of the transformed action with respect to the parameter must vanish,
(20.44)
Exercise 20.11. Show that invariance of the action is equivalent to the vanishing of dA'/dε, and that a pure divergence variation of the Lagrangian density is sufficient to guarantee this vanishing.
Figure 20.13: Invariance of the action. The numerical value of the action is the same in every frame related by the continuous family of transformations parametrized by ε.
An infinitesimal change in the parameter therefore produces
(20.45)
where the variation of the density is
(20.46)
A sufficient condition for this integral to vanish for arbitrary field configurations is that the variation of the density itself be a pure divergence,
(20.47)
for some vector density
. In that case the integral of δL reduces to a surface term that vanishes when the fields fall off sufficiently rapidly at the boundary of the region of integration.
Figure 20.13: Pure divergence. A variation of the Lagrangian density that is the four-divergence of a vector density integrates to a surface term and therefore leaves the action invariant.
The Variation of the Lagrangian Density
In many applications the vector density that appears in the pure-divergence condition takes the simple form
(20.48)
It is useful to distinguish the Lagrangian density evaluated on the transformed fields from the density evaluated on the original fields. Write
(20.49)
If these two functions are related by the Jacobian of the coordinate transformation,
(20.50)
the Lagrangian density is said to transform as a scalar density. The determinant factor is frequently equal to unity, in which case the density itself is a scalar.
Figure 20.14: Scalar density. The transformed Lagrangian density differs from the original density only by the Jacobian determinant of the coordinate transformation.
Figure 20.15: Simple pure divergence. When the density transforms as a scalar density, the variation δ L reduces to the four-divergence of
.
Exercise 20.12. For the planar rotation of the section Transformations of the Coordinates and Fields, verify that the Lagrangian density transforms as a scalar density.
Exercise 20.13. Compare the transformed action A'(ε) with the original action A. Show by a change of integration variable that their difference vanishes when the density transforms as a scalar density.
Exercise 20.14. Differentiate the scalar-density relation with respect to the parameter ε, holding the original coordinates fixed, and recover the pure-divergence expression for δ L.
Noether’s Theorem
Assume that the Lagrangian density transforms as a scalar density under a continuous family of transformations. The variation of the density may then be rearranged into the four-divergence of a current plus a term proportional to the variational derivative of the action,
(20.51)
The current itself is given by
(20.52)
Whenever the fields satisfy their field equations the variational derivative vanishes, and the current is divergenceless, giving us the familiar condition
(20.53)
This is Noether’s theorem: every continuous symmetry of the action that leaves the Lagrangian density a scalar density produces a conserved current.
Figure 20.16: Noether current. The variation of a scalar-density Lagrangian rearranges into the four-divergence of a current plus a term that vanishes on shell.
Figure 20.17: Conservation on shell. When the field equations hold, the Noether current is divergenceless and the associated charge is constant in time.
Calculating the Current
In the great majority of applications the Lagrangian density transforms as a scalar density, so that the pure-divergence condition is satisfied. Moreover, the density ordinarily depends on the fields and their first derivatives alone. Under these restrictions the general expression for the Noether current collapses to
(20.54)
The field variation
is determined by the transformation laws for the coordinates and the fields. It is convenient to evaluate the current at the identity value ε=0, where the transformations reduce to the identity maps. Differentiating those maps with respect to the parameter and then setting the parameter to zero yields the explicit formula
(20.55)
(The derivatives with respect to ε are understood to be evaluated at ε=0.)
Exercise 20.15. Starting from the simplified current and substituting the infinitesimal forms of the coordinate and field transformations, derive the explicit expression above.
Figure 20.18: Simplified Noether current. When the Lagrangian depends only on first derivatives and transforms as a scalar density, the current reduces to a compact expression involving L and the first variational derivative of the fields.
Figure 20.19: Evaluation at the identity. The current is computed by differentiating the finite transformation laws with respect to the parameter and then setting the parameter to zero.
Doing This Stuff in Mathematica
There are built-in variational method that we can use in Mathematica, but since we are working in spacetime they do not work. To proceed we must load up xAct.
Since we will need to vary the scalar field configuration, we also load up the perturbative package from xAct, called xPert.
We introduce a notation that will make some expressions readable to human beings.
Then we define our spacetime manifold and the indices that we will set aside for out field equations.
We then define our symbols for the metric and the covariant derivatives, along with how these will be displayed.
We next write out how the system will deal with perturbations of the metric.
We also define how the system will display the perturbed metric.
How does this work, here is an example of a first-order perturbation of the metric.
This is the symbol for a perturbation. We can see what it actually means by expanding the perturbation.
Not very impressive. Let’s say that for some unknown reason we need to display the metric perturbation to third order.
If we have an inverse metric, then we need to expand this.
We now define our field configuration.
We explain to Mathematica how to perturb the field.
Since it is a massive field, and the mass is constant, then we need to tell Mathematica it is a constant. If you do not do this you will get bizarre variational derivatives of the field with respect to the variation of the mass.
We write the Lagrangian from (1).
We now vary the Lagrangian.
We expand the variation.
We apply metric contractions.
We enforce symmetries.
We take the variational derivative of the Lagrangian with respect to the field variations.
We enforce the Kronecker deltas.
And now we have the equations of motion for our massive scalar field.
We can now add a source term.
Since the variation of the field has no effect on the source term, we will identify it as a constant for the purposes of the variational approach.
We then write the new Lagrangian.
We now vary the Lagrangian.
We take the variational derivative of the Lagrangian with respect to the field variations.
And now we have the sine-Gordon equation.
Further Reading
Kip S. Thorne, Roger D. Blandford, (2017), Modern Classical Physics, Princeton University Press
George E. Hrabovsky, (2023), Deriving a Field Theory from a Lagrangian, Midwest Relativity Meeting, University of Chicago, IL
Davison E. Soper, (1975), Classical Field Theory, Dover version published in 2008.