The attenuation of waves in a dispersive medium