B.J. Fregly
Spring 2011
POLYNOMIAL INTERPOLATION EXAMPLE
As discussed in lecture, there are three methods for performing polynomial interpolation of a
specific number of data points:
1.
General method
2.
Newton’s method
3.
Lagrange’s method
Below we perform linear, quadratic, and cubic polynomial interpolation of sets of two, three, and
four data points, respectively, using each of the three methods noted above. The data points to be
used for interpolation are specified as follows:
Linear interpolation:
(-10,7), (10,-53)
Quadratic interpolation:
(-10,7), (0,7), (10,-53)
Cubic interpolation:
(-10,7), (-5,22), (5,-23), (10,-53) (note: these points are NOT uniformly
spaced, which is not a problem)
The underlying function from which these data points were sampled is shown below:
-10
-5
0
5
10
-60
-50
-40
-30
-20
-10
0
10
20
30
x
y
1.
GENERAL METHOD
The general approach solves the determinate linear system of equations
=
A
zb
where
z
contains
the unknown polynomial coefficients. The general form of the polynomial function to be fitted is
23
12
3
4
( )
...
=
+
+++
fx a ax ax ax
For linear interpolation, we seek to find
1
a
and
2
a
in the function
()
=
+
f
xa
a
x
using the two data points (-10,7), (10,-53). The resulting two equations in the two unknowns
1
a
and
2
a
are
10
7
10
53
−
=
+
=−
aa
Rewriting these two equations in matrix form yields