Text this: Sufficient conditions for Lagrange, Mayer, and Bolza optimization problems