Finite element, Rayleigh-Ritz and Galerkin methods Basic methods mathematics