Practically, every fundamental equation in physics can be found with the support of a variational principle, taking appropriate Lagrangian or action in different cases.
Hamilton's variational principle asserts that Lagrange's equation of motion. δS = 0 ⇒ extremization of S ⇔ equations of motion. Here, boundary conditions are provided externally. This can be generalized from Newtonian mechanics to classical field theory as in Maxwell's electrodynamics or Einstein's general relativity.
Here, the action functional is given by
Here, the integration is over a specific path of the generalized coordinates q(t). For a variation δq(t) of this path, δq(t1) = δq(t2) = 0:
Extremization of the action function ⇒ δS = 0, i.e.,
which is Euler–Lagrangian equation for a one-dimensional mechanical system.
Here, we are interested in the dynamics of a field q(xα) in curved spacetime.
Let us consider an arbitrary region W of the spacetime manifold, bounded by a closed hypersurface 𝜕W. The Lagrangian L.q, q,α) depends on a scalar function of the field and its first derivative.
Thus, action function is given by
The variation of q is arbitrary within W but vanishes on 𝜕W, [δq]𝜕W = 0.
(by Gauss divergence theorem)
Thus, using [δq]𝜕W = 0 we get
which is Euler–Lagrange equation for a single scalar field q.
Examples of Lagrangian for some fields
(a) A scalar field ψ
This can represent, e.g., the π0 meson. The Lagrangian
Euler–Lagrange equations are
This is Klein–Gordon equation in curved space.
A charged scalar field Ψ
Here Ψ = Ψ1 + iΨ2, which could represent, e.g., π+ and π- meson.
The total Lagrangian of the scalar field and electromagnetic field is
e → constant,
is complex conjugate of Ψ.
Varying Ψ, and Aa independently, one obtains the following Euler–Lagrange equations
its conjugate, and
In general relativity, the action functional consists of two different entities namely, SG[g] from gravitational field gab and SM[ϕ, g] from matter distribution.