Chapter 17
Chapter 17
Polynomial interpolation
• You will frequently have occasions to estimate intermediate values
between precise data points.
• The function you use to interpolate must pass through the actual data
points - this makes interpolation more restrictive than fitting.
• The most common method for this purpose is polynomial interpolation,
where an (n-1)th order polynomial is solved that passes through n data
points:
f (x) a1 a2 x a3 x 2 an x n1
MATLAB version :
f (x) p1 x n1 p2 x n2 pn1 x pn
Sol.)
Linear interpolation
• The first-order Newton interpolating
polynomial may be obtained from
linear interpolation and similar
triangles, as shown.
• The resulting formula based on
known points x1 and x2 and the
values of the dependent function at
those points is:
f (x 2 ) - f (x 1 )
f1 (x ) = f (x 1 ) + (x - x1 )
x 2 - x1
f1 (x ) : a first-order interpolating polynomial
Newton linear-interpolation formula
Numerical analysis Chapter 17
17. Polynomial Interpolation – Newton Interpolating Polynomials
Quadratic interpolation
• The second-order Newton interpolating polynomial introduces some
curvature to the line connecting the points, but still goes through the first
two points.
• The resulting formula based on known points x1, x2, and x3 and the
values of the dependent function at those points is:
f 2 x b1 b2 x x1 b3 x x1 x x2
Sol.)
Linear interpolation
• The first-order Lagrange
interpolating polynomial may
be obtained from a weighted
combination of two linear
interpolations, as shown.
• The resulting formula based
on known points x1 and x2
and the values of the
dependent function at those
points is:
f1 (x) L1 f x1 L2 f x2
x x2 x x1
L1 , L2
x1 x2 x2 x1 Linear Lagrange interpolating polynomial
x x2 x x1
f1 (x) f x1 f x2
x1 x2 x2 x1
Numerical analysis Chapter 17
17. Polynomial Interpolation
– Lagrange Interpolating Polynomials
Extrapolation
• Extrapolation is the process of
estimating a value of f(x) that
lies outside the range of the
known base points x1, x2, …,
xn.
• Extrapolation represents a
step into the unknown
because the process extends
the curve beyond the known
region, Extreme care
should be required when
extrapolating!
Extrapolation Hazards
• The following shows the results of extrapolating a seventh-order
population data set:
Once we move beyond the range of the date into the realm of
extrapolation, the seventh-order polynomial provides the erroneous
prediction in 2000. Numerical analysis Chapter 17
17. Polynomial Interpolation – Extrapolation and oscillations
Oscillations
• Higher-order polynomials not only lead to round-off errors due to ill-
conditioning, but can also provide oscillations to an interpolation.
• In the figures below, the dashed line represents an function, the circles
represent samples of the function, and the solid line represents the
results of a polynomial interpolation:
< fourth-order polynomial> < tenth-order polynomial>