Hermite interpolation
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 Chinese remainder theorem § Hermite interpolation. For yet another method, see,[1] which uses contour integration.
Statement of the problem
[edit]In the restricted formulation studied in [2], Hermite interpolation consists of computing a polynomial of degree as low as possible that matches an unknown function both in observed value, and the observed value of its first m derivatives at k distinct nodes. This means that n = k(m + 1) data conditions must be known: The resulting polynomial has a degree less than n. In a more general case, there is no need for m to be 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 data conditions n.
Let us consider a polynomial f(x) of degree less than n with indeterminate coefficients; that is, the coefficients of f(x) 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.
In general, such a system has exactly one solution. In,[1] Charles Hermite used contour integration to prove that this is effectively the case here, and to find the unique solution, provided that the xi are pairwise different. The Hermite interpolation problem 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.[3] The general methods of linear algebra, and specific methods for confluent Vandermonde matrices are often used for computing the interpolation polynomial, as detailed in § A perspective from linear algebra. Other methods are described below.
Explicit formula
[edit]For a given set of k 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 is the unique polynomial of degree at most that satisfies the interpolation conditions:
Define the complementary factor polynomial at node as:
For each node , let be the local -th degree Taylor polynomial matching the target derivative conditions:
The explicit closed-form formula for the Hermite interpolating polynomial is given by:
where denotes the b-th degree Taylor polynomial operator of a function expanded at a:
Thus, the local Taylor expansion term for node evaluates explicitly to:
Interpolating a function in closed form
[edit]When interpolating a function that is -times differentiable at each node , the interpolation conditions are determined by the function's derivatives (i.e., ). In this case, the local Taylor polynomial represents the -th degree Taylor expansion of at .
Since the operator isolates terms only up to order at , substituting in place of its local Taylor expansion yields the identical Taylor expansion up to order :
The explicit closed-form Hermite interpolating polynomial for can thus be expressed concisely as:
Basis polynomials in closed form
[edit]The Hermite interpolating polynomial can also be represented as a linear combination of Hermite basis polynomials :
An explicit closed-form expression for each basis polynomial can be obtained directly by choosing the local Taylor polynomial and setting for all . 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 polynomial simplifies to , giving the explicit closed-form expression:
Proof of the closed form
[edit]The proof proceeds in three steps. First, it shows that evaluating derivatives at any node isolates only the i-th term in the summation. Next, it verifies that this term matches the required derivative values via local Taylor expansion. Finally, it establishes that the resulting polynomial satisfies the degree bound and uniqueness.
Vanishing of cross-terms at distinct nodes
[edit]Fix an arbitrary target node and derivative order . Evaluating the j-th derivative of at yields:
For any node index , the factor polynomial contains as an explicit factor:
where .
By the general Leibniz rule, evaluating the j-th derivative of at produces a linear combination of terms involving for . Because , each derivative evaluates to 0 at :
Consequently, all terms in the summation vanish at .
Verification of target interpolation conditions
[edit]Evaluating the remaining term at :
Since the nodes are distinct, , so the rational function is analytic at . By definition of the Taylor operator , it expands locally around as:
Multiplying by yields:
Because the big O term represents an analytic function near with a zero of order at least , all of its derivatives of orders up to vanish at . Taking the j-th derivative () and evaluating at yields:
Thus, satisfies all n interpolation conditions .
Degree bound and uniqueness
[edit]For each node r, the degree of is at most , and . Therefore, each term in has degree at most , so .
To establish uniqueness, assume another polynomial of degree satisfies the same n conditions. Because for all and , the difference satisfies for all , meaning each node is a root of multiplicity at least . This gives n roots counted with multiplicity across the k nodes. A nonzero polynomial of degree at most cannot have n roots counted with multiplicity. Therefore, must be the zero polynomial, so .
Using Chinese remainder theorem
[edit]Let k 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 f such that
for , where the are given values in the same field as the .
These conditions implies that the Taylor polynomial of f of degree at is
In other words, the desired polynomial f 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.
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 i-th 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 a half extended Euclidean algorithm variant 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]Simple case when all k=2
[edit]When using divided differences to calculate the Hermite polynomial of a function f, the first step is to copy each point m times. (Here we will consider the simplest case for all points.) Therefore, given data points , 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 points . However, for some divided differences, which is undefined. In this case, the divided difference is replaced by . All others are calculated normally.
A more general case when k>2
[edit]In the general case, suppose a given point has k derivatives. Then the dataset contains k identical copies of . When creating the table, divided differences of identical values will be calculated as
For example, etc.
A fast algorithm for the fully general case is given by Schneider and Werner.[4] A slower but more numerically stable algorithm is given by Corless and Fillion.[5]
Example
[edit]Consider the function . Evaluating the function and its first two derivatives at , we obtain the following data:
| x | f(x) | f′(x) | f″(x) |
|---|---|---|---|
| −1 | 2 | −8 | 56 |
| 0 | 1 | 0 | 0 |
| 1 | 2 | 8 | 56 |
Since we have two derivatives to work with, we construct the set . Our divided difference table is then: and the generated polynomial is by taking the coefficients from the diagonal of the divided difference table, and multiplying the kth coefficient by , as we would when generating a Newton polynomial.
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
A perspective from 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.
Let k 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 V be the confluent Vandermonde matrix, let be its inverse, and let be the degree bound of the interpolating polynomial. The matrix H 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 sample 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 H:
In numerical practice, directly computing H 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.
Basis polynomials
[edit]For a given set of k 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 :
where each basis polynomial is uniquely defined as the interpolating polynomial of degree at most for the dual 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 k 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. Call the calculated polynomial f and original function y. Consider first the real-valued case. Without loss of generality, assume the nodes are ordered such that (since permuting the nodes yields the same interpolating polynomial). Evaluating at a point , the error function is where c is an unknown value within the range . 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 [5], 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 2 Hermite, Charles (1878). "Sur la formule d'interpolation de Lagrange". Journal für die reine und angewandte Mathematik. 84: 70–79.
- ↑ 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.
- ↑ 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.
- ↑ Schneider, C; Werner, W (1991). "Hermite Interpolation: The Barycentric Approach". Computing. 46: 35–51. doi:10.1007/BF02239010.
- 1 2 Corless, Robert M; Fillion, Nicolas (2013). A Graduate Introduction to Numerical Methods. New York: Springer. ISBN 978-1-4614-8452-3.
External links
[edit]- Hermites Interpolating Polynomial at Mathworld