find maximum velocity and maximum acceleration.