Zaslat SMS: Calculus of variations and optimal control theory /