Toon vak Calculus of Variations and Optimal Control