Two classes of rational solutions to a shallow water wave-like non-linear differential equation are constructed. The basic object is a generalized bilinear differential equation based on a prime number, p = 3. Through this new transformation and with the help of symbolic computation with MAPLE, both the new equation and its rational solutions are obtained.