Abstract A variational principle is established by the semi-inverse method and used to solve approximately a nonlinear problem Ritz method. In this process,it may be difficult large system of algebraic equations,the Groebner bases theory (Buchberger’s algorithm) applied problem. The results show that approach much simpler more efficient.