Text this: Variational calculus and optimal control :