Professional Documents
Culture Documents
For the estimation of the intermediate values between spesific data points,
the most common method used for this purpose is Polynomial Interpolation.
𝑓 𝑥 = 𝑎1 + 𝑎2 𝑥 + ⋯ + 𝑎𝑛 𝑥 𝑛−1 (1)
For n data points, there is one and only one polynomial of order (n-1) that
passes through all the points.
POLYNOMIAL INTERPOLATION
For example, there is only one straight line (first-order polynomial) that connects two
points .
A direct way for computing the coefficients of Eq. (2) is based on the fact that n data
points are required to determine the n coefficients. As in the following example, this
allows us to generate n linear algebraic equations that we can solve together for the
coefficients.
DETERMINING POLYNOMIAL COEFFICIENTS
Each of these pairs can be substituted into parabola to produce a system of three equations:
DETERMINING POLYNOMIAL COEFFICIENTS
There are many alternative forms for expressing an interpolating polynomial beyond
the familiar format of Eq. (2). Newton’s interpolating polynomial is among the most
popular and useful forms.
Let us introduce the first and second order versions because of their simple visual
interpretation.
LINEAR INTERPOLATION
The simplest form of interpolation is to connect two data points with a straight line. This technique
, called linear interpolation, is showed graphically
LINEAR INTERPOLATION
Using similar triangles,
𝑓1 𝑥 − 𝑓(𝑥1 ) 𝑓(𝑥2 ) − 𝑓(𝑥1 )
=
𝑥 − 𝑥1 𝑥2 − 𝑥1
which is the Newton linear-interpolation formula. The notation 𝑓1 𝑥 designates that this is a first-
order interpolating polynomial
LINEAR INTERPOLATION
Example 1.
Then, repeat the procedure, but use a smaller interval from ln 1 to ln 4 (1.386294).
1.791759 − 0
𝑓1 2 = 0 + 2 − 1 = 0.3583519
6−1
which represents an error of 𝜀𝑡 = 48.3%
If we use linear interpolation from 𝑥1 = 1 to 𝑥2 = 4 to give
1.386294 − 0
𝑓1 2 = 0 + 2 − 1 = 0.4620981
4−1
The error in the previous example resulted from approximating a curve with a straight line.
For improving the estimate, we can introduce some curvature into the line connecting the
points.
If we have three data points, this can be accomplished with a second-order polynomial
(also called a quadratic polynomial or a parabola). A suitable form for this purpose is
𝑓2 𝑥 = 𝑏1 + 𝑏2 𝑥 − 𝑥1 + 𝑏3 𝑥 − 𝑥1 𝑥 − 𝑥2 (3)
QUADRATIC INTERPOLATION
A simple procedure can be used to determine the values of the coefficients.
𝑏1 = 𝑓 𝑥1 (4)
Equation (4) can be substituted into Eq. (3), which can be evaluated at 𝑥 = 𝑥2 for
𝑓(𝑥2 ) − 𝑓(𝑥1 )
𝑏2 = (5)
𝑥2 − 𝑥1
Finally, Eqs. (4) and (5) can be substituted into Eq. (3), which can be evaluated at 𝑥 = 𝑥3 and solved
for
𝑓(𝑥3 ) − 𝑓(𝑥2 ) 𝑓(𝑥2 ) − 𝑓(𝑥1 )
−
𝑥3 − 𝑥2 𝑥2 − 𝑥1
𝑏3 = (6)
𝑥3 − 𝑥1
QUADRATIC INTERPOLATION
Example 2. Employ a second-order Newton polynomial to estimate ln 2 with the same three points
used in Example 1.
𝑥1 = 1 , 𝑓(𝑥1 ) = 0
𝑥2 = 4 , 𝑓(𝑥2 ) = 1.386294
𝑥3 = 6 , 𝑓(𝑥3 ) = 1.791759
As was done previously with linear and quadratic interpolation, data points can be used to
evaluate the coefficients 𝑏1 , 𝑏2 , . . . , 𝑏𝑛 . For an (n − 1)th-order polynomial, n data points
are required:
[𝑥1 , f (𝑥1 )], [𝑥2 , f (𝑥2 )], . . . , [𝑥𝑛 , f (𝑥𝑛 )].
We use these data points and the following equations to evaluate the coefficients:
GENERAL FORM OF NEWTON’S INTERPOLATING
POLYNOMIALS
𝑏1 = 𝑓 𝑥1
𝑏2 = 𝑓[𝑥2 , 𝑥1 ]
𝑏3 = 𝑓[𝑥3 ,𝑥2 , 𝑥1 ]
.................
𝑏𝑛 = 𝑓[𝑥𝑛 ,𝑥𝑛−1 , … , 𝑥1 ]
These differences can be used to evaluate the coefficients. The general form of Newton’s
interpolating polynomial :
𝑓𝑛−1 𝑥 = 𝑓 𝑥1 + 𝑥 − 𝑥1 𝑓[𝑥2 , 𝑥1 ] + ⋯ + 𝑓[𝑥𝑛 ,𝑥𝑛−1 , … , 𝑥1 ] 𝑥 − 𝑥1 𝑥 − 𝑥2 𝑥 − 𝑥𝑛−1
QUADRATIC INTERPOLATION
Example 3. Let us take example 2 adding 𝑥4 for estimating a third order Newton interpolating
polynomial.
𝑥1 = 1 , 𝑓(𝑥1 ) = 0
𝑥2 = 4 , 𝑓(𝑥2 ) = 1.386294
𝑥3 = 6 , 𝑓(𝑥3 ) = 1.791759
𝑥4 = 5 , 𝑓(𝑥4 ) = 1.609438
𝑥−𝑥2 𝑥−𝑥1
𝑓1 𝑥 =
𝑥1 −𝑥2
𝑓 𝑥1 +
𝑥2 −𝑥1
𝑓 𝑥2 (1)
We can use the same strategy to fit a parabola through three points. For this case, three
parabolas would be used with each one passing through one of the points and equaling
zero at the other two. Then, their sum would represent the unique parabola that
connects the three points. Such a second-order Lagrange interpolating polynomial can be
written as
With the light of first- and second-order versions, we can write a general formula for
higher-order Lagrange polynomials as
𝑛
𝑓𝑛−1 𝑥 = 𝑖=1 𝐿𝑖 (𝑥) 𝑓 𝑥𝑖 (3)
where
𝑛
𝑥 − 𝑥𝑗
𝐿𝑖 (𝑥) =
𝑥𝑖 − 𝑥𝑗
𝑗=1
𝑗≠𝑖
Example 1. Use a Lagrange interpolating polynomial of the first and second order to
evaluate the density of unused motor oil at T = 15 °C based on the following data:
𝑥1 = 0 , 𝑓 𝑥1 = 3.85
𝑥2 = 20 , 𝑓 𝑥1 = 0.8
𝑥3 = 40 , 𝑓 𝑥1 = 0.212
LAGRANGE INTERPOLATING POLYNOMIAL
𝑥 − 𝑥2 𝑥 − 𝑥1
𝑓1 𝑥 = 𝑓 𝑥1 + 𝑓 𝑥2
𝑥1 − 𝑥2 𝑥2 − 𝑥1
In our example 𝑥 = 15, so we can select the two points as 𝑥1 = 0 and 𝑥2 = 20
15 − 20 15 − 0
𝑓1 15 = 3.85 + 0.8 = 0.9625 + 0.6 = 1.5625
0 − 20 20 − 0
LAGRANGE INTERPOLATING POLYNOMIAL