NLA-lib Explorer

NLAlib.integral_eval_eq_sum_of_degree_lt

Library · theorem

Interpolatory quadrature is exact below the number of nodes: for a finite measure \mu supported in [a, \mathbf{b}], distinct real nodes s and a real polynomial r of degree less than \lvert s\rvert, \int r\,d\mu = \sum_{\mathbf{x}\in s}\Bigl(\int\ell_\mathbf{x}\,d\mu\Bigr)r(\mathbf{x})\,, \ell_\mathbf{x} the Lagrange basis polynomial of \mathbf{x}: r is its own Lagrange interpolant.

NLAlib.integral_eval_eq_sum_of_degree_lt {μ : Measure ℝ} {s : Finset ℝ} [IsFiniteMeasure μ]
  {a b : ℝ} (hμ : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Icc a b) {r : Polynomial ℝ} (hr : r.degree < ↑s.card) :
  ∫ (x : ℝ), Polynomial.eval x r ∂μ =
    ∑ x ∈ s, (∫ (t : ℝ), Polynomial.eval t (Lagrange.basis s id x) ∂μ) * Polynomial.eval x r

Full source on GitHub

Import NLAlib.Polynomial.Orthogonal.Gauss.