# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.integration.univariate.riemann.gaussian

• All Implemented Interfaces:
Integrator

public class GaussLegendreQuadrature
extends GaussianQuadrature
Gauss-Legendre quadrature considers the simplest case of uniform weighting: $$w(x) = 1$$. Hence, this method is useful for functions $$f(x)$$ which can be approximated by polynomials. Therefore, this method is for finding the integral $\int_{-1}^1 f(x)\,dx$ where $$f(x)$$ can be well approximated by a polynomial.

For finding an integral over the interval [a,b], that is, $\int_{a}^b f(x)\,dx$ change of variable can be used.

Generating evaluation points is done by finding roots of Legendre polynomials, hence the name of this method. Finding the roots has to be done numerically, but the coefficients can be computed directly. Since the roots lie within the open interval (-1, 1), the formulae are open integration formulae.

• ### Constructor Summary

Constructors
Constructor and Description
GaussLegendreQuadrature(int n)
Create an integrator of order n.

• ### Methods inherited from class com.numericalmethod.suanshu.analysis.integration.univariate.riemann.gaussian.GaussianQuadrature

getPrecision, integrate
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

public GaussLegendreQuadrature(int n)
n - the number of points in the quadrature rule