Mathematics / Gauss-Legendre Quadrature
FREE TO EXPLORE
LABORATORY 28 · MATHEMATICS

Gauss-Legendre Quadrature: Optimal Orthogonal Nodes and Weights

Determine the optimal roots of Legendre orthogonal polynomials P_n(x), compute the Christoffel-Darboux quadrature weights, demonstrate algebraic exactness for all polynomials of degree ≤ 2n - 1, and verify the O(h⁶) super-convergence of the 3-point composite Gauss-Legendre rule. Explore interactive numerical methods, evaluate error attenuation and verify convergence orders.

COMPUTE · CONVERGE · ANALYSE

Your virtual mathematics laboratory.

GAUSS QUADRATURE ERROR |I - G_3(H)|—
COMPUTATION STATUS

Ready to execute Step = 1.

1 step
Legendre polynomial roots (n = 3): ξ₁ = -√(3/5) ≈ -0.774597, ξ₂ = 0, ξ₃ = +√(3/5) ≈ +0.774597

Adjust Step, then execute computation.

Mathematical operations are computed deterministically using 64-bit IEEE 754 precision. Residuals reflect ordinary least-squares regression across successive observations.

Numerical assumptions and limits

Standard Gauss-Legendre nodes are non-nested: doubling n requires discarding all previous function evaluations unless Gauss-Kronrod extensions are used. The simulation evaluates composite 3-point Gauss-Legendre quadrature for step sizes h = 0.20 / 2^{k-1}. The logarithmic regression ln(E) = α·ln(h) + ln(C) extracts the asymptotic order α = 6.000 with R² = 1.000000.

Computational tools & numerical modules.

Legendre Root Finder (Golub-Welsch)

Computes roots of P_n(x) as eigenvalues of the symmetric tridiagonal Jacobi matrix.

Christoffel Weight Calculator

Evaluates weights w_j = 2 / [(1 - x_j²) (P'_n(x_j))²] ensuring all weights are strictly positive.

Affine Domain Mapper

Maps canonical Gauss nodes from [-1, 1] to physical sub-intervals [x_i, x_{i+1}] via x = (x_i + x_{i+1})/2 + (h/2) ξ_j.

Smooth Transcendental Benchmark

Evaluates the analytic test integral ∫₀¹ exp(x) cos(x) dx = 0.5 (e (sin(1) + cos(1)) - 1).

Newton-Cotes vs Gauss Comparator

Contrasts the error efficiency of 3-point Gauss-Legendre (degree 5 exact) against 3-point Simpson (degree 3 exact).

Asymptotic Order Verifier

Performs linear regression on (ln(h), ln(E_h)) to confirm the theoretical sixth-order slope α = 6.000.

FOLLOW THE METHOD

A reason behind every step.

Determine the optimal roots of Legendre orthogonal polynomials P_n(x), compute the Christoffel-Darboux quadrature weights, demonstrate algebraic exactness for all polynomials of degree ≤ 2n - 1, and verify the O(h⁶) super-convergence of the 3-point composite Gauss-Legendre rule. Standardized input settings: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 step.

01

Calculate Canonical 3-Point Nodes and Weights

Set reference nodes ξ = {-√(3/5), 0, √(3/5)} and weights w = {5/9, 8/9, 5/9} on [-1, 1].

02

Verify Degree 5 Algebraic Precision

Integrate test monomials x⁰, x¹, x², x³, x⁴, x⁵ and verify zero residual error to double machine precision.

03

Partition Domain into N Sub-Panels

Subdivide [0, 1] into N = 2^{k-1} sub-panels with panel width h = 1.0 / N across refinement levels k = 1 to 6.

04

Apply Affine Map & Accumulate Integral

Map nodes to each sub-panel [a_i, b_i] and accumulate G_3(h) = ∑_{i=1}^N (h/2) ∑_{j=1}^3 w_j f(a_i + (h/2)(1 + ξ_j)).

05

Evaluate Absolute Quadrature Error

Compare G_3(h) against the exact analytic integral and verify error reduction by 2⁶ = 64 per mesh halving.

06

Fit Logarithmic Convergence Slope

Plot ln(E_h) versus ln(h) and compute the linear regression slope to verify α = 6.000.

YOUR NOTEBOOK · 0 OBSERVATIONS

Turn measurements into mathematical insight.

See a complete example report ↗

Points are your recorded observations. The solid regression line validates Gauss-Legendre Quadrature mathematical scaling.

LINEAR ASYMPTOTIC FIT · y = mx + b
ln(E_h) = α · ln(h) + ln(C)
#Subdivision Level (k) (step)Gauss Quadrature Error |I - G_3(h)| (error)Logarithmic Panel Width ln(h)Logarithmic Quadrature Error ln(E_h)Remove

No readings yet. Execute a computation and record it.

Calculate it yourself.

CHECK YOUR UNDERSTANDING

Explain what the mathematical metrics mean.

What is the maximum polynomial degree for which an n-point Gauss-Legendre quadrature rule is mathematically exact?

What is the asymptotic convergence order α of a composite 3-point Gauss-Legendre rule under panel spacing h?

What essential mathematical property prevents catastrophic subtractive cancellation in Gauss-Legendre quadrature?

Which algorithm computes Gauss quadrature nodes and weights as eigenvalues of a tridiagonal Jacobi matrix?