The Rayleigh-Ritz Method for Structural Analysis