Text this: Theory of optimal control and mathematical programming