On Perturbed Trapezoidal and Midpoint Rules