Enviar por SMS: Hamilton's principle and physical systems