Quadrature

Approximating a definite integral by a weighted sum of function values.

Definition

A quadrature formula has the form abf(x)dxi=0nwif(xi)\int_a^b f(x)\,dx\approx\sum_{i=0}^{n} w_i f(x_i), with nodes xix_i and weights wiw_i. Newton-Cotes uses equispaced nodes; Gauss chooses nodes and weights together to maximize the degree of precision.

How it is used

With tabulated data use composite trapezoid or Simpson; if you can evaluate ff anywhere, Gauss gives more accuracy with fewer evaluations.