A study of the finite element method