Replace by , with vanishing on the boundary, and differentiate the action at zero. Integrate the derivative of by parts:
The coefficient of is the functional derivative .
For the electromagnetic action, . Antisymmetry combines these terms and integration by parts gives
Thus the inhomogeneous Maxwell equations are . The definition of also gives the homogeneous equations , equivalently . These are the two four-vector Maxwell systems.
Unrestricted variation of the alternative component-gradient action instead gives . This is equivalent to the first Maxwell system only when supplemented by the Lorenz gauge , because
The alternative action is not by itself gauge-invariant; the additional condition must be supplied consistently, not silently omitted.
Expand the tensor square: . Hence
Integrating this cross term by parts twice expresses its integral as a boundary term plus . Under Lorenz gauge it is therefore purely a boundary term. With fixed or vanishing boundary contributions, the two actions have the same variational equations once the additional gauge condition is included. This is the Lorenz-gauge reduction of the electromagnetic action.