Introduction to Numerical Methods for Variational Problems