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
=
Az
b
where
z
contains
the unknown polynomial coefficients. The general form of the polynomial function to be fitted is
2
3
1
2
3
4
( )
...
=
+
+
+
+
f x
a
a x
a x
a x
For linear interpolation, we seek to find
1
a
and
2
a
in the function
1
2
( )
=
+
f x
a
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
1
2
1
2
10
7
10
53
−
=
+
= −
a
a
a
a
Rewriting these two equations in matrix form yields

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*