Jump to content

Hermite interpolation

From Wikipedia, the free encyclopedia

In numerical analysis, Hermite interpolation, named after Charles Hermite, is a method of polynomial interpolation, which generalizes Lagrange interpolation. Lagrange interpolation allows computing a polynomial of degree less than n that takes the same value at n given points as a given function. Instead, Hermite interpolation computes a polynomial of degree fewer than n such that the polynomial and its first few derivatives have the same values at m (fewer than n) given points as the given function and its first few derivatives at those points. The number of pieces of information, function values and derivative values, must add up to .

Hermite's method of interpolation is closely related to the Newton's interpolation method, in that both can be derived from the calculation of divided differences. However, there are other methods for computing a Hermite interpolating polynomial. One can use linear algebra, by taking the coefficients of the interpolating polynomial as unknowns, and writing as linear equations the constraints that the interpolating polynomial must satisfy. For another method, see § Using Chinese remainder theorem. For yet another method, see § Using contour integration.

Hermite interpolating polynomials are also related to matrix generalized eigenspace projection via generalized Frobenius covariants.

Statement of the problem

[edit]

In a restricted formulation[1], Hermite interpolation consists, given a differentiable function, of computing a polynomial function of degree as low as possible such that the two functions and their first r derivatives take the same values at m different points. This means that one starts from ⁠⁠ constraints, each resulting of one of the following given pairs of values: As a polynomial of degree less than n is defined by n coefficients, the resulting polynomial must have a degree less than n, since, otherwise, the solution could not be unique. In a more general case, there is no need for r to have a fixed value; that is, some points may have more known derivatives than others. In this case the resulting polynomial has a degree less than the total number of constraints n.

A theorem, commonly known as the Hermite interpolation theorem, asserts the existence and uniqueness of the resulting polynomial.[2]

Let us consider a polynomial ⁠⁠ of degree less than n with indeterminate coefficients; that is, the coefficients of ⁠⁠ are n new variables. Then, by writing the constraints that the interpolating polynomial must satisfy, one gets a system of n linear equations in n unknowns.

Hermite used contour integration to prove that this is effectively the case here, and to find the unique solution, provided that the ⁠⁠ are pairwise different.[3] Hermite interpolation is a problem of linear algebra that has the coefficients of the interpolation polynomial as unknown variables and a confluent Vandermonde matrix as its matrix.[4] The general methods of linear algebra, and specific methods for confluent Vandermonde matrices are often used for computing the interpolation polynomial, as detailed in § Using linear algebra. Other methods are described below.

Explicit formula

[edit]

For a given set of m distinct nodes ⁠⁠ with associated maximum derivative orders ⁠⁠, let ⁠⁠ be the multiplicity of node ⁠⁠, and let ⁠⁠ be the total number of conditions. Given a target function ⁠⁠, the Hermite interpolating polynomial ⁠⁠ is the unique polynomial of degree at most ⁠⁠ that satisfies the interpolation conditions:

The explicit closed-form formula for the Hermite interpolating polynomial ⁠⁠ is given by:[5][6] where ⁠⁠ and ⁠⁠ denotes the kth degree Taylor operator of a function ⁠⁠ centered at ⁠⁠.

When only the prescribed interpolation conditions ⁠⁠ are given, for each node ⁠⁠, let ⁠⁠ be the prescribed local ⁠⁠th degree Taylor polynomial of ⁠⁠ at ⁠⁠: Using the Taylor composition theorem,[7] ⁠⁠ can be directly substituted with the prescribed local ⁠⁠th degree Taylor polynomial ⁠⁠ inside any ⁠⁠th degree Taylor operators at ⁠⁠, giving the explicit closed-form formula in terms of the prescribed interpolation conditions:

When ⁠⁠ for all distinct nodes ⁠⁠, meaning no derivative conditions are specified, this explicit closed-form formula reduces directly to the explicit formula of Lagrange polynomials.

Basis polynomials in closed form

[edit]

The Hermite interpolating polynomial ⁠⁠ can also be represented as a linear combination of Hermite basis polynomials ⁠⁠:[8]

An explicit closed-form expression for each basis polynomial ⁠⁠ can be obtained directly by prescribing ⁠⁠ for ⁠⁠ and ⁠⁠, where ⁠⁠ denotes the Kronecker delta, and constructing the corresponding prescribed local Taylor polynomials: Substituting ⁠⁠ into the explicit formula yields:

Following the § Alternative basis construction via degree-0 basis polynomials, the full set of basis polynomials can be constructed entirely using only the degree-0 basis polynomial ⁠⁠. For ⁠⁠, the local Taylor polynomials simplify to ⁠⁠, giving the explicit closed-form expression:

An alternative recursively-defined explicit basis polynomial expression is given by:[8]

Using Chinese remainder theorem

[edit]

Let m be a positive integer representing the number of distinct nodes, ⁠⁠ be nonnegative integers specifying the maximum derivative order at each node, ⁠⁠ be the multiplicity of node ⁠⁠, and the nodes ⁠⁠ be real numbers or elements of any other field of characteristic zero. The Hermite interpolation problem consists of finding a polynomial ⁠⁠ such that for ⁠⁠, where the ⁠⁠ are given values in the same field as the ⁠⁠.

These conditions implies that the Taylor polynomial of ⁠⁠ of degree ⁠⁠ at ⁠⁠ is In other words, the desired polynomial ⁠⁠ is congruent to this polynomial ⁠⁠ modulo ⁠⁠.

The Chinese remainder theorem for polynomials implies that there is exactly one solution of degree less than ⁠⁠.

Moreover, this solution can be computed with ⁠⁠ arithmetic operations, or even faster with fast polynomial multiplication.

This approach does not work in positive characteristic, because of the denominators of the coefficients of the Taylor polynomial. The approach through divided differences, below, works in every characteristic.

Explicit construction via Chinese remainder theorem

[edit]

For general Hermite interpolation, an explicit solution satisfying the system of simultaneous congruences can be constructed directly by following the constructive proof of the Chinese remainder theorem.[9]

The target polynomial ⁠⁠ must satisfy the system of modular equivalences: where ⁠⁠ is the modulus polynomial at node ⁠⁠.

The solution is constructed iteratively by building a sequence of polynomials ⁠⁠ such that ⁠⁠ satisfies the first i congruences.

1. Base Step: Set the initial partial solution for ⁠⁠:

2. Inductive Step: Define ⁠⁠ for ⁠⁠. For ⁠⁠, since ⁠⁠ and ⁠⁠ share no roots and thus are coprime. By Bézout's identity, there exist polynomials ⁠⁠ and ⁠⁠ satisfying:

The polynomials ⁠⁠ and ⁠⁠ can be solved together using the polynomial extended Euclidean algorithm.

Define the ith partial solution ⁠⁠ as:

This construction satisfies all conditions up to node i:

  • Modulo ⁠⁠, the term containing ⁠⁠ vanishes while ⁠⁠, giving ⁠⁠.
  • Modulo ⁠⁠ for any ⁠⁠, ⁠⁠ and ⁠⁠, giving ⁠⁠.

After ⁠⁠ inductive steps, the final interpolating polynomial ⁠⁠ is obtained by reducing ⁠⁠ modulo the total degree product polynomial ⁠⁠:

Basis polynomials via Chinese remainder theorem

[edit]

Following § Alternative basis construction via degree-0 basis polynomials, a full basis can be constructed by only solving the degree-0 basis polynomials ⁠⁠, which can be obtained in a simplified manner.

For each node ⁠⁠, the degree-0 basis polynomial ⁠⁠ must satisfy:

  • ⁠⁠,
  • ⁠⁠.

To satisfy the zero-remainder conditions at all other nodes ⁠⁠, ⁠⁠ must contain the product factor ⁠⁠. Thus, ⁠⁠ for some polynomial ⁠⁠.

Since ⁠⁠ and ⁠⁠ share no roots and thus are coprime, Bézout's identity guarantees the existence of polynomials ⁠⁠ and ⁠⁠ satisfying:

Taking this relation modulo ⁠⁠, the term ⁠⁠ vanishes, showing that ⁠⁠ is a modular multiplicative inverse of ⁠⁠:

Since the polynomial ⁠⁠ is not required for the construction, ⁠⁠ can be computed directly using half extended Euclidean algorithm that tracks only one set of Bézout coefficients.

Because the degree of the modular inverse ⁠⁠ obtained via the extended Euclidean algorithm is strictly less than ⁠⁠, and ⁠⁠, the product degree is bounded by: Thus, ⁠⁠, meaning the product ⁠⁠ already satisfies the degree constraint without requiring any further modular reduction, yielding directly the unique degree-0 basis polynomial ⁠⁠.

For any individual simple node ⁠⁠ with no derivative conditions (⁠⁠), ⁠⁠. By the polynomial remainder theorem, the modular condition ⁠⁠ simplifies to the point evaluation ⁠⁠. In this case, ⁠⁠ reduces to a scalar constant that can be evaluated directly in closed form:

Using divided differences

[edit]

For a given set of m distinct nodes ⁠⁠ with associated maximum derivative orders ⁠⁠, let ⁠⁠ be the multiplicity of node ⁠⁠, and let ⁠⁠ be the total number of conditions. An efficient way to construct the Hermite interpolating polynomial ⁠⁠ is by extending Newton's divided difference method.[10][11][12] Since Newton interpolation and Lagrange interpolation construct the exact same unique polynomial for a distinct set of nodes, Newton's method can be generalized to the confluent case where distinct nodes coalesce via confluent divided differences. To interpolate a function ⁠⁠ or a given set of derivative conditions ⁠⁠ (for ⁠⁠ and ⁠⁠), the original set of nodes is transformed into a dataset ⁠⁠ by repeating each node ⁠⁠ according to its multiplicity ⁠⁠ times: When constructing the divided difference table for this dataset, the standard finite difference quotient for identical confluent nodes would result in an undefined ⁠⁠ expression; these entries are directly replaced by the corresponding scaled derivative values ⁠⁠ (or ⁠⁠). The interpolating polynomial is then represented in Newton form:[13][14] Once the target function and derivative values are known, this generalized construction requires only basic algebraic operations (addition, subtraction, multiplication, and division) to compute the divided difference table and construct the polynomial.

Through Cauchy's integral formula for confluent divided differences, constructing the Hermite interpolating polynomial via divided differences can also be viewed as a contour integration approach, providing an alternative formulation to the integral representation described in § Using contour integral.

Simple case with only first derivatives

[edit]

Here we will consider only the simplest case ⁠⁠ (i.e., ⁠⁠) for all distinct nodes. Therefore, given m distinct nodes ⁠⁠, and values ⁠⁠ and ⁠⁠ for a function ⁠⁠ that we want to interpolate, we create a new dataset ⁠⁠ such that

Now, we create a divided differences table for the nodes ⁠⁠. However, for some divided differences, which is undefined. In this case, the divided difference is replaced by ⁠⁠. All others are calculated normally.

General case for higher-order derivatives

[edit]

In the general case, suppose a given node ⁠⁠ has up to ⁠⁠th order derivatives. Then the dataset ⁠⁠ contains ⁠⁠ adjacent identical copies of ⁠⁠. When creating the table, divided differences of ⁠⁠ (for ⁠⁠) identical values will be calculated as[15]

For example, etc.

A fast algorithm for the fully general case is given by Schneider and Werner.[16] A slower but more numerically stable algorithm is given by Corless and Fillion.[17]

Example

[edit]

Case of uniform derivative orders

[edit]

Consider the function ⁠⁠. Evaluating the function and its first two derivatives at ⁠⁠, we obtain the following data:

⁠⁠⁠⁠⁠⁠⁠⁠
−12−856
0100
12856

Since we have two derivatives to work with, we construct the dataset Our divided difference table is then: and by taking the coefficients from the diagonal of the divided difference table, and multiplying the ith coefficient by ⁠⁠, as we would when constructing Newton form to generate a Newton polynomial, the generated polynomial ⁠⁠ is

Case of non-uniform derivative orders

[edit]

Consider the following set of derivative conditions ⁠⁠ at nodes ⁠⁠:

⁠⁠⁠⁠⁠⁠⁠⁠
1−112
201
31-1-2

For this example with non-uniform derivative orders, we construct the dataset Denoting the divided differences as ⁠⁠ when constructed from the derivative conditions ⁠⁠, the constructed divided difference table is given by: and the generated polynomial ⁠⁠ in Newton form is

Using linear algebra

[edit]

The interpolation problem can also be formulated and solved directly using linear algebra in a similar way to Lagrange interpolation, by replacing the standard Vandermonde matrix with a confluent Vandermonde matrix to account for both function values and derivative conditions at each node.[18][19]

Let m be the number of distinct nodes ⁠⁠, let ⁠⁠ be the multiplicity of node ⁠⁠ representing the number of specified values including derivatives, and let ⁠⁠ be the total number of data conditions. Let ⁠⁠ be the constructed confluent Vandermonde matrix, let ⁠⁠ be its inverse, and let ⁠⁠ be the degree bound of the interpolating polynomial. The matrix ⁠⁠ is given by:

The sample vector ⁠⁠ stacks all target function values and derivative constraints into a single column vector of total dimension n. The pair of node index i and derivative index j is mapped to a single flattened index ⁠⁠ via the indexing function:

Given the interpolation condition vector ⁠⁠, the coefficient vector ⁠⁠ of the Hermite interpolating polynomial ⁠⁠ can be computed as:

Furthermore, the individual Hermite interpolating basis polynomials ⁠⁠ correspond to the basis polynomials ⁠⁠ in the flattened indexing under ⁠⁠, allowing the interpolating polynomial to be expressed equivalently as: The basis polynomials ⁠⁠ can be constructed directly from the columns of ⁠⁠:

In numerical practice, directly computing ⁠⁠ by inverting the confluent Vandermonde matrix is generally avoided because confluent Vandermonde matrices are notoriously ill-conditioned. As the number of nodes or their degree increases, their condition number grows exponentially, making direct matrix inversion numerically unstable and highly sensitive to floating-point errors.

Using contour integration

[edit]

An elegant representation and derivation of the Hermite interpolating polynomial can be obtained using contour integration in the complex plane, a formulation originally introduced by Charles Hermite in 1878.[3]

Let m be the number of distinct interpolation nodes ⁠⁠, with corresponding multiplicities ⁠⁠. The total number of interpolation conditions is ⁠⁠. Define the product polynomial of all node factors as

Suppose the target function f is analytic inside and on a positively oriented simple closed contour ⁠⁠ in the complex plane that encloses the evaluation point ⁠⁠ as well as all nodes ⁠⁠. The Hermite interpolating polynomial ⁠⁠ of degree at most ⁠⁠ can be expressed as

Alternatively, by expressing ⁠⁠ via Cauchy's integral formula as and absorbing it into the integral, ⁠⁠ can be written equivalently as

Derivation using residues

[edit]

Consider the meromorphic function

Assuming ⁠⁠ is not one of the nodes ⁠⁠, ⁠⁠ has the following poles inside ⁠⁠:

  • A simple pole at ⁠⁠.
  • Poles at ⁠⁠ with order ⁠⁠ for each ⁠⁠.

By the residue theorem, integrating ⁠⁠ along ⁠⁠ yields

The residue at the simple pole ⁠⁠ is easily evaluated as

Substituting this residue back into the integral equation gives

Rearranging terms to isolate ⁠⁠ gives

Each residue ⁠⁠ is a rational function in ⁠⁠ whose denominator factors are cancelled out by ⁠⁠. Summing these terms yields a polynomial in ⁠⁠ of degree at most ⁠⁠ that satisfies all interpolation conditions. Thus, it corresponds precisely to the Hermite interpolating polynomial ⁠⁠: Substituting this definition into the expression for ⁠⁠ and rearrange yields

Consequently, the interpolation error ⁠⁠ (see also § Error) is given directly by the integral term:

Using orthogonal projection

[edit]

The Hermite interpolating polynomial can also be constructed via an orthogonal projection onto the space of polynomials of degree at most ⁠⁠. By defining a suitable inner product based on the nodes and their derivative conditions, an orthogonal polynomial basis can be generated, allowing the interpolant to be expressed as a series of orthogonal projections.[20]

Let ⁠⁠ be the distinct interpolation nodes, let ⁠⁠ denote the maximum derivative order prescribed at node ⁠⁠, and let ⁠⁠ be the multiplicity of the node ⁠⁠. The total number of conditions is ⁠⁠, and the Hermite interpolating polynomial ⁠⁠ belongs to the space of polynomials of degree at most ⁠⁠.

We define an inner product on this polynomial space by: with ⁠⁠ denoting the induced norm.

An orthogonal basis ⁠⁠ for the polynomial space can be constructed using the Gram-Schmidt process. Starting with ⁠⁠, subsequent basis polynomials are constructed recursively for ⁠⁠ by:

The Hermite interpolating polynomial ⁠⁠ is given by the orthogonal projection of the target function ⁠⁠ onto the basis: or using the normalized orthonormal basis polynomials ⁠⁠,

If only the prescribed derivative conditions ⁠⁠ are given instead of an explicit target function ⁠⁠, the inner product terms ⁠⁠ can be evaluated directly using ⁠⁠ via:

Common low-degree cases

[edit]

Cubic Hermite spline

[edit]

Cubic Hermite splines are widely used in numerical analysis, computer graphics, and motion planning for keyframe animation, path trajectories, and geometric modeling because they ensure smooth ⁠⁠ continuity while providing precise local control over both endpoint positions and tangents.

On the unit interval ⁠⁠, the two endpoints are defined as ⁠⁠ and ⁠⁠, the cubic Hermite interpolant ⁠⁠ is uniquely determined by boundary values and first derivatives ⁠⁠:

where the four basis polynomials are:

For rescaling to arbitrary intervals, piecewise multi-interval construction, or extension to 2D/3D parametric curves, see Cubic Hermite spline.

Quintic Hermite interpolation

[edit]

The quintic Hermite interpolation based on the function ⁠⁠, its first ⁠⁠ and second derivatives ⁠⁠ at two different points (⁠⁠ and ⁠⁠) can be used for example to interpolate the position of an object based on its position, velocity and acceleration. The general form is given by

Basis polynomials

[edit]

For a given set of m distinct nodes ⁠⁠ with associated maximum derivative orders ⁠⁠, let ⁠⁠ be the multiplicity of node ⁠⁠, and let ⁠⁠ be the total number of conditions. The Hermite interpolating polynomial ⁠⁠ can be expressed as a linear combination of basis polynomials ⁠⁠:[8] where each basis polynomial ⁠⁠ is uniquely defined as the interpolating polynomial of degree at most ⁠⁠ for the basis conditions given by the Kronecker delta:

To construct a specific basis polynomial ⁠⁠ using general methods for solving Hermite interpolation (such as those described in this article), one specifies a system of target conditions ⁠⁠ across all nodes ⁠⁠ and derivative orders ⁠⁠:

By passing these target conditions ⁠⁠ as input values into any general method for solving Hermite interpolation, the resulting unique interpolating polynomial generated by the method is precisely the basis polynomial ⁠⁠. Repeating this process for each pair of indices ⁠⁠ constructs the full set of n basis polynomials.

Alternative basis construction via degree-0 basis polynomials

[edit]

Let ⁠⁠ be the polynomial of degree n, which vanishes at each node ⁠⁠ with multiplicity ⁠⁠. Once the degree-0 basis polynomials ⁠⁠ (corresponding to the function value condition ⁠⁠ at node ⁠⁠) are obtained, the higher-order derivative basis polynomials ⁠⁠ for ⁠⁠ can be constructed directly via polynomial reduction:

Taking the remainder modulo ⁠⁠ guarantees that ⁠⁠, projecting the polynomial into the subspace of degree at most ⁠⁠. Because ⁠⁠ vanishes at every node ⁠⁠ to order ⁠⁠, all target derivative evaluation conditions at the nodes are preserved under this modular reduction. This bounds the degree and ensures that each constructed ⁠⁠ is the unique polynomial of degree at most ⁠⁠ satisfying its corresponding interpolation conditions.

This construction is particularly advantageous when direct evaluation of higher-order basis polynomials ⁠⁠ is computationally expensive or numerically unstable. In some cases, the degree-0 basis polynomials ⁠⁠ are simply cleaner and easier to construct and compute, allowing all remaining derivative basis polynomials for that node to be generated efficiently through straightforward polynomial multiplication and modular reduction.

Error

[edit]

Let m be the number of distinct nodes ⁠⁠, let ⁠⁠ be the multiplicity of node ⁠⁠ representing the number of specified values including derivatives, and let ⁠⁠ be the total number of interpolation conditions. Denote the constructed Hermite interpolating polynomial as ⁠⁠ and the original function as ⁠⁠. Consider first the real-valued case. Let ⁠⁠ and ⁠⁠. Evaluating at a point ⁠⁠, the error function is[21] where c is an unknown value within the range ⁠⁠, derived using a generalization of the mean value theorem for divided differences to confluent nodes. The degree of the product polynomial on the right is n, which is one higher than the degree bound ⁠⁠ for ⁠⁠. Furthermore, the error and all its derivatives up to order ⁠⁠ are zero at each node ⁠⁠, as expected.

In the complex case, as described for example on p. 360 in [17], where the contour C encloses z and all the nodes ⁠⁠, and ⁠⁠ is the product polynomial of all node factors.

See also

[edit]

References

[edit]
  1. ↑ Traub, J. F. (December 1964). "On Lagrange—Hermite interpolation". Journal of the Society for Industrial and Applied Mathematics. 12 (4): 886–891. doi:10.1137/0112076. JSTOR 2946361.
  2. ↑ Dubeau 2020, p. 258.
  3. 1 2 Hermite, Charles (1878). "Sur la formule d'interpolation de Lagrange". Journal für die reine und angewandte Mathematik. 84: 70–79.
  4. ↑ Spitzbart, A (January 1960). "A Generalization of Hermite Interpolation". American Mathematical Monthly. 67 (1): 42–46. doi:10.1080/00029890.1960.11989446. JSTOR 2308924. Retrieved 2 June 2024.
  5. ↑ Higham 2008, Eq. (1.8).
  6. ↑ Buchheim, Arthur (August 1886). "An Extension of a Theorem of Professor Sylvester's relating to Matrices". The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science. Fifth Series. 22 (135): 173–174. doi:10.1080/14786448608627914. ISSN 1941-5982.
  7. ↑ Malgrange, Bernard (1966). Ideals of Differentiable Functions. Tata Institute of Fundamental Research Studies in Mathematics. Oxford: Oxford University Press. p. 16. ISBN 978-0-19-635241-1.
  8. 1 2 3 Dubeau 2020, pp. 273–274.
  9. ↑ Rosen, Kenneth H. (1993). Elementary Number Theory and its Applications (3rd ed.). Addison-Wesley. p. 136. ISBN 978-0201-57889-8.
  10. ↑ de Boor 2005.
  11. ↑ Higham 2008, Appendix B.16.
  12. ↑ Dubeau 2020, pp. 274–276.
  13. ↑ de Boor 2005, Proposition 7.
  14. ↑ Higham 2008, Eq. (1.10).
  15. ↑ de Boor 2005, p. 56.
  16. ↑ Schneider, C; Werner, W (1991). "Hermite Interpolation: The Barycentric Approach". Computing. 46: 35–51. doi:10.1007/BF02239010.
  17. 1 2 Corless, Robert M; Fillion, Nicolas (2013). A Graduate Introduction to Numerical Methods. New York: Springer. ISBN 978-1-4614-8452-3.
  18. ↑ Kalman, D. (1984). "The Generalized Vandermonde Matrix". Mathematics Magazine. 57 (1): 15–21. doi:10.1080/0025570X.1984.11977069.
  19. ↑ Dubeau 2020, p. 272.
  20. ↑ Dubeau 2020, pp. 276–277.
  21. ↑ Dubeau 2020, p. 261.
[edit]