ClenshawCurtis
Clenshaw-Curtis quadrature is a numerical integration method based on Chebyshev points of the second kind. For a chosen number of points n+1, the nodes are x_k = cos(kπ/n) for k = 0,1,...,n, lying in the interval [-1,1]. The integral of a function f on [-1,1] is approximated by a weighted sum ∑_{k=0}^n w_k f(x_k), where the weights w_k are chosen so that polynomials up to a certain degree are integrated exactly. The endpoint nodes x_0 = 1 and x_n = -1 are included, and the weights can be computed efficiently using a discrete cosine transform, yielding an overall O(n log n) implementation.
The method is particularly effective for smooth functions. If f is analytic on [-1,1], the approximation error
Origin and use: The rule was introduced in the 1960s by Clenshaw and Curtis. It has become