LAGRANGIAN AND HAMILTONIAN MECHANICS: SOLUTIONS TO THE EXERCISES