For a particle moving along the x-axis