Abstract:By utilizing the trial function method, a class of nonlinear partial differential equations (PDEs for short) that are hard to be solved by the usual ways can be reduced to a set of algebraic equations, which can be easily solved, and their related coefficients can be easily determined by the undetermined coefficients method. Then, the exact analytical solutions to the class of nonlinear PDEs were successfully derived. Moreover, the method was applied to the Burgers equation, the KdV equation and the KdV-Burgers equation and the results were in very good agreement with those given in the reference. The method may be generalized to construct the solutions of other nonlinear PDEs.