Gauss–Legendre Quadrature
Move weighted interior nodes across an interval and test exactly which polynomial integrals two or three nodes reproduce.
Free theory articleMove weighted interior nodes across an interval and test exactly which polynomial integrals two or three nodes reproduce.
Concept & interpretation
Gauss–Legendre quadrature is a high-precision numerical integration method that optimizes both the positions of interior evaluation nodes (the roots of Legendre polynomials Pn(t) on [-1, 1]) and their weights so an n-node rule integrates every polynomial of degree up to 2n - 1 with zero truncation error.
Interactive Experiment
Verify degree exactness and interval orientation in the Gauss–Legendre Quadrature interactive workspace:
- Start with Integrand = Quadratic, Nodes = 2, and Interval = Symmetric (
[-1, 1]). Confirm Quadrature and Exact integral both equal2/3with Absolute error = 0. - Switch Integrand to Quartic while keeping Nodes = 2. Observe that Quadrature drops to
2/9against Exact integral = 0.4 (error8/45). - Change Nodes to 3 and Interval to Shifted (
[0, 2]). Because degree 4 is below2(3) - 1 = 5, Quadrature matches32/5 = 6.4with zero error. - Select Integrand = Sextic with Nodes = 3 on Symmetric to see where the 3-node rule first incurs truncation error (
Q3 = 6/25 = 0.24vs.2/7, error8/175), then test Collapsed ([1, 1], zero weights) and Reversed ([1, -1], negative weights summing to-2).