Explore modules

Gauss–Legendre Quadrature

Move weighted interior nodes across an interval and test exactly which polynomial integrals two or three nodes reproduce.

Free theory article

Move 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:

  1. Start with Integrand = Quadratic, Nodes = 2, and Interval = Symmetric ([-1, 1]). Confirm Quadrature and Exact integral both equal 2/3 with Absolute error = 0.
  2. Switch Integrand to Quartic while keeping Nodes = 2. Observe that Quadrature drops to 2/9 against Exact integral = 0.4 (error 8/45).
  3. Change Nodes to 3 and Interval to Shifted ([0, 2]). Because degree 4 is below 2(3) - 1 = 5, Quadrature matches 32/5 = 6.4 with zero error.
  4. Select Integrand = Sextic with Nodes = 3 on Symmetric to see where the 3-node rule first incurs truncation error (Q3 = 6/25 = 0.24 vs. 2/7, error 8/175), then test Collapsed ([1, 1], zero weights) and Reversed ([1, -1], negative weights summing to -2).
Read the full free theory article