A computational approach to the wave equations