Variational Calculation And Methods Of Optimization