Dynamic Programming and a New Formalism in the Calculus of Variations | Synapse