Text this: Introduction to the variational formulation in mechanics :