Gauss quadrature
Library · Source module
Gauss quadrature
The interpolatory quadrature rule of a measure \mu at distinct nodes s \subseteq \mathbb{R} puts at each node \mathbf{x} the weight \int\ell_\mathbf{x}\,d\mu, \ell_\mathbf{x} the Lagrange basis polynomial of \mathbf{x} (Mathlib's Lagrange.basis s id x); it integrates every polynomial of degree less than \lvert s\rvert exactly. When the nodal polynomial \pi_s(z) = \prod_{\mathbf{x}\in s}(z - \mathbf{x}) is orthogonal to the polynomials of degree less than \lvert s\rvert (the nodes are the zeros of the degree-\lvert s\rvert orthogonal polynomial of \mu), it is the Gauss rule: its weights are nonnegative, \int\ell_\mathbf{x}\,d\mu = \int\ell_\mathbf{x}^2\,d\mu, and it integrates every polynomial of degree less than 2\lvert s\rvert exactly, so it matches the first 2\lvert s\rvert moments of \mu.
The canonical k-point Gauss rule of \mu, gaussQuadrature μ k, is the interpolatory rule at the Gauss nodes gaussNodes μ k, the distinct real zeros of the monic orthogonal polynomial orthogonalPolynomial μ k (NLAlib.Polynomial.Orthogonal.Zeros). It is defined for every measure and every k; past the number of support points of \mu it is \mu itself. For spectral measures the Ritz values of the Lanczos method are Gauss nodes (NLAlib.HasOrthonormalCols.isOrthogonalPolynomial_nodal).
For f continuous on [a, \mathbf{b}] and C^{2k} on (a, \mathbf{b}) the k-point Gauss rule has the remainder \int f\,d\mu - \int f\,d\,\mathsf{gaussQuadrature}(\mu, k) = \frac{f^{(2k)}(\xi)}{(2k)!}\int\pi_k^2\,d\mu\,,\qquad \xi \in (a, \mathbf{b})\,, so it is a lower bound when f^{(2k)} \ge 0 and an upper bound when f^{(2k)} \le 0.
Main definitions
* NLAlib.interpolatoryQuadrature: the interpolatory rule as a measure. * NLAlib.gaussQuadrature: the canonical Gauss rule of a measure.
Main results
* NLAlib.integral_eval_eq_sum_of_degree_lt: interpolatory quadrature is exact below the number of nodes. * NLAlib.IsOrthogonalPolynomial.integral_eval_eq_sum_of_degree_lt_card_add: the exactness degree of an interpolatory rule. * NLAlib.IsOrthogonalPolynomial.integral_eval_eq_sum: Gauss quadrature is exact through degree 2\lvert s\rvert - 1. * NLAlib.IsOrthogonalPolynomial.integral_eval_basis_eq_integral_sq: the weights are nonnegative. * NLAlib.IsOrthogonalPolynomial.matchesMoments_interpolatoryQuadrature: the rule matches 2\lvert s\rvert moments. * NLAlib.integral_gaussQuadrature_eq_sum, NLAlib.integral_gaussQuadrature: the rule as a finite sum, in both weight forms. * NLAlib.matchesMoments_gaussQuadrature: Gauss quadrature, for every k. * NLAlib.ae_mem_Icc_gaussQuadrature, NLAlib.gaussQuadrature_real_univ: support and mass. * NLAlib.gaussQuadrature_real_singleton: the mass at a node is \int\ell_\mathbf{x}\,d\mu. * NLAlib.IsMomentPosDef.gaussQuadrature_real_singleton_pos: positive weights. * NLAlib.MatchesMoments.eq_gaussQuadrature: uniqueness of the Gauss rule. * NLAlib.abs_integral_sub_integral_gaussQuadrature_le_of_isUniformApproxOn, NLAlib.abs_integral_sub_integral_gaussQuadrature_le_of_lipschitzOnWith: error bounds. * NLAlib.abs_integral_sub_integral_gaussQuadrature_le_of_continuousOn: the bound 2E_{2k + 1}(f)\mu(\mathbb{R}). * NLAlib.gaussQuadrature_eq_self_of_integral_orthogonalPolynomial_sq_eq_zero: the terminating case. * NLAlib.exists_integral_sub_integral_eval_eq: the mean-value step shared by the Gauss, Radau and Lobatto remainders. * NLAlib.exists_integral_sub_integral_gaussQuadrature_eq: the Gauss remainder. * NLAlib.integral_gaussQuadrature_le_integral_of_iteratedDeriv_nonneg, NLAlib.integral_le_integral_gaussQuadrature_of_iteratedDeriv_nonpos: one-sided bounds.
Declarations
- NLAlib.IsMomentPosDef.gaussQuadrature_real_singleton_pos
- NLAlib.IsOrthogonalPolynomial.integral_eval_basis_eq_integral_sq
- NLAlib.IsOrthogonalPolynomial.integral_eval_eq_sum
- NLAlib.IsOrthogonalPolynomial.integral_eval_eq_sum_of_degree_lt_card_add
- NLAlib.IsOrthogonalPolynomial.integral_interpolatoryQuadrature
- NLAlib.IsOrthogonalPolynomial.matchesMoments_interpolatoryQuadrature
- NLAlib.MatchesMoments.eq_gaussQuadrature
- NLAlib.abs_integral_sub_integral_gaussQuadrature_le_of_continuousOn
- NLAlib.abs_integral_sub_integral_gaussQuadrature_le_of_isUniformApproxOn
- NLAlib.abs_integral_sub_integral_gaussQuadrature_le_of_lipschitzOnWith
- NLAlib.ae_mem_Icc_gaussQuadrature
- NLAlib.ae_mem_interpolatoryQuadrature
- NLAlib.exists_integral_sub_integral_eval_eq
- NLAlib.exists_integral_sub_integral_gaussQuadrature_eq
- NLAlib.gaussQuadrature
- NLAlib.gaussQuadrature_eq_self_of_integral_orthogonalPolynomial_sq_eq_zero
- NLAlib.gaussQuadrature_real_singleton
- NLAlib.gaussQuadrature_real_univ
- NLAlib.integrable_gaussQuadrature
- NLAlib.integral_eval_eq_sum_of_degree_lt
- NLAlib.integral_gaussQuadrature
- NLAlib.integral_gaussQuadrature_eq_sum
- NLAlib.integral_gaussQuadrature_le_integral_of_iteratedDeriv_nonneg
- NLAlib.integral_le_integral_gaussQuadrature_of_iteratedDeriv_nonpos
- NLAlib.interpolatoryQuadrature
- NLAlib.interpolatoryQuadrature_eq_self_of_ae_mem
- NLAlib.isFiniteMeasure_gaussQuadrature
- NLAlib.isFiniteMeasure_interpolatoryQuadrature
- NLAlib.matchesMoments_gaussQuadrature