The tanh method: I. Exact solutions of nonlinear evolution and wave equations