By differentiating the scalar Lagrangian in the energy dimension with respect to the generalized coordinates and generalized velocities, excluding the constraints, the Euler-Lagrange equation is derived using the variational method.
Symmetry of physical laws under variation of the path in time
Principle of stationary action → Euler–Lagrange equation
Conservation of Energy
For a static empty universe
However, our universe is not globally symmetric with respect to time since spacetime itself evolves. Global energy conservation does not hold, even though local conservation () still applies.