Αποστολή με SMS: Classical mechanics with calculus of variations and optimal control