Theorem (exists_integral_sub_integral_lobattoQuadrature_eq). The Gauss–Lobatto remainder: for a finite measure \mu supported in [a, \mathbf{b}], a < \mathbf{b}, every k, and f continuous on [a, \mathbf{b}] and C^{2k+2} on (a, \mathbf{b}), there is \xi \in (a, \mathbf{b}) with \int f\,d\mu - \int f\,d\,\mathsf{lobattoQuadrature}(\mu, a, \mathbf{b}, k) = \frac{f^{(2k+2)}(\xi)}{(2k+2)!}\int(\mathbf{x} - a)(\mathbf{x} - \mathbf{b})\,\hat\pi_k(\mathbf{x})^2\,d\mu(\mathbf{x})\,, \hat\pi_k the monic orthogonal polynomial of degree k of lobattoMeasure μ a b. [Gautschi2004, Theorem 3.7]; [GolubMeurant2010, Ch. 6] (locators to check).
Headline
Lean statement and details
NLAlib.exists_integral_sub_integral_lobattoQuadrature_eq {μ : Measure ℝ} [IsFiniteMeasure μ]
{a b : ℝ} (hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) (hab : a < b) (k : ℕ) {f : ℝ → ℝ}
(hf : ContinuousOn f (Set.Icc a b)) (hf' : ContDiffOn ℝ (↑(2 * k + 2)) f (Set.Ioo a b)) :
∃ ξ ∈ Set.Ioo a b,
∫ (x : ℝ), f x ∂μ - ∫ (x : ℝ), f x ∂lobattoQuadrature μ a b k =
iteratedDeriv (2 * k + 2) f ξ / ↑(2 * k + 2).factorial *
∫ (x : ℝ),
(x - a) * (x - b) *
Polynomial.eval x (orthogonalPolynomial (lobattoMeasure μ a b) k) ^ 2 ∂μ