The Mathematical Restitution Formula and Its Application