In numerical analysis, Gauss–Legendre quadrature is a form of Gaussian quadrature for approximating the definite integral of a function. For integrating over the interval , the rule takes the form: where n is the number of sample points used, wi are quadrature weights, and xi are the roots of the nth Legendre polynomial. This choice of quadrature weights wi and quadrature nodes xi is the unique choice that allows the quadrature rule to integrate degree polynomials exactly. Many algorithms have been developed for computing Gauss–Legendre quadrature rules. The Golub–Welsch algorithm presented in 1969 reduces the computation of the nodes and weights to an eigenvalue problem which is solved by the QR algorithm. This algorithm was popular, but significantly more efficient algorithms exist. Algorithms based on the Newton–Raphson method are able to compute quadrature rules for significantly larger problem sizes. In 2014, Ignace Bogaert presented explicit asymptotic formulas for the Gauss–Legendre quadrature weights and nodes, which are accurate to within double-precision machine epsilon for any choice of n ≥ 21. This allows for computation of nodes and weights for values of n exceeding one billion. History Carl Friedrich Gauss was the first to derive the Gauss–Legendre quadrature rule, doing so by a calculation with continued fractions in 1814. He calculated the nodes and weights to 16 digits up to order n=7 by hand. Carl Gustav Jacob Jacobi discovered the connection between the quadrature rule and the orthogonal family of Legendre polynomials. As there is no closed-form formula for the quadrature weights and nodes, for many decades people were only able to use hand-compute them for small n, and computing the quadrature had to be done by referencing tables containing the weight and node values. By 1942 these values were only known for up to n=16. Definition For integrating f over with Gauss–Legendre quadrature, the associated orthogonal polynomials are Legendre polynomials, denoted by . With the -th polynomial normalized so that , the -th Gauss node, , is the -th root of and the weights are given by the formula Some low-order quadrature rules are tabulated below for integrating over . For integrating over a general real interval , a change of interval can be applied to convert the problem to one of integrating over . Algorithms Newton–Raphson methods Several researchers have developed algorithms for computing Gauss–Legendre quadrature nodes and weights based on the Newton–Raphson method for finding roots of functions. Various