Clenshaw–Curtis quadrature - Wikipedia
https://en.wikipedia.org/wiki/Clenshaw–Curtis_quadratureClenshaw–Curtis quadrature and Fejér quadrature are methods for numerical integration, or "quadrature", that are based on an expansion of the integrand in terms of Chebyshev polynomials. Equivalently, they employ a change of variables and use a discrete cosine transform (DCT) approximation for the cosine series. Besides having fast-converging accuracy comparable to Gaussian quadraturerules, Clenshaw–Curtis quadrature naturally leads to nested quadrature rules (where different accuracy orders share points), w…