When a ball moves up and down, there is a gravitational force of attraction acting downwards in the vertical direction. The frictional force of air is being ignored and the impact of the ball with the ground is considered to be a perfectly elastic collision. The force on the ball accelerates it. As the acceleration is downwards, it increases the speed of the ball when it is moving downwards and decreases the speed when it is moving upwards. The force acting on the ball is proportional to the mass of the ball and as a result the acceleration of the ball is constant.

If a ball is dropped from a height h, its initial velocity is 0. As it moves down the velocity increases. After the ball has traveled a distance d, the velocity is equal to `sqrt(2*g*d)` , where g is the gravitational acceleration equal to 9.8 m/s^2. The ball strikes the ground with velocity `sqrt(2*g*h)` ; it then starts to move up with velocity `sqrt(2*g*h)` . The velocity of the ball after moving up a distance d is equal to `sqrt(2*g*h - 2*g*d)` . At height h, the velocity of the ball is 0 and it starts to move downwards again. Under ideal conditions, the ball would continue to move up and down alternately forever.