Normal modes of a Lagrangian system constrained in a potential well