Classical mechanics with calculus of variations, and optimal control (Inda: American Mathematical Society, 2014)