The Variational Principles of Mechanics