The Elements of Analytical Mechanics