On the Perturbed Trapezoid Formula