Analytical Mechanics: With an Introduction to Dynamical Systems