Text this: Calculus of variations and optimal control theory :