For motion of an object along the x-axis