Rayleigh–Ritz–Galerkin Methods for Multidimensional Problems