Text this: The calculus of variations and optimal control: an introduction