An Analysis of the Finite Element Method