An introduction to Hamiltonian mechanics. (2018)