Coefficients of the Interpolating Polynomial
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Polynomial Interpolation evaluates the interpolating polynomial at a target point without ever forming its coefficients explicitly — which is normally the right approach. Occasionally, though, the coefficients themselves are what is needed (e.g. to interpolate a function and several of its derivatives simultaneously, or to convolve tabulated data analytically with another function). This package provides two estimators for that narrower problem, described in Press et al., 2007, Section 3.5 (page 128).
Why this is a different, harder problem
Writing the interpolating polynomial as , the coefficients satisfy the linear system:
This is a Vandermonde system, and it can be considerably more ill-conditioned than evaluating the
interpolating polynomial at a point directly. In other words: finding interpolated values by
Polynomial Interpolation is a well-behaved problem even when finding the polynomial’s
coefficients is numerically difficult. Values recomputed from estimated coefficients also will not, in
general, pass exactly back through the original tabulated points, unlike direct interpolation. Both estimators
in this package build a polynomial of degree exactly
Two algorithms, two trade-offs
Lagrange formula with synthetic division
SimpleInterpolatingPolynomialEstimator builds the "master polynomial"
Successive reduction via Neville extrapolation
AccurateInterpolatingPolynomialEstimator instead reuses
PolynomialInterpolator's own Neville-algorithm machinery:
extrapolating the current interpolating polynomial to
Neither method works well for large
Library implementation
Both classes extend the abstract InterpolatingPolynomialEstimator, which provides the shared, convenient API
around each subclass’s estimate(x, y, cof):
-
estimate(double[] x, double[] y)— returns a newPolynomial(fromcom.irurueta.numerical.polynomials). -
estimateCoefficients(double[] x, double[] y)— returns the raw coefficient array. -
estimate(double[] x, double[] y, Polynomial result)/estimate(double[] x, double[] y, double[] cof)— fill an existing instance instead of allocating a new one.
|
If |