Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik

Similar presentations


Presentation on theme: "Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik"— Presentation transcript:

1 Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik
Kode : CIV - 208 SKS : 3 SKS Interpolasi Pertemuan - 7

2 Sub Pokok Bahasan : Interpolasi Newton Interpolasi Lagrange

3 You will frequently have occasion to estimate intermediate values between precise data points.
The most common method used for this purpose is polynomial interpolation. Recall that the general formula for an nth-order polynomial is f(x)=a0+a1x+a2x2+···+anxn For n+1 data points, there is one and only one polynomial of order n that passes through all the points. For example, there is only one straight line (that is, a first-order polynomial) that connects two points (Fig. a). Similarly, only one parabola connects a set of three points (Fig. b).

4 Polynomial interpolation consists of determining the unique nth-order polynomial that fits n+1 data points. This polynomial then provides a formula to compute intermediate values. Although there is one and only one nth-order polynomial that fits n+1 points, there are a variety of mathematical formats in which this polynomial can be expressed. Two alternatives that are well-suited for computer implementation are the Newton and the Lagrange polynomials.

5 Newton Linear Interpolation
The simplest form of interpolation is to connect two data points with a straight line. This technique, called linear interpolation, is depicted graphically in Fig. Using similar triangles : which is a linear-interpolation formula. The notation f1(x) designates that this is a first order interpolating polynomial

6 Example 1 : Estimate the natural logarithm of 2 using linear interpolation. First, perform the computation by interpolating between ln 1=0 and ln6= Then, repeat the procedure, but use a smaller interval from ln 1 to ln 4 ( ). Note that the true value of ln 2 is

7 Newton Quadratic Interpolation
If three data points are available, this can be accomplished with a second-order polynomial (also called a quadratic polynomial or a parabola). A particularly convenient form for this purpose is f2(x)=b0+b1(x−x0)+b2(x−x0)(x−x1)

8 A simple procedure can be used to determine the values of the coefficients.
For x = x0 b0=f(x0) For x = x1 For x = x2

9 Example 2 : Fit a second-order polynomial to the three points used in Example 1: x0=1 f(x0)=0 x1=4 f(x1)= x2=6 f(x2)= Use the polynomial to evaluate ln 2.

10 General Form of Newton’s Interpolating Polynomials
The preceding analysis can be generalized to fit an nth-order polynomial to n+1 data points. The nth-order polynomial is fn(x)=b0+b1(x−x0)+···+bn(x−x0)(x−x1)···(x−xn−1) (1) We use these data points and the following equations to evaluate the coefficients:

11 bo = f(xo) (2) b1 = f[x1.xo] (3) b2 = f[x2, x1, xo] (4) ….... bn = f[xn, xn1, ……, x1, xo] (5) where the bracketed function evaluations are finite divided differences.

12 For example, the first finite divided difference is represented generally as
The second finite divided difference, which represents the difference of two first divided differences, is expressed generally as

13 Similarly, the nth finite divided difference is
These differences can be used to evaluate the coefficients in Eqs. (2) through (5), which can then be substituted into Eq. (1) to yield the interpolating polynomial

14

15 Example 3 In Example 2, data points at x0=1, x1=4, and x2=6 were used to estimate ln 2 with a parabola. Now, adding a fourth point [x3=5; f(x3)= ], estimate ln 2 with a third-order Newton’s interpolating polynomial.

16 Lagrange Interpolating Polynomials
The Lagrange interpolating polynomial is simply a reformulation of the Newton polynomial that avoids the computation of divided differences. It can be represented concisely as (6)

17 Where where P designates the “product of.” For example, the linear version (n=1) is

18 and the second-order version is
the summation of all the products designated by Eq. (6) is the unique nth order polynomial that passes exactly through all n+1 data points.

19 Example 4 Use a Lagrange interpolating polynomial of the first and second order to evaluate ln 2 on the basis of the data given in Example 2: x0=1 f(x0)=0 x1=4 f(x1)= x2=6 f(x2)=

20 Homework


Download ppt "Interpolasi Pertemuan - 7 Mata Kuliah : Analisis Numerik"

Similar presentations


Ads by Google