5.4 Gaussian quadrature
Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §5.4. Rewritten in original wording. Continues 5.3 Integration. Labs: 5.4b Gaussian quadrature labs.
Weighting function and exactness for high-degree polynomials
Rewrite the basic weighted sum by splitting off a weight from a smoother piece :
Gaussian quadrature chooses both the nodes and the weights so the rule is exact whenever is a polynomial of degree at most . That is an extraordinary bargain: evaluations match what a naive equal-spacing rule would need far more points to approach. The price is that the are not equally spaced — and, for the classical families, never sit exactly at the endpoints or . Different give entirely different node sets.
If is smooth (or can be made smooth by peeling off a singular or peaked factor), Gauss usually beats trapezoid / Simpson at the same . If the integrand changes character across the domain, split the integral and add the pieces — “smart” library integrators do that automatically.
| Integral | Name |
|---|---|
| Gauss–Legendre | |
| Gauss–Chebyshev | |
| Gauss–Hermite | |
| Gauss–Laguerre | |
| Associated Gauss–Laguerre |
For ordinary Gauss–Legendre on , the nodes are the zeros of the Legendre polynomial , and the weights involve :
Libraries, classical tables, or a short root finder will produce . A four-point check set (positive half; mirror with ):
Sum of all four weights on is (integral of ).
Mapping Gaussian points
Elementary Gauss–Legendre data live on . Write for the reference nodes/weights on . Walk each target interval — pick the matching map equation (lookalikes included).
Derivation sketch (Gauss–Legendre)
Walk the argument one sentence at a time — at each step pick the matching equation (two lookalikes included).
Coda. Nodes = zeros of kill the term in the discrete sum. The classical weights
then make the rule exact for every polynomial of degree .
Gaussian quadrature
1 / 3Order the Gauss–Legendre exactness argument (top = first).
OrderDrag the handle to rearrange — top should be first.
- 1Write f = q P_N + r; orthogonality ⇒ ∫f = ∫r
- 2Want ∫f = Σ w_i f(x_i) exact for deg ≤ 2N−1
- 3Expand Σ w_i f(x_i) = Σ w_i q P_N + Σ w_i r
- 4Pick nodes as zeros of P_N so the q-sum vanishes
Drag items into the correct order (or use ↑↓), then check.