# HERMITE Hermite polynomial interpolating function and derivative values

HERMITE is a C++ library which constructs the Hermite polynomial which interpolates function and derivative values at given points.

In other words, the user supplies n sets of data, (x(i),y(i),yp(i)), and the algorithm determines a polynomial p(x) such that, for 1 <= i <= n

p(x(i)) = y(i)
p'(x(i)) = yp(i)

Note that p(x) is a "global" polynomial, not a piecewise polynomial. Given n data points, p(x) will be a polynomial of degree 2n-1. As the value n increases, the increasing degree of the interpolating polynomial makes it liable to oscillations between the data, and eventually to severe inaccuracy even at the data points.

Generally, the interpolation problem for a large number of data points should be handled differently, for instance by piecewise polynomials.

### Languages:

HERMITE is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

### Related Data and Programs:

BERNSTEIN_POLYNOMIAL, a C++ library which evaluates the Bernstein polynomials, useful for uniform approximation of functions;

CHEBYSHEV, a C++ library which computes the Chebyshev interpolant/approximant to a given function over an interval.

DIVDIF, a C++ library which computes interpolants by divided differences.

HERMITE_CUBIC, a C++ library which can compute the value, derivatives or integral of a Hermite cubic polynomial, or manipulate an interpolating function made up of piecewise Hermite cubic polynomials.

RBF_INTERP, a C++ library which defines and evaluates radial basis function (RBF) interpolants to multidimensional data.

SPLINE, a C++ library which includes many routines to construct and evaluate spline interpolants and approximants.

TEST_APPROX, a C++ library which defines test problems for approximation, provided as a set of (x,y) data.

TEST_INTERP_1D, a C++ library which defines test problems for interpolation of data y(x), depending on a 1D argument.

### Reference:

1. Philip Davis,
Interpolation and Approximation,
Dover, 1975,
ISBN: 0-486-62495-1,
LC: QA221.D33
2. Carl deBoor,
A Practical Guide to Splines,
Springer, 2001,
ISBN: 0387953663,
LC: QA1.A647.v27.

### List of Routines:

• DIF_DERIV computes the derivative of a polynomial in divided difference form.
• DIF_SHIFT_X replaces one abscissa of a divided difference table with a new one.
• DIF_SHIFT_ZERO shifts a divided difference table so that all abscissas are zero.
• DIF_TO_R8POLY converts a divided difference table to a standard polynomial.
• DIF_VALS evaluates a divided difference polynomial at a set of points.
• HERMITE_BASIS_0 evaluates a zero-order Hermite interpolation basis function.
• HERMITE_BASIS_1 evaluates a first-order Hermite interpolation basis function.
• HERMITE_DEMO computes and prints Hermite interpolant information for data.
• HERMITE_INTERPOLANT sets up a divided difference table from Hermite data.
• HERMITE_INTERPOLANT_RULE: quadrature rule for a Hermite interpolant.
• HERMITE_INTERPOLANT_VALUE evaluates the Hermite interpolant polynomial.
• R8_ABS returns the absolute value of an R8.
• R8_MAX returns the maximum of two R8's.
• R8POLY_ANT_VAL evaluates the antiderivative of an R8POLY in standard form.
• R8POLY_DEGREE returns the degree of a polynomial.
• R8POLY_PRINT prints out a polynomial.
• R8VEC_CHEBYSHEV_NEW creates a vector of Chebyshev spaced values.
• R8VEC_LINSPACE_NEW creates a vector of linearly spaced values.
• R8VEC_PRINT prints an R8VEC.
• R8VEC_PRODUCT returns the product of the entries of an R8VEC.
• R8VEC_UNIFORM_01 returns a unit pseudorandom R8VEC.
• TIMESTAMP prints the current YMDHMS date as a time stamp.

You can go up one level to the C++ source codes.

Last revised on 01 November 2011.