coteglob

Algorithm 868: Globally doubly adaptive quadrature—reliable Matlab codes. We discuss how to modify a recently published Matlab code, coteglob, so that the excellent performance this code demonstrates for low and intermediate accuracy requests is retained while the performance is improved for high accuracy requests. coteglob is a globally adaptive code using a 5 and 9 point pair of Newton-Cotes rules. Combining an extended sequence of rules using 5, 9, 17 and 33 points with a doubly adaptive bisection strategy is the main focus of the paper. We also discuss local versus global adaptivity and conclude that globally adaptive codes are to be preferred. Based on this we develop several new globally adaptive codes that all compare favorably both with coteglob, with Matlab’s best currently available quadrature software quadl and the general purpose QUADPACK codes dqk15 and dqk21. We include the results from extensive testing using both a Lyness-Kaganove testing technique and a battery test.