Gaussian quadrature
A quadrature rule that chooses BOTH where to sample and how much weight to give each sample, to maximize accuracy for a fixed number of evaluations -- unlike a composite rule's fixed, equally spaced grid.
The n-point Gauss-Legendre quadrature rule samples f at the n roots of the degree-n Legendre polynomial on [-1,1], each weighted by w_i=\dfrac{2}{(1-x_i^2)[P_n'(x_i)]^2}, reaching degree of precision 2n-1 -- the maximum possible for n evaluations, and higher than any equally-spaced n-point rule achieves. A general interval [a,b] maps onto [-1,1] by x=\frac{b-a}{2}t+\frac{a+b}{2}.
Examples
2-point Gauss-Legendre quadrature samples at \pm1/\sqrt3, reaching degree of precision 3 -- matching Simpson's rule's own degree of precision with one fewer function evaluation.
See also