Summary: A direct and unified algorithm for constructing multiple travelling wave solutions of nonlinear partial differential equations (PDEs) is presented and implemented in a computer algebraic system. The key idea of this method is to take full advantage of a Riccati equation involving a parameter and use its solutions to replace the tanh-function in the tanh method. It is quite interesting that the sign of the parameter can be used to exactly judge the number and types of such travelling wave solutions. In this way, we can successfully recover the previously known solitary wave solutions that had been found by the tanh method and other more sophisticated methods. More importantly, for some equations, with no extra effect we also find other new and more general solutions at the same time.
By introducing appropriate transformations, our method is further extended to the nonlinear PDEs whose balancing numbers may be any nonzero real numbers. The efficiency of the method can be demonstrated on a large variety of nonlinear PDEs such as those considered in this paper, Burgers-Huxley equation, coupled Korteweg-de Vries equation, Caudrey-Dodd-Gibbon-Kawada equation, active-dissipative dispersive media equation, generalized Fisher equation, and nonlinear heat conduction equation.