CVNG1010 P2.2a
CVNG1010 P2.2a
University of the
West Indies
St. Augustine
CVNG 1010
IT FOR ENGINEERS
1
CVNG 1010 |
University of the
West Indies
St. Augustine
Interpolation
3
CVNG 1010 |
University of the
West Indies
St. Augustine
Interpolation
There is only one first order polynomial (straight line)
that connects 2 points. Likewise, there is only one
parabola that connects a set of three points.
EXAMPLE 1
Estimate the natural logarithm of 2 using linear
interpolation. First, perform the computation by
interpolating between ln 1 = 0 to ln 6 = 1.791759. Then
repeat the procedure, but use a smaller interval from ln 1
to ln 4 = 1.386294. The true value of ln 2 is 0.6931472.
6
CVNG 1010 |
University of the
West Indies
St. Augustine
EXAMPLE
33.3% error
48.3% error
7
CVNG 1010 |
University of the
West Indies
St. Augustine
Quadratic Interpolation
Introducing some curvature can reduce the error of
using a linear function. With 3 available data points this
is accomplished with a second order polynomial.
Multiply terms
In parabolic form
where
8
CVNG 1010 |
University of the
West Indies
St. Augustine
Quadratic Interpolation
To determine the values of the coefficients substitute x = x0 into the equation
9
CVNG 1010 |
University of the
West Indies
St. Augustine
Quadratic Interpolation
18.4% error
33.3% error
10
CVNG 1010 |
University of the
West Indies
St. Augustine
General Form
11
CVNG 1010 |
University of the
West Indies
St. Augustine
General Form
nth finite
divided
difference
12
CVNG 1010 |
University of the
West Indies
St. Augustine
General Form
Note:
§ Data points need not be equally spaced
§ Abscissa (x coordinate) values need not be in ascending order
§ Higher order differences are computed by taking differences of lower-order
differences
13
CVNG 1010 |
University of the
West Indies
St. Augustine
General Form
14
CVNG 1010 |
University of the
West Indies
St. Augustine
General Form
EXAMPLE 3: Repeat example 2 adding a fourth point, x3
= 5 and f(x3) = 1.609438 using the third order Newton’s
interpolating polynomial.
9.3% error
15
CVNG 1010 |
University of the
West Indies
St. Augustine
16
CVNG 1010 |
University of the
West Indies
St. Augustine
Errors
Errors
The truncation error is given as
Since the unknown value f(x) is part of the equation, it cannot be used to solve
for the error.
If another data point f(xn+1) is available, the equation can be used to estimate the
error
18
CVNG 1010 |
University of the
West Indies
St. Augustine
Truncation Errors
EXAMPLE 4: Estimate the error for the second-order
polynomial interpolation using the data point x3 = 5 and
f(x3) = 1.609438.
Truncation Errors
The example shows the error estimate of the nth order
polynomial is equivalent to the differences between the
(n+1)th order and the nth order.
The error represents a future
Validity of this prediction minus a present
approach based on prediction. For a rapidly
the fact that the convergent series the
series is strongly estimate can be less than
convergent the true error.