The equation of a wave traveling in a horizontal direction is expressed as y =…