You are on page 1of 2

January 3, 2012

Hermite Interpolation
Hermite polynomial is a Polynomial that agrees with the function and its first derivatie at x0 , ..., xn . The
degree of the unique polynomial is at most 2n + 1.
Let us use two points x0 and x1 . The degree of the polynomial is at most 3
P (xi ) = f (xi ) = a3 x3i + a2x2i + a1 xi + a0 ,
P (xi ) = f (xi ) = 3a3 x2i + 2a2 xi + a1 ,

(1)
(2)

There are four equations with four variables. Let assume that
x0 = 0, x1 = 1,
f0 = f (x0 ), f1 = f (x1 ),
f (x0 ) = 0 , f (x1 ) = 1 .
Substituting x0 = 0 in eqs. (1) and (2), we get a0 = f0 and a1 = 0 . In similar way, the subsitution of
x1 = 1 leads to the following system of equations
f1 = a3 + a2 + a1 + a0 ,
1 = 3a3 + 2a2 + a1 .
which gives
a3 + a2 = f1 (0 + f0 ),
3a3 + 2a2 = 1 0 .
The solution of this system are
a2 = 3(f1 f0 ) (1 + 20 ),
a3 = 2(f0 f1 ) + (1 + 0 .).
Thus,the coefficients ai of the cubic Hermite polynomial are:
a0
a1
a2
a3

=
=
=
=

f0 ,
0 ,
3(f1 f0 ) (1 + 20 ),
2(f0 f1 ) + (1 + 0 .).

Example:
Consider the function f (x) = ex . We have f (0) = f (0) = 1 and f (1) = f (1) = e. The Hermite polynomial

is given by
a0
a1
a2
a3

=
=
=
=

1,
1,
3(e 1) (e + 2) = 2 e 5,
2(1 e) + (e + 1) = 3 e,

P (x) = (3 e)x3 + (2 e 1)x2 + x + 1


One can see that P (0.5) = 1.644355686 and e0.5 = 1.648721271. The absolute error is about 0.0044.
x

Hermite Polynomial (dashed line) for e

2.5

1.5

1
0

0.2

0.4

0.6

0.8

Figure 1: The Hermite polymomial P (x) = (3 e)x3 + (2 e 1)x2 + x + 1 (solid lie)


is in good agreement with f (x) = ex (dashed line) on the interval [0, 1].

You might also like