1 / 6

Newton’s Interpolation

Newton’s Interpolation. Newton Interpolation

eros
Télécharger la présentation

Newton’s Interpolation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Newton’s Interpolation

  2. Newton Interpolation Newton’s Interpolating polynomial for a set of data {(x1,y1),(x2,y2),(x3,y3),…,(xm,ym)} will turn out to be exactly the same as Lagrange’s Interpolating polynomial but with fewer calculations needed to construct the polynomial. Newton’s idea was to look for a series of constants c1,c2,c3,…,cm and write the polynomial in the form below: The constants c1,c2,c3,…,cm are chosen so that: p(x1)=y1, p(x2)=y2, …, p(xm)=ym The constants c1,c2,c3,…,cm can be solved for to find the following values:

  3. Newton’s Interpolation (Recursively Defined) At first Newton’s Interpolation looks cumbersome and had to work with. Using recursion to define a sequence of polynomials p1(x), p2(x),…,pm(x) = p(x). The idea here is that each of the polynomials earlier in will be smaller and easier to compute and keep the information you need for the later polynomials in the sequence. They are defined below.

  4. Example: Lets interpolate the data set: {(-2,5),(-1,4),(1,8)}. (Notice this has an interpolating polynomial of p(x) = x2 + 2x +5.) plug in x3 = 1 plug in x2 = -1 simplified

  5. Notice in the previous example we got simple linear equations to solve to find the values for c1,c2,c3,…,cm in each polynomial. This will be true in general no matter how many points are in your data set. Newton’s Interpolating Polynomial also requires that the data set represent a function. None of the x values should be the same (consider the formula for calculating the ci’s. The recursion enable us to organize this in the divided difference pattern to come up with the coefficients more directly. Recall : Take the difference of the y’s and divide by the difference of the x’s at each stage. We get the following: coefficients With more data points just extend the triangle across.

  6. alldiffx ← True • For[ i=1, i m , i++ • For[ j=1, j<i, j++, • alldiffx=alldiffx and (xi xj)]] • If alldiffx • psum = y1 • For[i=2, i m , i++ • pprod = 1 • pexpr=1 • For[ j=1, j<i, j++, • pexpr = pexpr*(x – xj) • pprod = pprod*(xi – xj)] • p(x) = psum • psum = psum + (yi – p(xi) )/pprod * pexpr] • (* else *) • Print[“Data set can not be interpolated by a function”]

More Related