Divided differences
Library · Source module
Divided differences
The divided difference of values r_i at distinct nodes \mathbf{v}_i, i \in s, is r[s] = \sum_{i \in s} w_i\,r_i \,, \qquad w_i = \prod_{j \in s,\ j \ne i}(\mathbf{v}_i - \mathbf{v}_j)^{-1} \,, with Mathlib's nodal (barycentric) weights w_i = Lagrange.nodalWeight s v i. On q + 1 nodes it is the coefficient of X^q of the interpolant (dividedDifference_eq_coeff_interpolate, from Mathlib's Lagrange.coeff_eq_sum), so it is the leading coefficient of every polynomial of degree at most q and annihilates every polynomial of degree less than q. Conversely a vector of values orthogonal, in the plain sum, to every polynomial of degree less than q on the nodes is a multiple of the nodal weights (Lagrange.exists_eq_mul_nodalWeight). With positive weights u_i the weighted least-squares distance from r to the polynomials of degree less than q is r[s]^2 / \sum_i w_i^2/u_i (isLeast_sum_mul_sq_sub_eval).
These are the facts behind the lower bounds for Krylov methods on matrices with q + 1 distinct eigenvalues (NLAlib.Krylov.Functions.Optimality): the residual polynomial of a Galerkin method is orthogonal to the polynomials of degree less than q in the spectral weights of the starting vector, so its values on the eigenvalues are prescribed by the nodal weights.
Junk value: for nodes that are not distinct the nodal weights contain 0^{-1} = 0 and the definition is still the sum; every theorem assumes Set.InjOn v s.
Main definitions
* NLAlib.dividedDifference: r[s] = \sum_i w_i r_i.
Main results
* NLAlib.dividedDifference_eq_coeff_interpolate: the coefficient of X^q of the interpolant. * NLAlib.dividedDifference_eval_eq_coeff, NLAlib.dividedDifference_eval_eq_zero: on the values of a polynomial. * NLAlib.isLeast_sum_mul_sq_sub_eval: the weighted least-squares distance. * NLAlib.sum_neg_one_pow_mul_choose_mul_eval_eq_zero. * NLAlib.sum_eval_sq_le_equispacedInterpolationFactor_mul_sum_eval_sq_of_natDegree_lt.
Declarations
- NLAlib.dividedDifference
- NLAlib.dividedDifference_eq_coeff_interpolate
- NLAlib.dividedDifference_eval_eq_coeff
- NLAlib.dividedDifference_eval_eq_zero
- NLAlib.equispacedInterpolationFactor
- NLAlib.equispacedInterpolationFactor_def
- NLAlib.equispacedInterpolationFactor_le
- NLAlib.eval_sq_le_equispacedInterpolationFactor_mul_sum_eval_sq_of_natDegree_lt
- NLAlib.isLeast_sum_mul_sq_sub_eval
- NLAlib.sum_eval_sq_le_equispacedInterpolationFactor_mul_sum_eval_sq_of_natDegree_lt
- NLAlib.sum_neg_one_pow_mul_choose_mul_eval_eq_zero