NLAlib.exists_integral_sub_integral_gaussQuadrature_eq
Library · theorem
Headline of gauss-quadrature-remainder
The Gauss quadrature remainder: for a finite measure \mu supported in [a, \mathbf{b}], a < \mathbf{b}, k > 0, and f continuous on [a, \mathbf{b}] and C^{2k} on (a, \mathbf{b}), there is \xi \in (a, \mathbf{b}) with \int f\,d\mu - \int f\,d\,\mathsf{gaussQuadrature}(\mu, k) = \frac{f^{(2k)}(\xi)}{(2k)!}\int\pi_k^2\,d\mu\,, \pi_k the monic orthogonal polynomial of degree k. When \mu has at most k support points both sides are 0. [Gautschi2004, Theorem 1.48]; [GolubMeurant2010, Ch. 6] (locators to check); there for f \in C^{2k}[a, \mathbf{b}]. Result: gauss-quadrature-remainder
NLAlib.exists_integral_sub_integral_gaussQuadrature_eq {μ : Measure ℝ} [IsFiniteMeasure μ] {a b : ℝ}
(hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) (hab : a < b) {k : ℕ} (hk : 0 < k) {f : ℝ → ℝ}
(hf : ContinuousOn f (Set.Icc a b)) (hf' : ContDiffOn ℝ (↑(2 * k)) f (Set.Ioo a b)) :
∃ ξ ∈ Set.Ioo a b,
∫ (x : ℝ), f x ∂μ - ∫ (x : ℝ), f x ∂gaussQuadrature μ k =
iteratedDeriv (2 * k) f ξ / ↑(2 * k).factorial *
∫ (x : ℝ), Polynomial.eval x (orthogonalPolynomial μ k) ^ 2 ∂μImport NLAlib.Polynomial.Orthogonal.Gauss.