Direct Numerical Algorithm for Constrained Variational Problems. (3rd April 2017)