In variational mechanics, the Legendre transform converts the Lagrangian formulation with coordinates \((q, \dot{q}, t)\) into the Hamiltonian formulation with canonical phase-space coordinates \((q, p, t)\text{:}\)
Here, a second-order system of \(n\) Euler-Lagrange differential equations are mapped to a first-order system of \(2n\) Hamiltonβs canonical equations.