← Background
Background · Variations and Action

What Makes an Action Stationary, and What Happens at a Boundary?

Ordinary calculus finds the point where a function stops changing to first order. The calculus of variations does the same for a whole path or field. The terms left at the boundary are where an atom in a molecule enters.

Prerequisites. Partial derivatives and the chain rule, integration by parts, multiple integrals, Gauss's theorem, complex numbers, and the stationary Schrödinger equation. Section 5 also uses Hermitian operators.

1. Functionals and the First Variation

A functional assigns a number to a function. An example is the integral

J[y]=∫x0x1F(x,y,y′)dx.

Arc length has F=1+y′2. To vary y, replace it by y+ϵη, where η is any smooth function. The first variation is the ordinary derivative with respect to the number ϵ:

  1. J(ϵ)=∫F(x,y+ϵη,y′+ϵη′)dx.
  2. Chain rule at ϵ=0: δJ=dJdϵ|0=∫[∂F∂yη+∂F∂y′η′]dx.
  3. Integrate the second term by parts, with u=∂F/∂y′ and dv=η′dx: ∫∂F∂y′η′dx=[∂F∂y′η]x0x1−∫ddx∂F∂y′ηdx.
  4. Collect: δJ=[∂F∂y′η]x0x1+∫[∂F∂y−ddx∂F∂y′]ηdx.
  5. With fixed end values, η(x0)=η(x1)=0. If δJ=0 for every such η, the bracket under the integral vanishes at every point: if a continuous bracket were positive near some point, choosing η as a positive bump there would make δJ>0, and likewise for a negative one.
Euler–Lagrange equation∂F∂y−ddx∂F∂y′=0.

For arc length, ∂F/∂y=0, so y′/1+y′2 is constant, hence y′ is constant: a straight line.

2. The Action

For a particle, the action is S=∫t1t2L(x,ẋ,t)dt with L=T−V. The Euler–Lagrange equation is ddt∂L∂ẋ=∂L∂x. For L=12ẋ2−12x2 it reads ẍ=−x.

  1. Take x(0)=0 and x(1)=1. The solution is x*=sin⁡t/sin⁡1.
  2. Since ∫ẋ*2=[x*ẋ*]−∫x*ẍ* and ẍ*=−x*, the action is S*=12x*(1)ẋ*(1)=12cot⁡1.
  3. Vary with x=x*+ϵsin⁡πt. The term linear in ϵ vanishes, leaving S(ϵ)=S*+ϵ22∫01(π2cos⁡2πt−sin⁡2πt)dt=S*+(π2−1)ϵ24.
Left: the stationary path (red) and four varied paths. Right: the action. Numerical S*= 0.321046 (exact 0.321046); at ϵ=0.4 numerical 0.675830, formula 0.675830. Here stationary is a minimum because the time interval is shorter than π; for long intervals it need not be.

A stationary solution need not be a minimum: it can be a maximum or a saddle. Nor need it have the symmetry of the problem: a symmetric functional can have solutions that break the symmetry, in sets that the symmetry operations map into one another, and a solution found inside a symmetric trial family may have lower neighbours outside it. The Euler–Lagrange equation alone decides none of this.

3. Fields and the Lagrangian Density

For a field u(𝐫,t) the Lagrangian is an integral of a density, L=∫ℒdV, with S=∫Ldt. The same steps, with Gauss's theorem ∫Ω𝐯⋅∇ηdV=∮∂Ωη𝐯⋅𝐧dS−∫Ωη∇⋅𝐯dV, give, for a variation η of u,

δS=[∫Ω∂ℒ∂(∂tu)ηdV]t1t2+∫dt∮∂Ωη∂ℒ∂(∇u)⋅𝐧dS+∫dt∫Ω[∂ℒ∂u−∂t∂ℒ∂(∂tu)−∇⋅∂ℒ∂(∇u)]ηdV.

With η=0 at the two times and on the wall, only the last term remains, and arbitrary η inside gives

Euler–Lagrange for a field∂ℒ∂u−∂t∂ℒ∂(∂tu)−∇⋅∂ℒ∂(∇u)=0.

Schrödinger's Equation from ℒ

For one electron in atomic units, treat ψ and ψ* as independent:

ℒ=i2(ψ*∂tψ−ψ∂tψ*)−12∇ψ*⋅∇ψ−Vψ*ψ.
  1. Vary ψ*: δS=∫dt∫dV[i2(δψ*∂tψ−ψ∂tδψ*)−12∇δψ*⋅∇ψ−Vψδψ*].
  2. Time, by parts: −i2∫ψ∂tδψ*dt=−i2[ψδψ*]t1t2+i2∫δψ*∂tψdt.
  3. Space, by parts: −12∫Ω∇δψ*⋅∇ψdV=−12∮δψ*∇ψ⋅𝐧dS+12∫Ωδψ*∇2ψdV.
  4. With δψ*=0 at the two times, and over all space with ψ decaying, both boundary terms vanish: δS=∫dt∫dVδψ*[i∂tψ+12∇2ψ−Vψ].
  5. Arbitrary δψ* gives i∂tψ=−12∇2ψ+Vψ. Varying ψ gives the conjugate equation.

4. Natural Boundary Conditions

If an end value is not prescribed, η is free there. Stationarity still forces the integral term to vanish, and then the end term must vanish by itself: ∂F/∂y′=0 at that end. This is a natural boundary condition: the variational problem supplies it.

  1. Take J[u]=∫01(12u′2−u)dx with u(0)=0 and u(1) free.
  2. Euler–Lagrange: −1−u″=0. Natural condition: u′(1)=0.
  3. Solution: u=x−x2/2, with J=∫01[12(1−x)2−x+x2/2]dx=−1/6.
  4. Prescribing u(1)=0 instead gives u=x(1−x)/2 and J=−1/24. Freeing the end lowers the minimum.

For ψ on a fixed region with free wall values, the natural condition from the spatial integration by parts in section 3 is ∇ψ⋅𝐧=0 at every wall point. That is not the zero-flux condition of an atom.

5. An Open Region: Schwinger's Principle and Bader's Atom

Schwinger's principle does not demand δS=0 under all variations. It equates δS to the values of generators of infinitesimal transformations on the boundary of the space-time region. Bader's question was for which regions Ω of real space the principle keeps that form (Bader 1990, chs. 5 and 8; Bader 1994). The steps below treat one electron in a stationary state of energy E, with real parameter ϵ.

An open region is varied twice: the function changes, and the wall that is defined from the function moves.
  1. Stationary Lagrangian of the region: L[ψ,Ω]=∫ΩℒdV with ℒ=−12∇ψ*⋅∇ψ−(V−E)ψ*ψ.
  2. On a solution, (V−E)ψ=12∇2ψ. Using ∇2ρ=ψ*∇2ψ+ψ∇2ψ*+2|∇ψ|2 with ρ=ψ*ψ, the density becomes ℒ=−14∇2ρ.
  3. Total variation, function and wall: δL=(bulk Euler–Lagrange terms)−12∮(δψ*∇ψ+δψ∇ψ*)⋅𝐧dS+∮ℒδhdS, where δh is the outward normal displacement of the wall. The bulk terms vanish on a solution. The second integral is the first-order change of the region: in one dimension ddλ∫ab(λ)fdx=∫ab(λ)∂λfdx+f(b)b′(λ); in three dimensions the end value becomes f times the outward displacement, summed over the wall.
  4. Restrict the regions. Every trial function ψλ, to first order ψ+λ∂λψλ|0, must come with a region Ω(λ) satisfying ∫Ω(λ)∇2ρλdV=0, as a region bounded by a zero-flux surface of its own density does. Here δ denotes the derivative with respect to λ at λ=0, so δρ=ψ*δψ+ψδψ*; E is held fixed.
  5. Differentiate that constraint: ∮∇2ρδhdS+∮∇δρ⋅𝐧dS=0.
  6. So the wall term is ∮ℒδhdS=14∮∇δρ⋅𝐧dS=14∮(ψ*∇δψ+δψ∇ψ*+ψ∇δψ*+δψ*∇ψ)⋅𝐧dS.
  7. Add the term of step 3: δL=−14∮(δψ*∇ψ−ψ∇δψ*)⋅𝐧dS+complex conjugate.
  8. For a transformation generated by a Hermitian Â, δψ=iϵÂψ, the complex-conjugate group of step 7 is 14∮(ψ*∇δψ−δψ∇ψ*)⋅𝐧dS=−ϵ2∮𝐉A⋅𝐧dS, with 𝐉A=12i[ψ*∇(Âψ)−(∇ψ*)Âψ].
Variation of a constrained open region: only generator currents cross the wallδL[ψ,Ω]=−ϵ2∮∂Ω𝐉A⋅𝐧dS+complex conjugate.

What remains is a flux of the generator current through the wall. The terms from the motion of the wall have been absorbed by the constraint. The sufficient condition adopted for an atom is the local one, imposed on each trial density:

Zero-flux boundary condition∇ρ(𝐫)⋅𝐧(𝐫)=0for every point of ∂Ω.
What kind of condition this is It is a constraint on which regions are allowed, not a natural boundary condition produced by free variations. Step 4 uses only the integrated statement ∮∇ρ⋅𝐧dS=0. Surfaces other than interatomic ones can satisfy that integral by cancellation; the pointwise condition is the additional requirement that selects surfaces made of gradient paths. See the commentary on boundary choice and why zero flux. The many-electron and time-dependent forms are in Bader's atoms from Schwinger's action principle.

6. Two Walls Through One Bond Point in LiH

Li H flat plane violet: zero flux both walls pass through the same bond critical point
LiH, restricted Hartree–Fock, def2-TZVP (Cartesian), Li at z=0 and H at z=3.015 bohr. Molecular graph and interatomic surface trace from libqtaim densities; the dashed line is the flat plane at the height of the bond critical point, z= 1.3461.

By Gauss's theorem the net Lagrangian of any region is a wall integral, L(Ω)=−14∮∇ρ⋅𝐧dS. For the half space below the plane z=c this is −14∫∂zρdxdy, evaluated here by quadrature of the libqtaim gradient.

Most planes carry a nonzero net flux. Isolated heights give zero net flux while the flux at individual points does not vanish.
Region, net L, and the gross flux obtained by integrating the absolute value of the wall integrand (hartree). As computed.
RegionL(Ω)gross flux
below the plane through the bond point−0.0435930.043594
below a net-zero plane, c = −0.00061.6 × 10−140.0391
below a net-zero plane, c = 1.1002−8.5 × 10−160.0560
below a net-zero plane, c = 2.9379−2.5 × 10−150.0275
zero-flux Li atom, angular grid (48, 96)3.0 × 10−5not computed
zero-flux Li atom, angular grid (144, 288)2.9 × 10−5not computed

On an exact zero-flux surface the wall integrand vanishes by definition.

The two zero-flux atoms from the libqtaim basin integrator on four angular grids (polar, azimuthal counts), as computed.
GridN(Li)N(H)sum minus 4L(Li)L(H)
(48, 96)2.102491.903325.8 × 10−33.0 × 10−5−1.5 × 10−3
(72, 144)2.102491.89533−2.2 × 10−32.9 × 10−54.8 × 10−4
(96, 192)2.102491.89749−2.0 × 10−52.9 × 10−51.5 × 10−5
(144, 288)2.102491.900032.5 × 10−32.9 × 10−5−6.5 × 10−4
  1. N(Li) agrees on all four grids to five decimals. Agreement between angular grids measures consistency, not accuracy: L(Li) stays near 3 × 10−5 on every grid, a residual that angular refinement does not remove. N(H) does not settle as the angular grid is refined: it ranges from 1.8953 to 1.9033, and the sum rule and L(H) move with it. That spread is the quadrature uncertainty of the hydrogen basin here, and no grid is singled out. The radial rule of this integrator is adaptive, so only the two angular counts are varied.
  2. The plane-wall integral through the bond point is −0.04359327, and −0.04359327 with twice the radial points.
  3. A vanishing net flux therefore does not by itself identify an atom. The zero-flux surface makes the integrand vanish at every point.

7. Exercises

  1. Find the Euler–Lagrange equation of F=12y′2+12k2y2.
    Answer

    y″=k2y.

  2. Show that if F has no explicit x, then F−y′∂F/∂y′ is constant on a solution.
    Answer

    Its derivative is y′[∂F/∂y−ddx∂F/∂y′]=0.

  3. What is the natural condition for J=∫0112u′2dx+12hu(1)2?
    Answer

    The end term is [u′(1)+hu(1)]η(1), so u′(1)+hu(1)=0.

  4. For Â=1, what does the boxed variation of section 5 give?
    Answer

    𝐉A is the probability current. In a stationary state it is divergence free, so its net flux through a closed wall vanishes and δL=0 under a global phase change, which leaves ℒ unchanged.

References

Comments, questions or contributions? Please open an issue or a pull request on GitHub.