Respect, Professionalism, & Entrepreneurship
Interpolasi
Pertemuan - 7 Mata Kuliah : Analisis Numerik
Respect, Professionalism, & Entrepreneurship
Respect, Professionalism, & Entrepreneurship
• 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
Respect, Professionalism, & Entrepreneurship
• 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
Respect, Professionalism, & Entrepreneurship
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
Respect, Professionalism, & Entrepreneurship
Example 1 :
Estimate the natural logarithm of 2 using linear interpolation.
First, perform the computation by interpolating between ln 1=0 and ln6=1.791759.
Then, repeat the procedure, but use a
smaller interval from ln 1 to ln 4 (1.386294). Note that the true value of ln 2 is
Respect, Professionalism, & Entrepreneurship
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)
Respect, Professionalism, & Entrepreneurship
• A simple procedure can be used to
Respect, Professionalism, & Entrepreneurship
Example 2 :
Fit a second-order
polynomial to the three points used in Example 1:
x0=1 f(x0)=0
x1=4 f(x1)=1.386294 x2=6 f(x2)=1.791759
• Use the polynomial to
evaluate ln 2.
Respect, Professionalism, & Entrepreneurship
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
Respect, Professionalism, & Entrepreneurship
• bo = f(xo) (2)
• b1= f[x1.xo] (3)
• b2= f[x2, x1, xo] (4) • …....
• bn= f[xn, xn1, ……, x1, xo] (5) • where the bracketed function
Respect, Professionalism, & Entrepreneurship
• 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
Respect, Professionalism, & Entrepreneurship
• 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
Respect, Professionalism, & Entrepreneurship
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)=
Respect, Professionalism, & Entrepreneurship
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)
n
i
i i
n x L x f x
f
Respect, Professionalism, & Entrepreneurship
• Where
• where designates the “product of.” • For example, the linear version
Respect, Professionalism, & Entrepreneurship
• and the second-order version is
• the summation of all the products
designated by Eq. (6) is the unique nth order polynomial that passes
Respect, Professionalism, & Entrepreneurship
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
Respect, Professionalism, & Entrepreneurship