Gauge Freedom of the Lagrangian

Grade a stack of mechanics homework and you will eventually meet the puzzle that motivates this page: two students write down different Lagrangians for the same system — their expressions disagree by a strange term like b xx˙b\,x\dot x — yet both crank the Euler–Lagrange machinery and land on the identical, correct equation of motion. Neither made an error. The Lagrangian is simply not unique: you may add to any LL the total time derivative of an arbitrary function F(q,t)F(q,t) of coordinates and time, and no trajectory anywhere in the universe will notice. The mechanism is disarmingly simple. The action is the time integral of LL, so the added term integrates to F(end)−F(start)F(\text{end}) - F(\text{start}) — a surcharge levied identically on every candidate path, because Hamilton's principle compares only paths with the same fixed endpoints. Shift every competitor's score by the same amount and the winner cannot change. What does change is the bookkeeping: canonical momenta pick up ∂F/∂qi\partial F/\partial q_i, and the energy function shifts by −∂F/∂t-\partial F/\partial t. Far from being a defect, this "gauge freedom" is load-bearing. It is the exact classical shadow of electromagnetic gauge invariance — transforming the potentials (ϕ,A)(\phi, \mathbf{A}) changes the particle's LL by precisely a total derivative. It is the loophole through which Noether's theorem handles Galilean boosts, which change LL yet still deliver a conservation law: the uniform motion of the center of mass. And it is the freedom Landau exploits, famously, to derive 12mv2\tfrac12 mv^2 from symmetry alone.

Key takeaways
  • Adding the total time derivative of any function F(q,t)F(q,t) to a Lagrangian, L→L+dFdtL \to L + \frac{\mathrm{d}F}{\mathrm{d}t}, leaves the Euler–Lagrange equations completely unchanged — the two Lagrangians are physically equivalent.
  • The reason is geometric: the action changes only by the endpoint terms F(q2,t2)−F(q1,t1)F(q_2,t_2)-F(q_1,t_1), the same for every path in Hamilton's fixed-endpoint competition, so the stationary path cannot move.
  • The freedom is exactly the set F(q,t)F(q,t): a velocity-linear addition ∑iai q˙i+b\sum_i a_i\,\dot q_i + b is harmless if and only if its "curl" ∂jai−∂iaj\partial_j a_i - \partial_i a_j vanishes and ∂tai=∂ib\partial_t a_i = \partial_i b — otherwise it acts like a magnetic force and changes the dynamics.
  • Bookkeeping shifts: pi→pi+∂F/∂qip_i \to p_i + \partial F/\partial q_i and h→h−∂F/∂th \to h - \partial F/\partial t; trajectories, forces, and periods do not.
  • Electromagnetic gauge transformations change the particle Lagrangian by exactly ddt(qeχ)\frac{\mathrm{d}}{\mathrm{d}t}(q_e\chi); Galilean boosts change it by ddt(εMXcm)\frac{\mathrm{d}}{\mathrm{d}t}(\varepsilon M X_{\mathrm{cm}}) — and quasi-invariant Noether still pays out the conserved charge Pt−MXcmPt - MX_{\mathrm{cm}}.
  • Key idea: two Lagrangians that differ by the total time derivative of a function F(q,t)F(q,t) of coordinates and time give identical equations of motion, because the action changes only by fixed endpoint terms that vanish under the variation in Hamilton's principle.

Where this lives today

Every effective-field-theory paper written in 2026 exercises this page's freedom on an industrial scale. When theorists count the independent operators of the Standard Model EFT — the basis in which LHC precision measurements are reported — they systematically discard total derivatives and use integration-by-parts identities to shrink thousands of candidate operators to the canonical 59 dimension-six structures: that reduction is L→L+dF/dtL \to L + \mathrm{d}F/\mathrm{d}t, promoted to four spacetime dimensions. The famous quantum exception proves the rule: topological θ\theta-terms are total derivatives too, yet in theories with nontrivial field topology they contribute through boundary effects (instantons, the strong CP problem) that classical equations of motion never see — this page's boundary-versus-bulk logic operating at the frontier of particle physics. Closer to mechanics, the momentum shift (5) runs daily inside quantum devices: in a magnetic field the canonical momentum becomes the gauge-covariant derivative, and choosing Landau versus symmetric gauge — the second worked example — is a genuine practical decision in every quantum-Hall and cold-atom calculation, changing intermediate expressions while leaving spectra and currents fixed. And in numerical mechanics, variational integrators are classified up to exactly the discrete version of this freedom: discrete Lagrangians differing by boundary functions F(qk)F(q_k) generate identical update maps.

The physical picture

Think of the action as a cost assigned to each candidate path between two fixed events. Adding dFdt\frac{\mathrm{d}F}{\mathrm{d}t} to the Lagrangian adds F(end)−F(start)F(\text{end}) - F(\text{start}) to every path's bill — the same surcharge for all, because all competitors share the endpoints. A race in which every runner's time is increased by exactly ten seconds has the same winner. The stationary path, and with it every equation of motion, is untouchable.

Figure
Every path pays the same surcharge - the stationary path cannot move
action of L q₁, t₁ q₂, t₂ S = 12.0 (stationary) S = 12.7 S = 12.4 add dF/dt: every path +ΔF action of L + dF/dt q₁, t₁ q₂, t₂ S = 12.0 + ΔF (still stationary) S = 12.7 + ΔF S = 12.4 + ΔF ΔF = F(q₂,t₂) − F(q₁,t₁) depends only on the shared endpoints — a common surcharge on every competitor

A useful first analogy: this is the grown-up version of choosing the zero of potential energy. Shifting V→V+cV \to V + c changes LL by a constant — the special case F=−ctF = -ct — and no experiment can detect the choice. Gauge freedom generalizes the recalibration from one constant to an entire function of position and time; the price is that the split of the canonical momentum into pieces becomes a matter of convention, the way "sea level" versus "lab bench" is a convention about zeros, not about the mountain. The crucial distinction to install early: this is a redundancy, not a symmetry. A genuine symmetry transforms the variables while leaving LL itself invariant — rotate a central-force problem and the Lagrangian reads the same. Gauge freedom does the opposite: it changes LL explicitly while leaving the dynamics fixed. Keeping the two notions separate pays off below, where we meet transformations — Galilean boosts — that are almost symmetries: they change LL, but only by a total derivative, and Noether's theorem still rewards them with a conservation law. And note the deeper pattern: total time derivatives are the "boundary terms" of mechanics — they see only the endpoints of a motion, while equations of motion are bulk statements enforced instant by instant in the interior. Boundary information cannot dictate bulk physics; that one sentence is the entire theorem.

The transformation and what it does to the ledger

The freedom, stated precisely: given any Lagrangian LL and any differentiable function FF of the generalized coordinates and time — not the velocities — define

L′(q,q˙,t)=L(q,q˙,t)+ddtF(q,t)(1)L'(q,\dot q,t) = L(q,\dot q,t) + \frac{\mathrm{d}}{\mathrm{d}t}F(q,t) \qquad (1)

where: q=(q1,…,qn)q = (q_1,\dots,q_n) — generalized coordinates; F(q,t)F(q,t) — the gauge function, chosen freely. Note what is being transformed — not the coordinates, not the trajectory, but the Lagrangian itself. Along a trajectory the chain rule gives

dFdt=∑i=1n∂F∂qi q˙i+∂F∂t(2)\frac{\mathrm{d}F}{\mathrm{d}t} = \sum_{i=1}^{n}\frac{\partial F}{\partial q_i}\,\dot q_i + \frac{\partial F}{\partial t} \qquad (2)

where: the first piece is linear in the velocities, the second carries the explicit time dependence. Because FF has no velocity dependence, no acceleration appears: L′L' remains an ordinary first-order Lagrangian. This innocuous observation is where the restriction to F(q,t)F(q,t) earns its keep, as Derivation C makes sharp. Integrating (1) between fixed times turns the added term into pure boundary data,

S′=∫t1t2L′ dt=S+F(q(t2),t2)−F(q(t1),t1),(3)S' = \int_{t_1}^{t_2} L'\,\mathrm{d}t = S + F\big(q(t_2),t_2\big) - F\big(q(t_1),t_1\big), \qquad (3)

where: S,S′S, S' — the actions of the same path under the two Lagrangians. Every path in Hamilton's competition shares q(t1)q(t_1) and q(t2)q(t_2), so the two FF terms are identical numbers for all competitors, and varying with δq(t1)=δq(t2)=0\delta q(t_1) = \delta q(t_2) = 0 gives

δS′=δS(4)\delta S' = \delta S \qquad (4)

where: δ\delta — the first variation over fixed-endpoint deformations. Same variation, same stationary path, same Euler–Lagrange equations. That is the whole variational argument — three lines. The operator-level proof, needing no action at all, is Derivation A. The dynamics are blind to the gauge choice, but two famous bookkeeping quantities are not. Differentiating (2) with respect to q˙i\dot q_i, the canonical momentum shifts:

pi′=∂L′∂q˙i=pi+∂F∂qi(5)p_i' = \frac{\partial L'}{\partial \dot q_i} = p_i + \frac{\partial F}{\partial q_i} \qquad (5)

where: the shift is a pure function of position and time — at any instant the two momenta differ by an amount fixed by where the particle is, not how it moves. Conserved momenta of cyclic coordinates remain conserved, but their numerical values are gauge-dependent — the worked examples make this embarrassingly concrete. The energy function h=∑iq˙i ∂L/∂q˙i−Lh = \sum_i \dot q_i\,\partial L/\partial\dot q_i - L shifts only through the explicit time dependence of FF: inserting L′L' into the definition, the velocity-linear pieces enter the momentum sum and −L′-L' with equal size and opposite sign, cancelling exactly, leaving

h′=h−∂F∂t(6)h' = h - \frac{\partial F}{\partial t} \qquad (6)

where: the useful special case is immediate — a time-independent gauge function F(q)F(q) recalibrates every momentum yet leaves the energy function untouched. When you want to tidy a Lagrangian without disturbing the energy ledger, reach for F(q)F(q).

Derivation AThe Euler-Lagrange operator annihilates every total time derivative

We prove the invariance at the level of the equations of motion themselves, with no appeal to the action: applying the Euler–Lagrange operator E^i[ ⋅ ]=ddt∂∂q˙i−∂∂qi\hat E_i[\,\cdot\,] = \frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial}{\partial \dot q_i} - \frac{\partial}{\partial q_i} to G≡dFdtG \equiv \frac{\mathrm{d}F}{\mathrm{d}t} must give identically zero, for every F(q,t)F(q,t) and every trajectory. The strategy is direct computation on the explicit form (2); the entire result will hinge on one classical fact of multivariable calculus — the symmetry of mixed partial derivatives. Watch how the operator's two halves produce the same pair of second-derivative expressions, so the subtraction is a perfect cancellation rather than an approximate one.

Step 1. Momentum part. Since G=∑j(∂F/∂qj) q˙j+∂F/∂tG = \sum_j (\partial F/\partial q_j)\,\dot q_j + \partial F/\partial t and only the first sum contains velocities,

∂G∂q˙i=∂F∂qi\frac{\partial G}{\partial \dot q_i} = \frac{\partial F}{\partial q_i}

Why this is the key structural fact: the velocity dependence of a total derivative is purely linear, with coefficients depending on (q,t)(q,t) alone — total derivatives can never bend the momentum's dependence on velocity, only shift it.

Step 2. Its total time derivative along the trajectory, treating ∂F/∂qi\partial F/\partial q_i as a function of (q,t)(q,t):

ddt∂G∂q˙i=∑j∂2F∂qj ∂qi q˙j+∂2F∂t ∂qi\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial G}{\partial \dot q_i} = \sum_j \frac{\partial^2 F}{\partial q_j\,\partial q_i}\,\dot q_j + \frac{\partial^2 F}{\partial t\,\partial q_i}

Step 3. Coordinate part, differentiating GG with respect to qiq_i at fixed q˙\dot q and tt:

∂G∂qi=∑j∂2F∂qi ∂qj q˙j+∂2F∂qi ∂t\frac{\partial G}{\partial q_i} = \sum_j \frac{\partial^2 F}{\partial q_i\,\partial q_j}\,\dot q_j + \frac{\partial^2 F}{\partial q_i\,\partial t}

Why the two expressions look like twins: both probe the same second derivatives of FF, with the differentiation orders swapped. Everything now rests on whether the order matters.

Step 4. Subtract:

E^i[G]=∑j(∂2F∂qj ∂qi−∂2F∂qi ∂qj)q˙j+∂2F∂t ∂qi−∂2F∂qi ∂t=0\hat E_i[G] = \sum_j\Big(\frac{\partial^2 F}{\partial q_j\,\partial q_i} - \frac{\partial^2 F}{\partial q_i\,\partial q_j}\Big)\dot q_j + \frac{\partial^2 F}{\partial t\,\partial q_i} - \frac{\partial^2 F}{\partial q_i\,\partial t} = 0

Every bracket vanishes by the equality of mixed partials (Clairaut–Schwarz). Since E^i\hat E_i is linear, E^i[L′]=E^i[L]\hat E_i[L'] = \hat E_i[L]: the two Lagrangians generate the same equations of motion, term by term, trajectory by trajectory. Note: the identity holds off-shell — no equation of motion was used, so it is a property of the operator, not of any particular system.

Seeing the machinery run once on the simplest possible system converts the theorem from algebra into instinct.

Go deeper · Derivation B · 1 minTwo equivalent Lagrangians for a free particle
Derivation BTwo equivalent Lagrangians for a free particle

The goal is an explicit, fully computed example: start from the free-particle Lagrangian L=12mx˙2L = \tfrac12 m\dot x^2, gauge-transform with F=12bx2F = \tfrac12 b x^2 (any constant bb), and confirm by direct differentiation that the transformed Lagrangian — which looks like it contains new physics, a position–velocity coupling — delivers exactly x¨=0\ddot x = 0. The point to watch is the mechanism of the cancellation: the new term feeds identical contributions into both halves of the Euler–Lagrange operator, and the momentum shift (5) appears on cue.

Step 1. Compute the gauge term. With F=12bx2F = \tfrac12 b x^2,

dFdt=b x x˙⟹L′=12mx˙2+b x x˙\frac{\mathrm{d}F}{\mathrm{d}t} = b\,x\,\dot x \qquad\Longrightarrow\qquad L' = \tfrac12 m\dot x^2 + b\,x\,\dot x

Why this example is chosen: b xx˙b\,x\dot x is the classic "suspicious cross term" — students meet it in disguises from oscillator problems to field theory, and reflexively read it as damping or driving. It is pure gauge.

Step 2. Momentum half of the operator: ∂L′/∂x˙=mx˙+bx\partial L'/\partial \dot x = m\dot x + bx, so

ddt∂L′∂x˙=mx¨+b x˙\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L'}{\partial \dot x} = m\ddot x + b\,\dot x

Why the momentum came out shifted: p′=mx˙+bx=p+∂F/∂xp' = m\dot x + bx = p + \partial F/\partial x, exactly the general rule (5) — the gauge term donates its velocity coefficient to the momentum.

Step 3. Coordinate half: ∂L′/∂x=b x˙\partial L'/\partial x = b\,\dot x. The equation of motion is

mx¨+bx˙−bx˙=mx¨=0m\ddot x + b\dot x - b\dot x = m\ddot x = 0

The bb-dependent pieces cancel identically — not for special initial conditions, not on average, but term against term — and the free particle stays free.

The exact boundary of the freedom

The transformation (1) is sufficient for equivalence; the sharper question is which additions to LL are harmless and which secretly change the physics. Since dFdt\frac{\mathrm{d}F}{\mathrm{d}t} in (2) is linear in the velocities, the natural test class is the general velocity-linear addition

ΔL=∑iai(q,t) q˙i+b(q,t)(7)\Delta L = \sum_i a_i(q,t)\,\dot q_i + b(q,t) \qquad (7)

where: ai,ba_i, b — arbitrary functions of coordinates and time. Comparing with (2), ΔL\Delta L is a total derivative precisely when the aia_i assemble into a gradient with bb its time partner. The next derivation shows the equations of motion detect exactly the failure of those conditions — and the detector has a familiar electromagnetic shape.

Go deeper · Derivation C · 2 minThe curl test - which velocity-linear additions change the dynamics
Derivation CThe curl test - which velocity-linear additions change the dynamics

We are locating the exact boundary of the gauge freedom: apply the Euler–Lagrange operator to the general velocity-linear addition (7) and demand the result vanish identically. The strategy mirrors Derivation A, but now the mixed-partial cancellation is not guaranteed — the leftover pieces are precisely the obstructions to writing ΔL\Delta L as dF/dt\mathrm{d}F/\mathrm{d}t, and they will reproduce, in mechanics costume, the magnetic and electric fields of electromagnetism. Along the way we see why a velocity-dependent gauge function F(q,q˙)F(q,\dot q) is not an admissible move at all.

Step 1. Apply the operator to ΔL\Delta L. Momentum half: ∂(ΔL)/∂q˙i=ai\partial(\Delta L)/\partial \dot q_i = a_i, with total derivative ∑j(∂ai/∂qj)q˙j+∂ai/∂t\sum_j (\partial a_i/\partial q_j)\dot q_j + \partial a_i/\partial t. Coordinate half: ∑j(∂aj/∂qi)q˙j+∂b/∂qi\sum_j (\partial a_j/\partial q_i)\dot q_j + \partial b/\partial q_i. Subtracting,

E^i[ΔL]=∑j(∂ai∂qj−∂aj∂qi)q˙j+∂ai∂t−∂b∂qi\hat E_i[\Delta L] = \sum_j\Big(\frac{\partial a_i}{\partial q_j} - \frac{\partial a_j}{\partial q_i}\Big)\dot q_j + \frac{\partial a_i}{\partial t} - \frac{\partial b}{\partial q_i}

Why nothing cancels automatically this time: with independent functions aia_i there is no symmetric second-derivative matrix to invoke — the antisymmetric combination ∂jai−∂iaj\partial_j a_i - \partial_i a_j is a genuine tensor of obstructions, the "curl" of aa.

Step 2. Read off the equivalence condition. E^i[ΔL]=0\hat E_i[\Delta L] = 0 for all velocities requires each coefficient to vanish separately:

∂ai∂qj=∂aj∂qiand∂ai∂t=∂b∂qi\frac{\partial a_i}{\partial q_j} = \frac{\partial a_j}{\partial q_i} \quad\text{and}\quad \frac{\partial a_i}{\partial t} = \frac{\partial b}{\partial q_i}

The first says aa is curl-free, hence (on a simply connected configuration space) a gradient, ai=∂F/∂qia_i = \partial F/\partial q_i; the second forces b=∂F/∂tb = \partial F/\partial t up to a pure function of tt, itself a total derivative. The harmless velocity-linear additions are exactly the total derivatives of functions F(q,t)F(q,t) — the freedom is precisely as large as (1) claims, no larger. Why the leftovers deserve their electromagnetic look: for a charged particle ΔL=qe r˙⋅A−qeϕ\Delta L = q_e\,\dot{\mathbf r}\cdot\mathbf A - q_e\phi has a=qeAa = q_e\mathbf A, b=−qeϕb = -q_e\phi, and Step 1's obstruction becomes the Lorentz force qe(r˙×B+E)iq_e(\dot{\mathbf r}\times\mathbf B + \mathbf E)_i. A velocity-linear term changes the dynamics if and only if it carries a nonzero "magnetic field" ∂iaj−∂jai\partial_i a_j - \partial_j a_i or "electric field".

Step 3. The other side of the boundary: why not F(q,q˙)F(q,\dot q)? Then dFdt\frac{\mathrm{d}F}{\mathrm{d}t} contains q¨\ddot q — the term has left first-order mechanics, and E^i\hat E_i cannot even receive it. The variational argument fails at the same spot, more instructively: the action still shifts by F∣t1t2F|_{t_1}^{t_2}, but the endpoint variation now contains (∂F/∂q˙) δq˙(\partial F/\partial\dot q)\,\delta\dot q at the endpoints, and Hamilton's principle fixes endpoint positions only. The surcharge is no longer common to all competitors, and stationarity of S′S' imposes spurious extra boundary conditions. The clean, first-order gauge freedom is the set F(q,t)F(q,t) — no larger, no smaller.

The electromagnetic echo

The curl test hands us the deepest application on a plate. A charged particle carries the velocity-dependent potential U=qeϕ−qe r˙⋅AU = q_e\phi - q_e\,\dot{\mathbf r}\cdot\mathbf A, so L=12mr˙2−qeϕ+qe r˙⋅AL = \tfrac12 m\dot{\mathbf r}^2 - q_e\phi + q_e\,\dot{\mathbf r}\cdot\mathbf A. The potentials are famously non-unique — the fields E,B\mathbf E, \mathbf B are unchanged under

A→A+∇χ,ϕ→ϕ−∂χ∂t(8)\mathbf{A}\to\mathbf{A}+\nabla\chi, \qquad \phi\to\phi-\frac{\partial \chi}{\partial t} \qquad (8)

where: χ(r,t)\chi(\mathbf r,t) — an arbitrary gauge function. Feed (8) into LL and collect: ΔL=qe r˙⋅∇χ+qe ∂tχ=qe dχdt\Delta L = q_e\,\dot{\mathbf r}\cdot\nabla\chi + q_e\,\partial_t\chi = q_e\,\frac{\mathrm{d}\chi}{\mathrm{d}t} — exactly a total time derivative, with mechanical gauge function F=qeχF = q_e\chi. Electromagnetic gauge invariance, viewed from mechanics, is not a new principle: it is equation (1) in field-theory clothes. The trajectory (the Lorentz force) is gauge-invariant because total derivatives cannot touch equations of motion; the canonical momentum p=mr˙+qeA\mathbf p = m\dot{\mathbf r} + q_e\mathbf A is gauge-dependent because (5) says it must shift by qe∇χq_e\nabla\chi. The second worked example quantifies how violently.

Almost-symmetries: Noether with a total derivative

Here the gauge freedom stops being bookkeeping and starts producing physics. Noether's theorem, in its textbook form, wants a transformation that leaves LL invariant. But some of the most important transformations in mechanics fail that test in exactly the gauge way: they change LL by a total time derivative. Such quasi-invariances are every bit as much symmetries of the physics — total derivatives cannot alter dynamics — and Noether's theorem extends to reward them, with one beautiful modification to the charge.

Figure
A Galilean boost changes L by a total derivative - and still pays a conservation law
t x worldline x(t) boosted: x + εt δx = εt grows with t under the boost: δL = ε d(Σmᵣxᵣ)/dt not zero — but a total derivative: quasi-invariant Noether charge: G = Pt − MX₀ const center of mass moves uniformly at P/M the boost tilts every worldline; L shifts by dF/dt with F = εΣmᵣxᵣ — the dynamics cannot object
Go deeper · Derivation D · 1 minQuasi-invariant Noether - the boost and the center-of-mass theorem
Derivation DQuasi-invariant Noether - the boost and the center-of-mass theorem

We derive the extension of Noether's theorem to transformations that change the Lagrangian by a total time derivative, then apply it to the Galilean boost of an NN-particle system to extract a conservation law that strict Noether cannot see: the uniform motion of the center of mass. Two movements — the general mechanism (one line longer than standard Noether), then the boost computation. Watch where the gauge function ends up: it subtracts from the conserved charge, which is why quasi-invariant charges characteristically contain an explicit factor of tt.

Step 1. The general mechanism. Let δqi=ε ψi(q,t)\delta q_i = \varepsilon\,\psi_i(q,t) change the Lagrangian, for every trajectory, by a total derivative: δL=ε dΛdt\delta L = \varepsilon\,\frac{\mathrm{d}\Lambda}{\mathrm{d}t} for some Λ(q,t)\Lambda(q,t). Expanding δL\delta L by the chain rule and using the equations of motion ∂L∂qi=ddt∂L∂q˙i\frac{\partial L}{\partial q_i} = \frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial \dot q_i},

δL=ε∑i(∂L∂qiψi+∂L∂q˙iψ˙i)=ε ddt∑ipi ψi\delta L = \varepsilon\sum_i\Big(\frac{\partial L}{\partial q_i}\psi_i + \frac{\partial L}{\partial \dot q_i}\dot\psi_i\Big) = \varepsilon\,\frac{\mathrm{d}}{\mathrm{d}t}\sum_i p_i\,\psi_i

Why the on-shell substitution is allowed: Noether's theorem is a statement about conserved quantities along actual motions, so we may trade ∂L/∂qi\partial L/\partial q_i for p˙i\dot p_i and reassemble the product rule.

Step 2. Equate the two expressions for δL\delta L:

ddt(∑ipi ψi−Λ)=0⟹Q=∑ipi ψi−Λ    is conserved\frac{\mathrm{d}}{\mathrm{d}t}\Big(\sum_i p_i\,\psi_i - \Lambda\Big) = 0 \qquad\Longrightarrow\qquad Q = \sum_i p_i\,\psi_i - \Lambda \;\;\text{is conserved}

Why the correction is forced: for a strict symmetry Λ=0\Lambda = 0 and QQ is the familiar Noether charge; quasi-invariance means the transformation "leaks" action at rate dΛ/dt\mathrm{d}\Lambda/\mathrm{d}t, and the charge must carry −Λ-\Lambda to absorb the leak.

Step 3. The Galilean boost. Take NN particles on a line, L=∑i12mix˙i2−VL = \sum_i \tfrac12 m_i \dot x_i^2 - V, with VV a function of coordinate differences. Boost: δxi=εt\delta x_i = \varepsilon t, so ψi=t\psi_i = t. The potential is blind (differences unchanged); the kinetic term gives

δL=∑imix˙i ε=ε ddt∑imixi\delta L = \sum_i m_i \dot x_i\,\varepsilon = \varepsilon\,\frac{\mathrm{d}}{\mathrm{d}t}\sum_i m_i x_i

so the boost is quasi-invariant with Λ=∑imixi=MXcm\Lambda = \sum_i m_i x_i = M X_{\mathrm{cm}}, M=∑imiM = \sum_i m_i.

Step 4. Read off the charge, with total momentum P=∑ipiP = \sum_i p_i:

G=P t−MXcm=const⟹Xcm(t)=Xcm(0)+PM tG = P\,t - M X_{\mathrm{cm}} = \text{const} \qquad\Longrightarrow\qquad X_{\mathrm{cm}}(t) = X_{\mathrm{cm}}(0) + \frac{P}{M}\,t

The center of mass of any isolated system moves uniformly — the boost conservation law, logically independent of momentum conservation (translations) and invisible to strict Noether, since δL≠0\delta L \neq 0. As a concrete check: take m1=3.0m_1 = 3.0 kg at x1=0x_1 = 0 with v1=+2.0v_1 = +2.0 m/s and m2=1.0m_2 = 1.0 kg at x2=4.0x_2 = 4.0 m with v2=−2.0v_2 = -2.0 m/s, free motion. Then P=4.0P = 4.0 kg·m/s, M=4.0M = 4.0 kg, Xcm(0)=1.0X_{\mathrm{cm}}(0) = 1.0 m, giving G=−4.0G = -4.0. At t=2.0t = 2.0 s: x1=4.0x_1 = 4.0 m, x2=0x_2 = 0, Xcm=3.0X_{\mathrm{cm}} = 3.0 m, and G=8.0−12.0=−4.0G = 8.0 - 12.0 = -4.0 — conserved, as required.

The same maneuver, run in reverse, is Landau's celebrated opening move: demand that the free-particle Lagrangian be quasi-invariant under boosts (Galilean relativity says boosted observers see the same physics), and L=12mv2L = \tfrac12 mv^2 is forced — up to, of course, a total time derivative. The gauge freedom is not a loose end of the formalism; it is the exact amount of slack that relativity principles need.

Limiting cases

CaseResultMeaning
F=−ctF = -ctL′=L−cL' = L - cshifting the zero of potential energy: the familiar special case
time-independent F(q)F(q)pi′=pi+∂F/∂qip_i' = p_i + \partial F/\partial q_i, h′=hh' = hmomenta recalibrated, energy function untouched — the tidy gauge
explicitly time-dependent F(q,t)F(q,t)h′=h−∂F/∂th' = h - \partial F/\partial teven the "energy" reading is gauge bookkeeping
velocity-linear addition, curl-free aaai=∂iFa_i = \partial_i F: pure gaugeharmless — Derivation C's equivalence class
velocity-linear addition, ∂iaj≠∂jai\partial_i a_j \neq \partial_j a_idynamics changea genuine magnetic-type force was added, not a gauge term
velocity-dependent F(q,q˙)F(q,\dot q)dF/dt∋q¨\mathrm{d}F/\mathrm{d}t \ni \ddot qleaves first-order mechanics; endpoint-velocity variations spoil the equivalence
Galilean boostδL=ε d(MXcm)/dt\delta L = \varepsilon\,\mathrm{d}(MX_{\mathrm{cm}})/\mathrm{d}tquasi-invariance: Noether still yields G=Pt−MXcmG = Pt - MX_{\mathrm{cm}}

Worked examples

1 · Gauging the harmonic oscillator (confidence builder)

Take L=12mx˙2−12kx2L = \tfrac12 m\dot x^2 - \tfrac12 kx^2 with m=2.0m = 2.0 kg, k=50 N/mk = 50\ \mathrm{N/m}, and gauge-transform with F=12bx2F = \tfrac12 b x^2, b=3.0b = 3.0 kg/s. Show the motion is unchanged, then evaluate both momenta and both energy functions at the instant when x=0.10x = 0.10 m and x˙=0.50\dot x = 0.50 m/s.

Step 1. Transform. dFdt=b xx˙\frac{\mathrm{d}F}{\mathrm{d}t} = b\,x\dot x, so L′=12mx˙2−12kx2+b xx˙L' = \tfrac12 m\dot x^2 - \tfrac12 kx^2 + b\,x\dot x — an oscillator with an apparent position–velocity coupling.

Step 2. Equations of motion. From L′L': ∂L′/∂x˙=mx˙+bx\partial L'/\partial\dot x = m\dot x + bx, whose time derivative is mx¨+bx˙m\ddot x + b\dot x; and ∂L′/∂x=−kx+bx˙\partial L'/\partial x = -kx + b\dot x. Euler–Lagrange: mx¨+bx˙+kx−bx˙=0m\ddot x + b\dot x + kx - b\dot x = 0, i.e. mx¨+kx=0m\ddot x + kx = 0. The bb-terms cancel: identical simple harmonic motion, with ω=k/m=50/2.0=5.0 rad/s\omega = \sqrt{k/m} = \sqrt{50/2.0} = \mathbf{5.0\ rad/s} from either Lagrangian — and no damping, despite appearances.

Step 3. Momenta at the given instant. p=mx˙=2.0×0.50=1.0 kg⋅m/sp = m\dot x = 2.0\times0.50 = \mathbf{1.0\ kg\cdot m/s}, while p′=mx˙+bx=1.0+3.0×0.10=1.3 kg⋅m/sp' = m\dot x + bx = 1.0 + 3.0\times0.10 = \mathbf{1.3\ kg\cdot m/s} — a 30% disagreement about "the momentum," with both books correct.

Step 4. Energy functions. FF is time-independent, so (6) predicts h′=hh' = h. Directly: h′=x˙(mx˙+bx)−L′=12mx˙2+12kx2h' = \dot x(m\dot x + bx) - L' = \tfrac12 m\dot x^2 + \tfrac12 kx^2, the bxx˙bx\dot x pieces cancelling. Numerically h=h′=12(2.0)(0.50)2+12(50)(0.10)2=0.25+0.25=0.50 Jh = h' = \tfrac12(2.0)(0.50)^2 + \tfrac12(50)(0.10)^2 = 0.25 + 0.25 = \mathbf{0.50\ J}. The gauge shifted the momentum ledger but left the energy ledger alone — the F(q)F(q) special case in action.

2 · Two gauges for one magnetic field (exam level)

An electron (qe=−1.60×10−19q_e = -1.60\times10^{-19} C, me=9.11×10−31m_e = 9.11\times10^{-31} kg) moves in a uniform field B=1.0B = 1.0 T along zz. Textbook one uses the symmetric gauge Asym=12(−By, Bx, 0)\mathbf A_{\mathrm{sym}} = \tfrac12(-By,\,Bx,\,0); textbook two the Landau gauge AL=(−By, 0, 0)\mathbf A_{\mathrm{L}} = (-By,\,0,\,0). Find the gauge function connecting them and compare the canonical-momentum disagreement to the kinetic momentum for an electron at (x,y)=(1.0, 2.0)(x,y) = (1.0,\,2.0) mm moving at v=1.0×106v = 1.0\times10^{6} m/s.

Step 1. Both potentials give the same field: ∇×Asym=∇×AL=Bz^\nabla\times\mathbf A_{\mathrm{sym}} = \nabla\times\mathbf A_{\mathrm{L}} = B\hat z (for the symmetric gauge, ∂xAy−∂yAx=12B+12B=B\partial_x A_y - \partial_y A_x = \tfrac12 B + \tfrac12 B = B). Their difference must be a gradient:

Asym−AL=(12By, 12Bx, 0)=∇χ,χ=12B x y\mathbf A_{\mathrm{sym}} - \mathbf A_{\mathrm{L}} = \big(\tfrac12 By,\ \tfrac12 Bx,\ 0\big) = \nabla\chi, \qquad \chi = \tfrac12 B\,x\,y

Step 2. The mechanical gauge function is F=qeχ=12qeB xyF = q_e\chi = \tfrac12 q_e B\,xy: the two Lagrangians differ by dFdt\frac{\mathrm{d}F}{\mathrm{d}t} — pure gauge, so both textbooks compute identical cyclotron orbits.

Step 3. Canonical-momentum disagreement at (1.0,2.0)(1.0, 2.0) mm. By (5), Δp=qe∇χ=12qeB (y, x, 0)\Delta\mathbf p = q_e\nabla\chi = \tfrac12 q_e B\,(y,\ x,\ 0):

∣Δpx∣=12(1.60×10−19)(1.0)(2.0×10−3)=1.6×10−22 kg⋅m/s,∣Δpy∣=8.0×10−23 kg⋅m/s|\Delta p_x| = \tfrac12(1.60\times10^{-19})(1.0)(2.0\times10^{-3}) = \mathbf{1.6\times10^{-22}\ kg\cdot m/s}, \qquad |\Delta p_y| = \mathbf{8.0\times10^{-23}\ kg\cdot m/s}

Step 4. Compare to the kinetic momentum mev=(9.11×10−31)(1.0×106)=9.1×10−25 kg⋅m/sm_e v = (9.11\times10^{-31})(1.0\times10^{6}) = \mathbf{9.1\times10^{-25}\ kg\cdot m/s}. The gauge disagreement in pxp_x is ≈176\approx \mathbf{176} times larger than the entire kinetic momentum. The moral is brutal: the canonical momentum of a charged particle is dominated by an arbitrary convention; only the gauge-invariant kinetic momentum mr˙=p−qeAm\dot{\mathbf r} = \mathbf p - q_e\mathbf A is measurable.

Step 5. Audit. As B→0B \to 0 the gauges coincide, χ→0\chi \to 0, Δp→0\Delta\mathbf p \to 0 ✓. And each gauge advertises a different cyclic coordinate — Landau gauge conserves canonical pxp_x, symmetric gauge conserves canonical LzL_z — two bookkeeping systems for one and the same spiral.

Origins · 1 minEmmy Noether and how this was discovered
EN
Emmy Noether
1882–1935 · Göttingen and Bryn Mawr

Emmy Noether was barred from regular university enrollment (women could only audit in the Germany of her youth), earned her doctorate at Erlangen anyway, then worked for years unpaid — Göttingen's faculty resisted granting a woman the Habilitation, prompting Hilbert's retort that the senate was not a bathhouse. Hilbert and Klein had recruited her in 1915 for precisely the problem this page touches: the puzzling status of energy conservation in general relativity. Her 1918 paper Invariante Variationsprobleme answered it with two theorems that reorganized physics — the first tying every continuous symmetry of the action to a conservation law, the second showing that gauge-type symmetries yield identities instead. Crucially, her first theorem already covered quasi-invariance: transformations that change LL by a total derivative, like the Galilean boost, still produce conserved charges with the −Λ-\Lambda correction derived above. She regarded the physics paper as a side excursion; her life's work built modern abstract algebra — ideals, rings, the "Noetherian" conditions — through the 1920s Göttingen school. Dismissed in 1933 by the Nazi race laws, she emigrated to Bryn Mawr College and died two years later, at 53. Einstein's obituary called her the most significant creative mathematical genius produced since the higher education of women began.

History
1788
— Lagrange's Mécanique analytique establishes the Lagrangian formulation; the non-uniqueness of L is implicit in its variational foundations.
1834
— Hamilton recasts dynamics as stationary action, making the endpoint structure of the action — and hence the total-derivative loophole — explicit.
1887
— Helmholtz poses the inverse problem of the calculus of variations: which equations of motion admit a Lagrangian, and how unique is it?
1918
— Noether's Invariante Variationsprobleme proves both of her theorems, with quasi-invariant transformations built into the first.
1929
— Weyl's gauge principle elevates the phase and potential redundancy to the organizing idea of field theory, the direct descendant of the classical freedom.

Going further

References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §1.4 and §2.4 · Landau & Lifshitz, Mechanics (Vol. 1), §2 (the action and the indeterminacy of L) · Morin, Introduction to Classical Mechanics, Ch. 6 · Taylor, Classical Mechanics, Ch. 7 The key results on this page are: the EL-annihilation identity follows from symmetry of mixed partials; the action shifts as S′=S+F∣t1t2S'=S+F|_{t_1}^{t_2} with δS′=δS\delta S'=\delta S under fixed endpoints; the bookkeeping shifts are pi′=pi+∂F/∂qip_i'=p_i+\partial F/\partial q_i and h′=h−∂F/∂th'=h-\partial F/\partial t; and the electromagnetic gauge transformation gives δL=qe dχ/dt\delta L=q_e\,\mathrm{d}\chi/\mathrm{d}t from L=12mr˙2−qeϕ+qer˙⋅AL=\tfrac12 m\dot{\mathbf r}^2-q_e\phi+q_e\dot{\mathbf r}\cdot\mathbf A. No empirical numbers are asserted; the free-particle worked example is self-checking. Worked-example numbers on this page (ω=5.0\omega = 5.0 rad/s, p=1.0p = 1.0 vs p′=1.3p' = 1.3 kg·m/s, h=0.50h = 0.50 J; χ=12Bxy\chi = \tfrac12 Bxy, ∣Δpx∣=1.6×10−22|\Delta p_x| = 1.6\times10^{-22} vs mev=9.1×10−25m_e v = 9.1\times10^{-25} kg·m/s, ratio ≈ 176; boost check G=−4.0G = -4.0 at t=0t = 0 and t=2t = 2 s) are illustrative arithmetic recomputed from the boxed formulas.

Builds on: The Lagrangian Function · The Action Functional · Hamilton's Principle of Stationary Action · The Euler-Lagrange Equations · Generalized Coordinates and Configuration Space Leads to: Generalized Forces and Generalized Momenta · Cyclic Coordinates and Conservation of Conjugate Momenta · The Energy Function and Jacobi Integral

Is gauge freedom a symmetry of the system?

No, and the distinction matters. A symmetry transforms the variables while leaving LL invariant; it relates different states of one system and produces conservation laws. Gauge freedom transforms the description: LL itself changes, no state is touched, nothing new is conserved — you have re-labeled your bookkeeping. The two concepts meet in exactly one place: a transformation of variables that changes LL by a total derivative (a quasi-invariance, like the Galilean boost). That hybrid is still a physical symmetry, and Noether's theorem handles it by subtracting the gauge function from the charge, as in Derivation D.

If the canonical momentum is gauge-dependent, what is actually measurable?

Anything the trajectories themselves determine: positions, velocities, forces, periods, kinetically defined energies. For a charged particle the split is sharp: the kinetic momentum mr˙=p−qeAm\dot{\mathbf r} = \mathbf p - q_e\mathbf A is gauge-invariant and is what a velocity measurement returns, while the canonical p\mathbf p inherits the arbitrariness of A\mathbf A — the second worked example shows the gauge part exceeding the kinetic part by a factor of 176 in an unremarkable setup. Rule of thumb: quantities that survive a gauge transformation are candidates for measurement; quantities that shift, like pp and the value of the action, are coordinates on your description, not on the world.

Why exactly is F restricted to coordinates and time but not velocities?

Two independent walls close in. Structural: if FF contains q˙\dot q, then dF/dt\mathrm{d}F/\mathrm{d}t contains q¨\ddot q, so L+dF/dtL + \mathrm{d}F/\mathrm{d}t is no longer a first-order Lagrangian and the standard Euler–Lagrange operator cannot receive it. Variational: the action still shifts by endpoint terms, but those now involve endpoint velocities, which Hamilton's principle leaves free — the surcharge is no longer common to all paths, and stationarity of S′S' imposes spurious boundary conditions that SS never had. Within first-order mechanics the harmless additions are exactly the curl-free velocity-linear terms of Derivation C, i.e. total derivatives of some F(q,t)F(q,t).

How do I quickly check whether a suspicious term is a total derivative?

Use the structure theorem of Derivation C rather than guessing antiderivatives. A candidate must be at most linear in velocities, ΔL=∑iai(q,t)q˙i+b(q,t)\Delta L = \sum_i a_i(q,t)\dot q_i + b(q,t) — anything quadratic or higher in q˙\dot q is never pure gauge (it reshapes kinetic energy). Then two checks: is the coefficient array curl-free, ∂ai/∂qj=∂aj/∂qi\partial a_i/\partial q_j = \partial a_j/\partial q_i, and does bb match, ∂ai/∂t=∂b/∂qi\partial a_i/\partial t = \partial b/\partial q_i? If both pass, FF exists and the term may be dropped. Fast examples: b xx˙b\,x\dot x passes (F=12bx2F = \tfrac12 bx^2); tx˙+xt\dot x + x passes (F=txF = tx); c(xy˙−yx˙)c(x\dot y - y\dot x) fails the curl test spectacularly — that term is a uniform magnetic field in disguise and changes the orbits.

If two Lagrangians give the same equations of motion, must they differ by a total derivative?

No — the converse fails, instructively. Trivially, cLcL gives the same equations. Nontrivially, inequivalent Lagrangians can share dynamics: for the free particle, L~=112x˙4\tilde L = \tfrac{1}{12}\dot x^4 yields x˙2x¨=0\dot x^2\ddot x = 0, hence x¨=0\ddot x = 0 on all motions with x˙≠0\dot x \neq 0 — the same trajectories as 12mx˙2\tfrac12 m\dot x^2, yet L~−L\tilde L - L is no total derivative. Such alternative Lagrangians are the subject of Helmholtz's inverse problem (1887), and they assign different canonical structures — different momenta and Hamiltonians — to identical motion. The total-derivative freedom is the universal, structure-preserving part of the ambiguity: guaranteed to exist for every system, and harmless to the Legendre transform.

Does the gauge term really do nothing in quantum mechanics?

It does something beautifully specific: it multiplies the wavefunction by a local phase. In the path integral each path contributes eiS/ℏe^{iS/\hbar}, and the action shift (3) tacks on a phase depending only on the endpoints, which cancels in every probability computed at fixed endpoints. For a charged particle, F=qeχF = q_e\chi reproduces the textbook rule that a gauge transformation multiplies ψ\psi by eiqeχ/ℏe^{iq_e\chi/\hbar}. The famous subtlety is topology: around a closed loop threading a solenoid, the accumulated phase can be nonzero even though the local physics is gauge-trivial — the Aharonov–Bohm effect. Classically boundary terms never act; quantum mechanically they act precisely through such global phases.

Why does Landau's textbook use this freedom to derive the free-particle Lagrangian?

Because quasi-invariance is exactly the right demand. Landau argues: in an inertial frame LL can depend only on v2v^2 (homogeneity and isotropy); Galilean relativity then requires that a boosted observer's Lagrangian describe the same dynamics — which, by this page's theorem, means it may differ from L(v2)L(v^2) by at most a total time derivative. For an infinitesimal boost, δL≈2(∂L/∂v2) v⋅ε\delta L \approx 2(\partial L/\partial v^2)\,\mathbf v\cdot\boldsymbol\varepsilon, and this is a total derivative only if ∂L/∂v2\partial L/\partial v^2 is constant — forcing L=12mv2L = \tfrac12 mv^2 up to gauge, with the mass entering as that constant. Had Landau demanded strict invariance, no nonzero Lagrangian would survive; the gauge freedom is precisely the slack that lets Galilean relativity coexist with nontrivial dynamics.

Before this

Where this leads