The use of direct variational methods based on Rayleigh-Ritz optimization for finding approximate solutions to various nonlinear evolution equations was presented. The main advantage of the approach is that it provides simple and explicit expressions for physically relevant quantities where exact analytical solutions are not available. It is found that the given method is flexible and can be applied to stationary and dynamical problems.