A body moving with an initial velocity U accelerates until it attains a velocity of…