Conservation of mechanical energy and collision analysis