LECTURE 17. Algorithms for Polynomial Interpolation

Similar documents
LECTURE Review. In this lecture we shall study the errors and stability properties for numerical solutions of initial value.

If we remove the cyclotomic factors of fèxè, must the resulting polynomial be 1 or irreducible? This is in fact not the case. A simple example is give

SPRING Final Exam. May 5, 1999

also has x æ as a local imizer. Of course, æ is typically not known, but an algorithm can approximate æ as it approximates x æ èas the augmented Lagra

An Eæcient Tridiagonal Eigenvalue Solver. Ren-Cang Li and Huan Ren.

LECTURE 9. In the example above, we have a total of n equations and m unknowns. However, for the most part we

A first order divided difference

The closer x is to a, the better the slope of the secant line will approximate the slope of the tangent line. y=f(x)

LECTURE 12. Special Solutions of Laplace's Equation. 1. Separation of Variables with Respect to Cartesian Coordinates. Suppose.

Radial Basis Functions for Process Control Lyle H. Ungar Tom Johnson Richard D. De Veaux University ofpennsylvania Voice Processing Corp. Princeton Un

the x's and the y's unlike the standard k-means clustering on the x's ë8ë. We then present results comparing EMRBF with standard RBF estimation method

Continuity of Bçezier patches. Jana Pçlnikovça, Jaroslav Plaçcek, Juraj ç Sofranko. Faculty of Mathematics and Physics. Comenius University

University of California. November 16, Abstract

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

Lecture 1. Introduction. The importance, ubiquity, and complexity of embedded systems are growing

Figure 1: Startup screen for Interactive Physics Getting Started The ærst simulation will be very simple. With the mouse, select the circle picture on

wavelet scalar by run length and Huæman encoding.

Lecture 10 Polynomial interpolation

APPENDIX E., where the boundary values on the sector are given by = 0. n=1. a 00 n + 1 r a0 n, n2

LECTURE 19. Numerical Integration. Z b. is generally thought of as representing the area under the graph of fèxè between the points x = a and

Scientific Computing

3.1 Interpolation and the Lagrange Polynomial

Center for Applied Cryptographic Research. fa2youssef,

easy to make g by æ èp,1è=q where æ generates Zp. æ We can use a secure prime modulus p such that èp, 1è=2q is also prime or each prime factor of èp,

initial work on entropy coding èe.g. Huæman codingè relied on knowing, or measuring,

F is n ntiderivtive èor èindeæniteè integrlè off if F 0 èxè =fèxè. Nottion: F èxè = ; it mens F 0 èxè=fèxè ëthe integrl of f of x dee x" Bsic list: xn

322 HENDRA GUNAWAN AND MASHADI èivè kx; y + zk çkx; yk + kx; zk: The pair èx; kæ; ækè is then called a 2-normed space. A standard example of a 2-norme

Chapter 4: Interpolation and Approximation. October 28, 2005

their eæcient computation V. DRAKOPOULOS University ofathens, Panepistimioupolis , Athens, GREECE S.

the Unitary Polar Factor æ Ren-Cang Li Department of Mathematics University of California at Berkeley Berkeley, California 94720

MATH 5640: Functions of Diagonalizable Matrices

ν(n)/n c < n ln r < e ln r = r,

BUDKER INSTITUTE OF NUCLEAR PHYSICS. B.V. Chirikov and V.V. Vecheslavov MULTIPLE SEPARATRIX CROSSING: CHAOS STRUCTURE. Budker INP NOVOSIBIRSK

Parabolic Layers, II

Interpolation Theory

J. TSINIAS In the present paper we extend previous results on the same problem for interconnected nonlinear systems èsee ë1-18ë and references therein

IMPLEMENTATION OF SIGNAL POWER ESTIMATION METHODS

1 Lecture 8: Interpolating polynomials.

problem of detection naturally arises in technical diagnostics, where one is interested in detecting cracks, corrosion, or any other defect in a sampl

Hermite Interpolation

Deænition 1 A set S is ænite if there exists a number N such that the number of elements in S èdenoted jsjè is less than N. If no such N exists, then

Actuator saturation has a signiæcant eæect on the overall stability of aircraft. The recent YF-22 crash èapril 1992è has been blamed on a pilot-induce

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Numerical Analysis Spring 2001 Professor Diamond

StrucOpt manuscript No. èwill be inserted by the editorè Detecting the stress æelds in an optimal structure II: Three-dimensional case A. Cherkaev and

Monday, July First, And continues until further notice.

UNIT-II INTERPOLATION & APPROXIMATION

Interpolating Accuracy without underlying f (x)


Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Neville s Method. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Neville s Method

EXT /05/2000

The method of teepet decent i probably the bet known procedure for ænding aymptotic behavior of integral of the form Z è1è Ièè = gèzè e f èzè dz; C wh

November 20, Interpolation, Extrapolation & Polynomial Approximation


256 Facta Universitatis ser.: Elect. and Energ. vol. 11, No.2 è1998è primarily concerned with narrow range of frequencies near ærst resonance èwhere s

Abstract To characterize color values measured by color devices èe.g. scanners, color copiers and color camerasè in a deviceíindependent fashion these

Interpolation. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Interpolation 1 / 34

leading to a ænal state with missing energy. The rate for such processes is strongly dependent on the number of extra dimensions as well as the exact

CHAPTER 6 : LITERATURE REVIEW

P E R E N C O - C H R I S T M A S P A R T Y

University of California, Berkeley. ABSTRACT

where Sènè stands for the set of n æ n real symmetric matrices, and æ is a bounded open set in IR n,typically with a suæciently regular boundary, mean

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

Numerical Mathematics & Computing, 7 Ed. 4.1 Interpolation

BSM510 Numerical Analysis

Approximation theory

1 Introduction It is well known that the beam dynamics in accelerator systems is intrinsically nonlinear. In circular accelerators nonlinearity is one

Algebra of Normal Function Tables. Martin von Mohrenschildt. May 29, 1997

hand side and solve the resultant system of n quadratic equations in n unknowns. When n = 100, the encryption process is extremely fast, while the dec

A.V. SAVKIN AND I.R. PETERSEN uncertain systems in which the uncertainty satisæes a certain integral quadratic constraint; e.g., see ë5, 6, 7ë. The ad

CS 294-2, Visual Grouping and Recognition èprof. Jitendra Malikè Sept. 8, 1999

ë1ë N. Alon, J. Spencer, The Probabilistic Method, John Wiley, New York, ë5ë P. Erdíos, L. Lovçasz, Problems and results on 3-chromatic hypergraphs

Thus D ëc y + c y ë 6= c D ëy ë+c D ëy ë. Note that expressions èè and èè are not equal because sinèc y + c y è 6= c sin y + c sin y. sin is a nonline

t x

Jim Lambers MAT 419/519 Summer Session Lecture 13 Notes

pairs. Such a system is a reinforcement learning system. In this paper we consider the case where we have a distribution of rewarded pairs of input an

Notes on Discrete Probability

Economics 472. Lecture 16. Binary Dependent Variable Models

Testing Complexity of Program Segments. McGill University University Street. Duke University

LEAST SQUARES APPROXIMATION

Introduction Radiative habhas can be used as one of the calibrations of the aar electromagnetic calorimeter èemè. Radiative habha events èe, e +! e, e

successfully to the at most t moves èincluding the initial move mè made in these intervals. Thus Spoiler may aswell play the remaining t, 1moves

Hiroaki Kikuchiy Jin Akiyamaz Howard Gobioæ. Gisaku Nakamuraz. February, 1998 CMU-CS Carnegie Mellon University. Pittsburgh, PA 15213

Cubic Splines; Bézier Curves

Then, Lagrange s interpolation formula is. 2. What is the Lagrange s interpolation formula to find, if three sets of values. are given.

Lecture 12: November 6, 2017

where A and B are constants of integration, v t = p g=k is the terminal velocity, g is the acceleration of gravity, and m is the mass of the projectil

3 Interpolation and Polynomial Approximation

S-Y0 U-G0 CANDIDATES

Lecture 4: Numerical solution of ordinary differential equations

Polynomial Interpolation Part II

CS483 Design and Analysis of Algorithms

CHAPTER 4. Interpolation

Jim Lambers MAT 460 Fall Semester Lecture 2 Notes

x

The total current injected in the system must be zero, therefore the sum of vector entries B j j is zero, è1;:::1èb j j =: Excluding j by means of è1è

Notes 10: List Decoding Reed-Solomon Codes and Concatenated codes

{η : η=linear combination of 1, Z 1,, Z n

Eric Allender æ. Rutgers University. Piscataway, NJ USA. Klaus-Jíorn Lange y

Transcription:

LECTURE 7 Algorithms for Polynomial Interpolation We have thus far three algorithms for determining the polynomial interpolation of a given set of data.. Brute Force Method. Set and solve the following set of n + equations for the n + coeæcients. 2. Newton Form Method. Set P èxè a n x n + a n,x n, + æææ+ a x + a 0 a n èx 0 è n + a n, èx 0 è n, + æææ+ a x 0 + a 0 y 0 a n èx è n + a n, èx è n, + æææ+ a x + a 0 y a n èx n è n + a n, èx n è n, + æææ+ a x n + a 0 y n P èxè c 0 + c èx, x 0 è+c 2 èx, x 0 èèx, x è+æææ+ c n èx, x 0 èèx, x è æææèx, x n,è and use the following recursive formulae to determine the coeæcients c k : c k y k, P k,èx k è èx k, x 0 èèx k, x è æææèx k, x k,è P k èxè P k,èxè+c k èx, x 0 èèx, x è æææèx, x k,è 3. Lagrange Form Method. For k 0; ;:::; n compute the cardinal functions `kèxè and then set ny j0 j6k èx, x j è èx k, x j è èx, x 0 èèx, x è æææèx, x k,èèx, x k+è æææèx, x n è èx k, x 0 èèx k, x è æææèx k, x k,èèx k, x k+è æææèx k, x n è P èxè nx k0 y k`kèxè There is one more method that is, computationally, much more eæcient than any of the algorithms above. This is the so-called method of divided diæerences. Notation 7.. Let fèx i ;y i è j i 0;::: ;ng be an ordered set of n + data points, let x k ;x k+;::: ;x k+j be any set of j consecutive nodes and let P k èxè c k;0 + c k; èx, x k è+c k;2 èx, x k èèx, x k+è+æææ+ c k;j èx, x k èèx, x k+è æææèx, x k+j,2èèx, x k+j,è be the Newton form of the interpolation polynomial for fèx i ;y j è j i k;::: ;k+ jg. The divided diæerence is the highest order coeæcient c k;j of P k èxè. f ëx k ;x k+;::: ;x k+jë.

7. ALGORITHMS FOR POLYNOMIAL INTERPOLATION 2 Remark 7.2. Note that if we set k 0 then the divided diæerences f ëx 0 ;x ;x j ë are just the coeæcients c j appearing in the Newton of the interpolation polynomial for fèx i ;y i è j i 0;:::;ng : For in this case, the polynomials P j èxè P j,èxè+c j èx, x 0 èèx, x è æææèx, x j,è and P 0 èxè c k;0 + c k; èx, x 0 è+c k;2 èx, x 0 èèx, x è P 0 èxè c k;0 + c k; èx, x 0 è+c k;2 èx, x 0 èèx, x è+æææ æææ+ c 0;j èx, x 0 è æææèx, x j,è+æææ+ c 0;n èx, x 0 è æææèx, x n,è fëx 0 ë+f ëx 0 ;x ëèx, x 0 è+f ëx 0 ;x ;x 2 ëèx, x 0 èèx, x è+æææ æææ+ f ëx 0 ;x ;:::;x j ëèx, x 0 è æææèx, x j,è+æææ æææ+ f ëx 0 ;x ;:::;x n ëèx, x 0 è æææèx, x n,è c 0 + c èx, x 0 è+c 2k;2 èx, x 0 èèx, x è+æææ æææ+ c j èx, x 0 è æææèx, x j,è+::: æææ+ c n èx, x 0 è æææèx, x n,è Theorem 7.3. The divided diæerences satisfy the following recursion relations f ëx i ;x i+;::: ;x i+jë f ëx i+;x i+;::: ;x i+jë, f ëx i ;x i+;::: ;x i+j,ë Proof. It suæces to prove this for i 0 and j n: because for any other choice of i or j, we can always construct a new set of data fè~x k ; ~y k èèx i+k;y i+kè j k 0; ;:::;~n jg for which the relation f ë~x 0 ; ~x ;::: ;~x ~n ë f ë~x ;::: ;~x n ë, f ë~x ;:::;~x ~n,ë ~x ~n, ~x 0 is equivalent to the relation in the problem statement. Let P n,èxè be the polynomial of degree n, that interpolates the data at the ærst n data points fèx 0 ;y 0 è ;::: ;èx n,;y n,èg and let Q n,èxè bethe polynomial that interpolates the data at the last n data points fèx ;y è ;::: ;èx n ;y n èg. Then if we set then Qèx i è 8 é : Qèxè Q n,èxè+ x, x n èq n,èxè, P n,èxèè Q n,èx 0 è+ x0,xn èq n,èxè, P xn,x0 n,èxèè P n, èx 0 èy 0 ; if i 0 Q n,èx i è+ xi,xn èq n,èx i è, P xn,x0 n,èx i èè y i, xi,xn è0è y i ; if 0 éién xn,x0 Q n,èx n è+ xn,xn èq n,èx n è, P xn,x0 n,èx n èè y n ; if i n Therefore, Qèxè is the interpolation polynomial P èxè for the data fèx i ;y i è j i 0;:::;ng. Now the coeæcient of the highest power of x for P èxè is P èxè f ëx 0 ;:::;x n ëèx, x 0 è æææèx, x n è f ëx 0 ;::: ;x n ë x n + O, x n,æ while the coeæcient of the highest power of x for Qèxè will be Qèxè x, x n èèf ëx ;::: ;x n ëèx, x è æææèx, x n è, f ëx 0 ;::: ;x n,ëèx, x 0 è æææèx, x n,èè + O x n, x 0 f ëx ;::: ;x n ë, f ëx 0;:::;x n,ë x n,o,x n,æ Since the highest order coeæcients must agree we have f ëx 0 ;::: ;x n ë f ëx ;::: ;x n ë, f ëx 0 ;::: ;x n,ë,x n,æ

7. ALGORITHMS FOR POLYNOMIAL INTERPOLATION 3 Now consider how we might construct the interpolation polynomial using divided diæerences. Suppose P èxè is the interpolation polynomial for a problem with four data points x 0 ;x ;x 2 ;x 3.We then have P èxè c 0 + c èx, x 0 è+c 2 èx, x 0 èèx, x è+c 3 èx, x 0 èèx, x èèx, x 2 è fëx 0 ë+fëx 0 ;x ëèx, x 0 è+f ëx 0 ;x ;x 2 ëèx, x 0 èèx, x è+f ëx 0 ;x ;x 2 ;x 3 ëèx, x 0 èèx, x èèx, x 2 è Now according to the preceding theorem fëx 0 ;x ;x 2 ;x 3 ë fëx ;x 2 ;x 3 ë, f ëx 0 ;x ;x 2 ë x 3, x 0 fëx2 ;x 3 ë, f ëx ;x 2 ëë x 3, x 0 x 3, x èx 3, x 0 èèx 3, x è, èx 3, x 0 èèx, x 0 è èx 3, x 0 èèx 3, x è, èx 3, x 0 èèx, x 0 è, fëx ;x 2 ë, fëx 0 ;x ë x, x 0 fëx3 ë, fëx 2 ë, fëx 2ë, fëx ë x 3, x 2 x 2, x fëx2 ë, fëx ë, fëx ë, fëx 0 ë x, x 0 x 2, x y3, y 2, y 2, y x 3, x 2 x 2, x y2, y, y, y 0 x 2, x x, x 0 However, this is not how we'll want to compute divided diæerences èby breaking down the complicated fëx 0 ;:::;x i ë to the original dataè. Rather, we'll employ a bottoms up approach. For notational and calculational convenience, we'll set so that our recursion relations can be expressed a bit more succinctly as æ Step. Set F ëëi; 0ë fëx i ëy i F ëi; jë fëx i ;x i+;::: ;x i+jë fëx i ;x i+;::: ;x i+jë fëx i+;::: ;x i+jë, fëx i ;::: ;x i+jë F ëi +;j, ë, F ëi; j, ë F ëi; jë æ Step 2. Set æ Step 3. Set æ. æ Step n,. Set æ Step n. Set F ëi; ë F ëi; 2ë : fëi;::: ;n, ë : F ëi; 0ë y i ; i 0;:::;n F ëi +; 0ë, F ëi; 0ë x i+, x i ; i 0;::: ;n, F ë0;në: fëi +; ë, fëi; ë x i+2, x i ; i 0;::: ;n, 2 fëi +;n, 2ë, fëi; n, 2ë ; i 0; F ë;n, ë, F ë0;n, ë ;

æ For each i from 0 to n, set 7. ALGORITHMS FOR POLYNOMIAL INTERPOLATION 4 c i F ë0;ië fëx 0 ;x ;::: ;x i ë æ The Newton form of the interpolation polynomial will then be P èxè 0 nx c i @ i, Y i0 The following Maple code implements this algorithm. j0 èx, x j è A èinitialize array Fëi,0ë for i from 0 to n do Fëi,0ë : Yëië; èapply recursion relations for j from to n do for i from 0 to n-j do Fëi,jë : èfëi+,j-ë - Fëi,j-ëèèèXëi+jë - Xëiëè; èconstruct Newton form of interpolation polynomial p : Fë0,0ë; è Yë0ë; g : for i from to n do g : èx-xëi-ëè*g p : p + Fë0,ië*g; èidentify the total coefficient of each power of x for i from 0 to n do c : coeffèp,x,iè: c : evalfèc,3è: lprintè`coefficient of x to the`,i,`is`,cè: Suppose we implement this code on a test function like T èxè 2x 8, 0x 5, 20x, 50 ; setting up our data points in the following simple-minded way x i a + b, a y i T èx i è for various choices of n, and intervals ëa; bë. Surprisingly, we don't get consistent results. For example, for n 0, ëa; bëë,0; 0ë, we obtain P èxè è0:0èx 0+è0:0èx 9 +è2:0èx 8 +è0:0èx 7 +è0:0èx 6, è0:0èx 5 +è0:0èx 4 +è0:0èx 3 +è0:0èx 2 +è6:0 æ 0 5 èx +è:0 æ 0 è n i

7. ALGORITHMS FOR POLYNOMIAL INTERPOLATION 5 On the other hand, taking n 0, ëa; bëë,0:005; 0:005ë, we obtain P èxè,è2:8 æ 0 5 èx 0 +è,:4 æ 0 5 èx 9 + è827èx 8 + è4:3èx 7, è7:52èx 6, è0:0èx 5 +è2:3 æ 0,4 èx 4 +è: æ 0,5 èx 3 +è:6 æ 0,8 èx 2, è20:0èx, è50:0è Of course, such discrepancies can be traced to the æoating point errors in the numerical algorithm. The way to get around such inconsistencies is to take a three step approach. æ Carry out an interpolation in a region ëa; bë where the data is changing very rapidly to get a handle on the higher degree terms of P èxè. æ Carry out an interpolation in a region ëa; bë where the rate at which data is changing rather moderately to get a handle on the lower degree terms of P èxè. æ Look for a region where the high degree terms and the low degree terms have about the same inæuence to get a ænal interpolation for P èxè. Note, however, that the test regions described above need not be near the origin, nor can there sizes be predicted a priori. Consider, for example, what might be appropriate regions for interpolating the following polynomial h i T èxè 0,6 èx, 500è 5, x + 500