You are on page 1of 22

Hermite Interpolation Polynomial

Zeki Onur Urhan


MCS 492 Final Project Report ADVISOR: Ins.OZLEM DEFTERL I

DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE CANKAYA UNIVERSITY SPRING 2009

Contents
1 Introduction 2 Preliminaries 3 Hermite Interpolation 4 Applications 5 Conclusion 3 5 9 17 20

I appreciate to Ozlem Defterli for her help and patience.

Chapter 1 Introduction
Charles Hermite (December 24, 1822 January 14, 1901) was a French mathematician who did research on number theory, quadratic forms, invariant theory, orthogonal polynomials, elliptic functions, and algebra. Hermite polynomials, Hermite normal form, Hermitian operators, and cubic Hermite splines are named in his honor. One of his students was Henri Poincar. He was the rst to prove that e(mathematical constant), the base of natural logarithms, is a transcendental number. His methods were later used by Ferdinand von Lindemann to prove that is transcendental. In a letter to Thomas Stieltjes in 1893, Hermite famously remarked: I turn with terror and horror from this lamentable scourge of continuous functions with no derivatives. Because bounding the error in Hermite interpolation in terms of the derivative which kills the interpolating space is of interest in numerical analysis and in the analysis of ordinary dierential equations, there is an extensive literature on the subject. In view of the recent work involving splines a large part of this is now superseded. It is expected that within the next few years a much better understanding of the problem and its history will be obtained. In this work my aim is to study the basic notions of Hermite Interpolation 3

and its error analysis. Then I presented its advantages and disadvantages via Lagrange Interpolation and its error analysis. Next I apply these interpolations to concrete examples. In rst chapter I try to explain Lagrange Interpolation. In second chapter I will explain Hermit Interpolation and the dierences between Lagrange Interpolation. In chapter three I apply Hermite and Lagrange Interpolation to some concrete examples.

Chapter 2 Preliminaries
Lagrange Interpolation: Given data discrete points x1 ; . . . ; xQ in 1-D and given a function f that is dened at these points, the Lagrange interpolating polynomial is the unique polynomial L of degree Q-1 which interpolates the function f at these points. By this we mean L(xi ) = f (xi ), i = 1, . . . , Q. The standard form for L is
Q

(2.1)

L(x) =
j=1

cj xj1 .

(2.2)

The coecients of L can be determined by substituting 3.2 into 3.1 and solving the resulting Q Q linear system for the cj . Alternatively, L one can

compute the Lagrange representation


Q

L(x) =
i=1

f (xi ) i (x)|; + E(x).

(2.3)

where the Lagrange basis functions are dened by xk ) 1kQ; k=1 (xi xk )
1kQ; k=1 (x

i (x)

(2.4) = (x x1 ) . . . (x xi1 )(x xi+1 ) . . . (x xQ ) (xi x1 ) . . . (xi xi1 )(xi xi+1 ) . . . (xi xQ )

Note that for each i, j = 1, . . . , Q


i (xj )

= i,j

where i , j denotes the Kronacker delta, whose value is 1 of i = j and 0 if i = j. Error Analysis for Lagrange If L(x) is the polynomial of degree Q - 1 which interpolates f(x) at {xi }Q (i=1) and if f C Q [a, b], then it can be shown that the pointwise approximation error is given by

1 dQ f E(x) = f (x) L(x) = (x )(x), Q! dxQ where


Q

f or some x (a, b),

(2.5)

(x)

(x xk ) = (x x1 )(x x2 ) . . . (x xQ )
(k=1)

(2.6)

Example 1: Assume f (x) = log(x). And f (2) = 0, 3010; f (3) = 0, 4771; f (4) = 0, 6021. Evaluate the Lagrange interpolation of f(2.4)? Solution: Lagrange interpolation from 3.3 gives

L(2.4) =

(0.4)(1.6) (0.4)(0.6) (0.6)(1.6) f (2) + f (3) + f (4) (1)(2) (1)(1) (2)(1) (2.7)

= 0.48 0.3010 + 0.64 0.4771 0.12 0.6021 = 0.3776

whereas the true value is log(2.4) = 0.3802. With an actual error 0.0026. From 3.5

E(x) which is a valid bound.

(0.4)(0.6)(1.6) 1 = 0.0070 6 4 ln 10

(2.8)

Example 2:Find an interpolation formula for f (x) = tan(x) given this set of known values: x0 = 1.5 f (x0 ) = 14.1014 x1 = 0.75 f (x1 ) = 0.931596 x2 = 0 f (x2 ) = 0 x3 = 0.75 f (x3 ) = 0.931596 x4 = 1.5 f (x4 ) = 14.1014 Solution:The basis polynomials are:
0 (x)

1 x x1 x x2 x x3 x x4 x(2x 3)(4x + 3)(4x 3) = x0 x1 x0 x2 x0 x3 x0 x4 243 (2.9)

1 (x)

8 x x 0 x x2 x x3 x x4 = x(2x 3)(2x + 3)(4x 3) x1 x0 x1 x2 x1 x3 x1 x4 243 (2.10) 3 x x 0 x x1 x x3 x x4 = (4x+3)(2x3)(2x+3)(4x3) x2 x0 x2 x 3 x2 x3 x2 x4 243 (2.11) x x 0 x x1 x x2 x x4 8 = x(2x 3)(2x + 3)(4x + 3) x3 x0 x3 x1 x3 x2 x3 x4 243 (2.12) 1 x x0 x x1 x x2 x x3 = x(4x 3)(2x + 3)(4x + 3) x4 x0 x4 x1 x4 x2 x4 x3 243 (2.13)

2 (x)

3 (x)

4 (x)

Thus the interpolating polynomial then is L(x) = 1 f (x0 )x(2x 3)(4x + 3)(4x 3) 243

8f (x1 )x(2x 3)(2x + 3)(4x 3) +3f (x2 )(4x + 3)(2x 3)(2x + 3)(4x 3) (2.14) 8f (x3 )x(2x 3)(2x + 3)(4x + 3) +f (x4 )x(4x 3)(2x + 3)(4x + 3) = 4.834848x3 1.477474x

Chapter 3 Hermite Interpolation


Hermite interpolation is a method closely related to the Newton divided dierence method of interpolation in numerical analysis, that allows us to consider given derivatives at data points, as well as the data points themselves. The interpolation will give a polynomial that has a degree less than or equal to the number of both data points and their derivatives, 1. Hermite Interpolation can be formulated by
m m

y(x) =
k=1

hk (x)f (xk ) +
k=1

hk (x)f (xk ) + E(x)

(3.1)

is now sought, with hk (x) and hk (x) being polynomials of degree 2m 1 to yield sucient degrees of freedom to satisfy the tting of f and f . The four conditions needed to be satised by hk and hk are y(xj ) = f (xj ) which leads to

hi (xj ) = ij hi (xj ) = 0

(3.2)

and y (xj ) = f (xj ) to give hi (xj ) = 0h i (xj ) = ij (3.3)

where ij has the usual value of 0 if i = j and the value of 1 if i = j. It is clear that [(li (x))2 ] is a polynomial of degree 2m 2 which comes close to satisfying some of the conditions in 3.2 and 3.3. By trying hi (x) = ri (x)(li (x))2 and (3.4)

hi (x) = si (x)(li (x))2

(3.5)

with ri and si being linear functions of x, the required degree of polynomial is attained and four degrees of freedom remained to complete the satisfaction of 3.2 and 3.3. Indeed this conditions result in the relations ri (xi ) = 1 ri (xi ) + 2li (xi ) = 0 10 (3.6)

si (xi ) = 0

si (xi ) = 1

(3.7)

The linear forms which satisfy these conditions are ri (x) = 1 2li (xi )(x xi ) (3.8)

si (x) = x xi which gives Hermites interpolation formula as


m m

(3.9)

y(x) =
k=1

hk (x)f (xk ) +
k=1

hk (x)f (xk ) + E(x)

(3.10)

with hi (x) = [1 2li (xi )(x xi )][li (x)]2 and hi (x) = (x xi )[li (x)]2 (3.12) (3.11)

and as in the formula Lagrange the problem of determining E(x) remains. A similar approach to the Lagrange case yields a suitable error form. Now it is recognized that both E(x) and 2 (x) vanish together with their rst derivatives at each of the m-points x1 , x2 , . . . , xm . Hence consider the function F (x) = f (x) y(x) K[ (x)]2 (3.13)

Then F (x) vanishes with its rst derivatives at the same m-points. But 2 (x) only vanishes at these m-points; which implies that K can be chosen the force 11

F (x) to vanish at the further point, say x. If I is the smallest closed interval containing all the points x1 , . . . , xm , x then F (x) vanishes at m+1-points in I. Likewise F (x) vanishes at m dierent point in I, each intermediate with the original m + 1-points. But F (x) also vanishes at the m-points x1 , . . . , xm and hence in total F (x) vanishes 2m times in I. By the Rolle theorem argument F (x) vanishes 2m 1 times in I, and continuing, F (2m) (x) vanishes once in I, say at x = . Hence there is no sucient information to x K in terms of the indeterminate value to give 0 = F (2m) () = f (2m) () K(2m)! (3.14)

remembering that y(x) is a polynomial of degree 2m 1 which dierentiates 2m times to gives zero. Hence the Hermites interpolation Error formula is f (2m) () [ (2m)! (x)]2

E(x) = Theorem

(3.15)

There exists a unique polynomial p in tions conditions in p(j) (xi ) = 0 (0 j Proof

fullling the Hermite Interpolaki 1, 0 i n) .

The polynomial p is sought in the space m and it therefore has m + 1 coecients.The number of interpolatory conditions that are imposed on p by p(j) (xi ) = 0 (0 j ki 1, 0 i n) is also m + 1.Thus we have a square system of m+1 equations in m+1 unknowns to solve, and we wish to be assured that the coecient matrix is nonsingular.To prove that a square matrix A is not singular, it suces to prove that homogeneous equations Au = 0 has only zero solutions (u = 0).n the interpolation problem under discussion, the homogeneous problem is to nd p m such that

12

p(j) (xi ) = 0

(0

ki 1, 0

n)

such a polynomial has a zero of multiplicity ki at xi (0 therefore be a multiple of the polynomial q given by

n) and must

q(x) =
i=0

(x xi )ki

observe,however,that q is of degree

m+1=
i=0

ki

whereas p is to be of degree at most m.We therefore conclude that p = q = 0. Example 1: Find the polynomial p that assumes these values: P (0) = 0, 1 P (1) = 1, p ( ) = 2. 2 Solution: Since there are 3 conditions we try a quadratic: p(x) = a + bx + cx2 The condition p(0) = 0 leads to a = 0 1 = p(1) = b + c

13

1 2=p( )=b+c 2 Thus there is no quadratic solution. Now assume p(x) = a + bx + cx2 + dx3 we discover that there exists a solution but it is not unique.We notice that a=0 as before.The remaining conditions are 1=b+c+d 3 2=b+c+ d 4 The solution of this system is d = 4 and b + c = 5. Example 2: Assume f (x) = log(x). And f (2) = 0, 3010 f (2) = 0.217147; f (3) = 0, 4771 f (3) = 0.144765; f (4) = 0, 6021 f (4) = 0.108574. Evaluate the Lagrange interpolation of f(2.4)? Solution: By using (2.4) xk ) 1kQ; k=1 (xi xk )
1kQ; k=1 (x

i (x)

(3.16) = gives
1 (2)

(x x1 ) . . . (x xi1 )(x xi+1 ) . . . (x xQ ) (xi x1 ) . . . (xi xi1 )(xi xi+1 ) . . . (xi xQ )

3 2

14

2 (3)

=0 = 3 2

3 (4)

and then using formula 3.11 and 3.12 give h1 (x) = (3x 5) 2 (x) 1 h2 (x) =
2 2 (x)

h3 (x) = (13 3x) 2 (x) 3 h1 (x) = (x 2) 2 (x) 1 h2 (x) = (x 3) 2 (x) 2 h3 (x) = (x 4) 2 (x) 3 Hence the interpolated value at x = 2.4 is given by y(2.4) = 0.50688 0.301030 + 0.4096 0.477121 +0.08352 0.602060 + 0.09216 0.217147 (3.17) 0.24576 0.144765 0.02304 0.108574 = 0.380232

15

and the associated actual error is 0.0000209. On the other hand 3.15 f (6) () E(x) = (x x1 ) (x x2 ) (x x3 ) 6!
2 2 2

= (0.4)2 (0.6)2 (1.6)2 = 0.0001667 which yields a sensible upper bound.

0.814 6!

(3.18)

Hermite Interpolation is more accurate interpolator than Lagrange Interpolation.But Hermite Interpolation needs more data that the derivative of the specic points which are given in the problem.In error analysis Hermite Interpolation is ore sensible according to Lagrange Interpolation via error upper bound.Lagrange Interpolation can be applied to the Hermite Interpolation problems but Hermite Interpolation can not be applied to Lagrange Interpolation problem because in the derivative values of specic points are not given in the Lagrange Interpolation problem.

16

Chapter 4 Applications
I will solve a problem by using Hermite and Lagrange Interpolation methods,to show that which is closed to exact value or sensible at error analysis. Example : Assume f (x) = log(x). And f (2) = 0, 3010 f (2) = 0.217147; f (3) = 0, 4771 f (3) = 0.144765; f (4) = 0, 6021 f (4) = 0.108574. Evaluate the interpolations of f(2.4)? by using Lagrange Interpolations: Lagrange interpolation

L(2.4) =

(0.4)(1.6) (0.4)(0.6) (0.6)(1.6) f (2) + f (3) + f (4) (1)(2) (1)(1) (2)(1) (4.1)

= 0.48 0.3010 + 0.64 0.4771 0.12 0.6021 = 0.3776 With an actual error E(x) = f (x) L(x) = f (2.4) L(2.4) = 0.0026 17

. But Lagrange Interpolations Error formula gives us:

E(x)

(0.4)(0.6)(1.6) 1 = 0.0070 6 4 ln 10

(4.2)

by using Hermite Interpolations: xk ) 1kQ; k=1 (xi xk )


1kQ; k=1 (x

i (x)

(4.3) = gives
1 (2)

(x x1 ) . . . (x xi1 )(x xi+1 ) . . . (x xQ ) (xi x1 ) . . . (xi xi1 )(xi xi+1 ) . . . (xi xQ )

= =0 = 3 2

3 2

2 (3)

3 (4)

h1 (x) = (3x 5) 2 (x) 1 h2 (x) =


2 2 (x)

h3 (x) = (13 3x) 2 (x) 3 h1 (x) = (x 2) 2 (x) 1 h2 (x) = (x 3) 2 (x) 2 18

h3 (x) = (x 4) 2 (x) 3 Hence the interpolated value at x = 2.4 is given by y(2.4) = 0.50688 0.301030 + 0.4096 0.477121 +0.08352 0.602060 + 0.09216 0.217147 (4.4) 0.24576 0.144765 0.02304 0.108574 = 0.380232 and the associated actual error is E(x) = f (x) Y (x) = f (2.4) Y (2.4) = 0.0000209 . On the other hand, Hermite Interpolations Error formula gives us:

E(x) = (x x1 )2 (x x2 )2 (x x3 )2 = (0.4)2 (0.6)2 (1.6)2 = 0.0001667 0.814 6!

f (6) () 6! (4.5)

As I said Hermite Interpolation is more better than Lagrange Interpolation to give more sensible result.Because it is more sensible in Error Analysis.

19

Chapter 5 Conclusion
In this project,I presented basic notions of Hermite Interpolations,Lagrange Interpolations and their error analysis with their approximation. Then, I try to apply these Interpolations on some concrete examples.I also applied both Interpolations on same examples to show that error sensibility.

20

Bibliography
[1] http://209.85.129.132/search?q=cache:Bo293tM51bkJ:efe.ege.edu.tr/ balli /uygulama/17.pdf+hermite+interpolation+polynomial&cd=10&hl =tr&ct=clnk&gl=tr [2] http://en.wikipedia.org/wiki/Hermite interpolation [3] http://mathworld.wolfram.com/HermitesInterpolatingPolynomial.html [4] Szeg, G. Orthogonal Polynomials, 4th ed. Providence, RI: Amer. Math. Soc., pp. 330-332, 1975. [5] Hildebrand, F. B. Introduction to Numerical Analysis. New York: McGraw-Hill, pp. 314-319, 1956. [6] Burden, Richard L., and J. Douglas Faires. Numerical Analysis. Belmont: Brooks/Cole, 2004. [7] Evans Gwynne, Practical Numerical Analysis, Wiley , 1995 [8] Stoer , Introduction to Numerical Analysis, Springer, 2002

21

You might also like