NLA-lib Explorer

NLAlib.matchesMoments_gaussQuadrature

Library · theorem

Gauss quadrature: for a finite measure \mu supported in [a, \mathbf{b}] and every k, the k-point Gauss rule matches the first 2k moments of \mu: it integrates every real polynomial of degree less than 2k exactly. [Gautschi2004, Theorem 1.45]; [GolubMeurant2010, Ch. 6]; there for k at most the number of support points; past it the rule is \mu itself. Result: gauss-quadrature

NLAlib.matchesMoments_gaussQuadrature {μ : Measure ℝ} [IsFiniteMeasure μ] {a b : ℝ}
  (hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) (k : ℕ) : MatchesMoments μ (gaussQuadrature μ k) (2 * k)

Full source on GitHub

Import NLAlib.Polynomial.Orthogonal.Gauss.