Theorem (matchesMoments_lobattoQuadrature). Gauss–Lobatto quadrature: for a finite measure \mu supported in [a, \mathbf{b}], a < \mathbf{b}, and every k, the Lobatto rule with k free nodes matches the first 2k + 2 moments of \mu: it integrates every real polynomial of degree at most 2k + 1 exactly. [Gautschi2004, Theorem 3.6]; [GolubMeurant2010, Ch. 6] (locators to check); there for \mu with more than k interior support points; otherwise the rule is \mu itself.
Headline
Lean statement and details
NLAlib.matchesMoments_lobattoQuadrature {μ : Measure ℝ} [IsFiniteMeasure μ] {a b : ℝ}
(hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) (hab : a < b) (k : ℕ) :
MatchesMoments μ (lobattoQuadrature μ a b k) (2 * k + 2)