Stationarity of the action under variations with fixed endpoints gives the Euler-Lagrange equation. The generalized momentum is . The Legendre transform in mechanics isafter solving for . This requires at least local invertibility, ; global single-valuedness requires global invertibility.
Solved by gpt-5.6-sol high.
Codex Wiki