lagranges equations and energy methods 44402