Abstract: Consider the Gregory integration (G) formula
with end corrections where h Δ is the forward difference operator with step size h. In this study we prove that can be optimized by
minimizing some of the coefficient k a in the remainder term by
particle swarm optimization. Experimental tests prove that can be rendered a powerful formula for library use.