optimizations for this specific problem are used. For instance, some methods compute to avoid issues associated with clustering of the roots near the ends of the interval and . Some methods utilize formulas to approximate the weights and then use a few iterations of Newton-Raphson to lower the error of the approximation to below machine precision. Golub–Welsch In 1969, Golub and Welsch published their method for computing Gaussian quadrature rules given the three term recurrence relation that the underlying orthogonal polynomials satisfy. They reduce the problem of computing the nodes of a Gaussian quadrature rule to the problem of finding the eigenvalues of a particular symmetric tridiagonal matrix. The QR algorithm is used to find the eigenvalues of this matrix. By taking advantage of the symmetric tridiagonal structure, the eigenvalues can be computed in time, as opposed to the time expected for a generic eigenvalue problem. Asymptotic formulas Various methods have been developed that use approximate closed-form expressions to compute the nodes. As mentioned above, in some methods formulas are used as approximations to the nodes, after which some Newton-Raphson iterations are performed to refine the approximation. In a 2014 paper, Ignace Bogaert derives asymptotic formulas for the nodes that are exact up to machine precision for and for the weights that are exact up to machine precision for . This method does not require any Newton-Raphson iterations or evaluations of Bessel functions as other methods do. As shown in the paper, the method was able to compute the nodes at a problem size of one billion in 11 seconds. Since the nodes near the endpoints of become very close to each other at this problem size, this method of computing the nodes is sufficient for essentially any practical application in double-precision floating point. Higher precision Johansson and Mezzarobba describe a strategy to compute Gauss–Legendre quadrature rules in arbitrary-precision arithmetic, allowing both small and large . A rule of order with 1000 digits of precision can be calculated in around one second. Their method uses Newton-Raphson iteration together with several different techniques for evaluating Legendre polynomials. The algorithm also provides a certified error bound. Comparison with other quadrature rules Gauss–Legendre quadrature is optimal in a very narrow sense for computing integrals of a function f over , since no other quadrature rule integrates all degree polynomials exactly when using n sample points. However, this measure of accuracy is not generally