2879
-
Upload
sayan-kumar -
Category
Documents
-
view
8 -
download
0
description
Transcript of 2879
Interpolation Introduction
In many practical situations, for a function which either may not be explicitly
specified or may be difficult to handle, we often have a tabulated data where
and for In such cases, it may be required to represent
or replace the given function by a simpler function, which coincides with the values of at the
tabular points This process is known as INTERPOLATION.
Interpolation is also used to estimate the value of the function at the non tabular points. Here, we shall consider only those functions which are sufficiently smooth, i.e., they are differentiable sufficient number of times. Many of the interpolation methods, where the tabular points are equally spaced, use difference operators. Hence, in the following we introduce various difference operators and study their properties before looking at the interpolation methods.
We shall assume here that the TABULAR POINTS are equally spaced, i.e.,
for each The real number is called the STEP LENGTH. This
gives us Further, gives the value of the function at the
tabular point. The points are known as NODES or NODAL VALUES.
mywbut.com
1
Difference Operator Forward Difference Operator
DEFINITION 11.2.1 (First Forward Difference Operator)
We define the FORWARD DIFFERENCE OPERATOR, denoted by as
The expression gives the FIRST FORWARD DIFFERENCE of and the operator is
called the FIRST FORWARD DIFFERENCE OPERATOR. Given the step size this formula uses the values at
and the point at the next step. As it is moving in the forward direction, it is called the forward difference operator.
DEFINITION 11.2.2 (Second Forward Difference Operator) The second forward difference operator,
is defined as
We note that
mywbut.com
2
In particular, for we get,
and
DEFINITION 11.2.3 ( Forward Difference Operator) The forward difference operator, is defined as
EXERCISE 11.2.4 Show that In general, show that for any positive
integers and with
EXAMPLE 11.2.5 For the tabulated values of find and
Solution: Here,
mywbut.com
3
Remark 11.2.6 Using mathematical induction, it can be shown that
Thus the forward difference at uses the values at
EXAMPLE 11.2.7 If where and are real constants, calculate
Solution: We first calculate as follows:
Now,
Thus, for all
mywbut.com
4
Remark 11.2.8 In general, if is a polynomial
of degree then it can be shown that
The reader is advised to prove the above statement.
Remark 11.2.9
1. For a set of tabular values, the horizontal forward difference table is written as:
……..
2. In many books, a diagonal form of the difference table is also used. This is written as:
mywbut.com
5
………
However, in the following, we shall mostly adhere to horizontal form only.
Backward Difference Operator
DEFINITION 11.2.10 (First Backward Difference Operator) The FIRST BACKWARD DIFFERENCE OPERATOR,
denoted by is defined as
Given the step size note that this formula uses the values at and the point at the previous step. As it moves in the backward direction, it is called the backward difference operator.
DEFINITION 11.2.11 ( Backward Difference Operator) The backward difference operator,
is defined as
mywbut.com
6
In particular, for we get
Note that
EXAMPLE 11.2.12 Using the tabulated values in Example 11.2.5, find and
Solution: We have and
EXAMPLE 11.2.13 If where and are real constants, calculate
Solution: We first calculate as follows:
mywbut.com
7
Now,
Thus, for all
Remark 11.2.14 For a set of tabular values, backward difference table in the horizontal form is written as:
. .. .
EXAMPLE 11.2.15 For the following set of tabular values write the forward and backward difference tables.
9 10 11 12 13 14
mywbut.com
8
5.0 5.4 6.0 6.8 7.5 8.7
Solution: The forward difference table is written as
9 5 0.4 = 5.4 - 5 0.2 = 0.6 - 0.4 0= 0.2-0.2 -.3 = -0.3 - 0.0 0.6 = 0.3 - (-0.3)
10 5.4 0.6 0.2 -0.3 0.3
11 6.0 0.8 -0.1 0.0
12 6.8 0.7 -0.1
13 7.5 0.6
14 8.1
In the similar manner, the backward difference table is written as follows:
9 5
10 5.4 0.4
11 6 0.6 0.2
12 6.8 0.8 0.2 0.0
13 7.5 0.7 -0.1 - 0.3 -0.3
14 8.1 0.6 -0.1 0.0 0.3 0.6
Observe from the above two tables that , etc.
mywbut.com
9
EXERCISE 11.2.16
1. Show that
2. Prove that
3. Obtain in terms of Hence show that
Remark 11.2.17 In general it can be shown that or
Remark 11.2.18 In view of the remarks (11.2.8) and (11.2.17) it is obvious that, if is a
polynomial function of degree then is constant and for
Central Difference Operator
DEFINITION 11.2.19 (Central Difference Operator) The FIRST CENTRAL DIFFERENCE OPERATOR, denoted
by is defined by
and the #MATH5164# MATHEND000# CENTRAL DIFFERENCE OPERATOR is defined as
Thus,
mywbut.com
10
In particular, for define and then
Thus, uses the table of It is easy to see that only the even central differences use the
tabular point values
Shift Operator
DEFINITION 11.2.20 (Shift Operator) A SHIFT OPERATOR, denoted by is the operator which shifts the
value at the next point with step i.e.,
Thus,
Averaging Operator
DEFINITION 11.2.21 (Averaging Operator) The AVERAGING OPERATOR, denoted by gives the average value between two central points, i.e.,
Thus and
mywbut.com
11
Relations between Difference operators 1. We note that
Thus,
2. Further, Thus,
Thus gives us
So we write,
Similarly,
3. Let us denote by Then, we see that
Thus,
mywbut.com
12
Recall,
So, we have,
That is, the action of is same as that of
4. We further note that,
5. and
6. Thus,
7. 8. i.e.,
mywbut.com
13
9. 10. In view of the above discussion, we have the following table showing the relations
between various difference operators:
E
E E
EXERCISE 11.3.1
1. Verify the validity of the above table. 2. Obtain the relations between the averaging operator and other difference operators.
3. Find and for the following tabular values:
0 1 2 3 4
93.0 96.5 100.0 103.5 107.0
11.3 12.5 14.0 15.2 16.0
mywbut.com
14
Newton's Interpolation Formulae As stated earlier, interpolation is the process of approximating a given function, whose values are
known at tabular points, by a suitable polynomial, of degree which takes the
values at for Note that if the given data has errors, it will also be reflected in the polynomial so obtained.
In the following, we shall use forward and backward differences to obtain polynomial function
approximating when the tabular points 's are equally spaced. Let
where the polynomial is given in the following form:
(11.4.1)
for some constants to be determined using the fact that for
So, for substitute in (11.4.1) to get This gives us Next,
So, For or equivalently
Thus, Now, using mathematical induction, we get
Thus,
mywbut.com
15
As this uses the forward differences, it is called NEWTON'S FORWARD DIFFERENCE FORMULA for interpolation, or simply, forward interpolation formula. EXERCISE 11.4.1 Show that
and and in general,
For the sake of numerical calculations, we give below a convenient form of the forward interpolation formula.
Let then
With this transformation the above forward interpolation formula is simplified to the following form:
(11.4.2)
mywbut.com
16
If =1, we have a linear interpolation given by
(11.4.3)
For we get a quadratic interpolating polynomial:
(11.4.4)
and so on.
It may be pointed out here that if is a polynomial function of degree then
coincides with on the given interval. Otherwise, this gives only an approximation to the
true values of
If we are given additional point also, then the error, denoted by
is estimated by
Similarly, if we assume, is of the form
then using the fact that we have
mywbut.com
17
Thus, using backward differences and the transformation we obtain the Newton's backward interpolation formula as follows:
(11.4.5)
EXERCISE 11.4.2 Derive the Newton's backward interpolation formula (11.4.5) for Remark 11.4.3 If the interpolating point lies closer to the beginning of the interval then one uses the Newton's forward formula and if it lies towards the end of the interval then Newton's backward formula is used. Remark 11.4.4 For a given set of n tabular points, in general, all the n points need not be used for interpolating polynomial. In fact N is so chosen that forward/backward difference almost remains constant. Thus N is less than or equal to n. EXAMPLE 11.4.5
1. Obtain the Newton's forward interpolating polynomial, for the following tabular data and interpolate the value of the function at
x 0 0.001 0.002 0.003 0.004 0.005
y 1.121 1.123 1.1255 1.127 1.128 1.1285
2. Solution: For this data, we have the Forward difference difference table
0 1.121 0.002 0.0005 -0.0015 0.002 -.0025
.001 1.123 0.0025 -0.0010 0.0005 -0.0005
mywbut.com
18
.002 1.1255 0.0015 -0.0005 0.0
.003 1.127 0.001 -0.0005
.004 1.128 0.0005
.005 1.1285
3. Thus, for where and we get
4. Thus,
5.
6. Using the following table for approximate its value at Also, find an error
estimate (Note ).
0.70 72 0.74 0.76 0.78
0.84229 0.87707 0.91309 0.95045 0.98926
7. Solution: As the point lies towards the initial tabular values, we shall use Newton's Forward formula. The forward difference table is:
mywbut.com
19
0.70 0.84229 0.03478 0.00124 0.0001 0.00001
0.72 0.87707 0.03602 0.00134 0.00011
0.74 0.91309 0.03736 0.00145
0.76 0.95045 0.03881
0.78 0.98926
8. In the above table, we note that is almost constant, so we shall attempt degree polynomial interpolation.
9. Note that gives Thus, using forward
interpolating polynomial of degree we get
10. 11.
12. An error estimate for the approximate value is
13.
14. Note that exact value of (upto decimal place) is and the approximate value, obtained using the Newton's interpolating polynomial is very close to this value. This is also reflected by the error estimate given above.
15. Apply degree interpolation polynomial for the set of values given in Example
11.2.15, to estimate the value of by taking
mywbut.com
20
Also, find approximate value of Solution: Note that is closer to the values lying in the beginning of tabular values, while is towards the end of tabular values. Therefore, we shall use forward difference formula for and the backward difference formula for
Recall that the interpolating polynomial of degree is given by
Therefore,
1. for and we have This gives,
2.
3. for and we have This gives,
4.
Note: as is closer to we may expect estimate calculated using
to be a better approximation.
5. for we use the backward interpolating polynomial, which gives,
mywbut.com
21
Therefore, taking and we have
This gives,
EXERCISE 11.4.6
1. Following data is available for a function
x 0 0.2 0.4 0.6 0.8 1.0
y 1.0 0.808 0.664 0.616 0.712 1.0
2. Compute the value of the function at and 3. The speed of a train, running between two station is measured at different distances from
the starting station. If is the distance in from the starting station, then the
speed (in ) of the train at the distance is given by the following table:
x 0 50 100 150 200 250
v(x) 0 60 80 110 90 0
4. Find the approximate speed of the train at the mid point between the two stations.
5. Following table gives the values of the function at the different
values of the tabular points
x 0 0.04 0.08 0.12 0.16 0.20
mywbut.com
22
S(x) 0 0.00003 0.00026 0.00090 0.00214 0.00419
6. Obtain a fifth degree interpolating polynomial for Compute and also find an error estimate for it.
7. Following data gives the temperatures (in ) between 8.00 am to 8.00 pm. on May 10, 2005 in Kanpur:
Time 8 am 12 noon 4 pm 8pm
Temperature 30 37 43 38
8. Obtain Newton's backward interpolating polynomial of degree to compute the temperature in Kanpur on that day at 5.00 pm.
mywbut.com
23
Lagrange's Interpolation Formula Introduction
In the previous chapter, we derived the interpolation formula when the values of the function are
given at equidistant tabular points However, it is not always possible to obtain
values of the function, at equidistant interval points, In view of this, it is desirable to derive an interpolating formula, which is applicable even for unequally distant points. Lagrange's Formula is one such interpolating formula. Unlike the previous interpolating formulas, it does not use the notion of differences, however we shall introduce the concept of divided differences before coming to it.
Divided Differences DEFINITION 12.2.1 (First Divided Difference) The ratio
for any two points and is called the FIRST DIVIDED DIFFERENCE of relative to
and It is denoted by
Let us assume that the function is linear. Then is constant for any two tabular
points and i.e., it is independent of and Hence,
Thus, for a linear function if we take the points and then, i.e.,
Thus,
mywbut.com
24
So, if is approximated with a linear polynomial, then the value of the function at any point
can be calculated by using where is the
first divided difference of relative to and
DEFINITION 12.2.2 (Second Divided Difference) The ratio
is defined as SECOND DIVIDED DIFFERENCE of relative to and
If is a second degree polynomial then is a linear function of Hence,
In view of the above, for a polynomial function of degree 2, we have
Thus,
This gives,
From this we obtain,
So, whenever is approximated with a second degree polynomial, the value of at any point can be computed using the above polynomial, which uses the values at three points
and
EXAMPLE 12.2.3 Using the following tabular values for a function obtain its second degree polynomial approximation.
0 1 2
0.1 0.16 0.2
mywbut.com
25
1.12 1.24 1.40
Also, find the approximate value of the function at Solution: We shall first calculate the desired divided differences.
Thus,
Therefore
EXERCISE 12.2.4
1. Using the following table, which gives values of corresponding to certain values
of find approximate value of with the help of a second degree polynomial.
322.8 324.2 325
2.50893 2.51081 2.5118
2. Show that
So,
That is, the second divided difference remains unchanged regardless of how its arguments are interchanged.
mywbut.com
26
3. Show that for equidistant points and where
and 4. Show that for a linear function, the second divided difference with respect to any three
points, and is always zero.
Now, we define the divided difference.
DEFINITION 12.2.5 ( Divided Difference) The #MATH5307# MATHEND000# DIVIDED
DIFFERENCE of relative to the tabular points is defined recursively as
It can be shown by mathematical induction that for equidistant points,
(12.2.1)
where, and
In general,
where and is the length of the interval for Remark 12.2.6 In view of the remark (11.2.18) and (12.2.1
EXAMPLE 12.2.7 Show that can be written as
), it is easily seen that for a
polynomial function of degree the divided difference is constant and the divided difference is zero.
Solution:By definition, we have
mywbut.com
27
so, Now since,
we get the desired result.
EXERCISE 12.2.8 Show that can be written in the following form:
where,
and
Further show that for
Remark 12.2.9 In general it can be shown that where,
and
Here, is called the remainder term.
It may be observed here that the expression is a polynomial of degree and
for
Further, if is a polynomial of degree then in view of the Remark 12.2.6
, the remainder
term, as it is a multiple of the divided difference, which is 0 .
mywbut.com
28
Lagrange's Interpolation formula In this section, we shall obtain an interpolating polynomial when the given data has unequal tabular points. However, before going to that, we see below an important result.
THEOREM 12.3.1 The divided difference can be written as:
Proof. We will prove the result by induction on The result is trivially true for For
Let us assume that the result is true for i.e.,
Consider then the divided difference is
mywbut.com
29
which on rearranging the terms gives the desired result. Therefore, by mathematical induction, the proof of the theorem is complete. height6pt width 6pt depth 0pt
Remark 12.3.2 In view of the theorem 12.3.1
Now, if a function is approximated by a polynomial of degree then , its divided
difference relative to will be zero,(Remark
the divided difference of a function remains unchanged regardless of how its arguments are interchanged, i.e., it is independent of the order of its arguments.
12.2.6
) i.e.,
Using this result, Theorem 12.3.1
gives
or,
which gives ,
mywbut.com
30
Note that the expression on the right is a polynomial of degree and takes the value at
for
This polynomial approximation is called LAGRANGE'S INTERPOLATION FORMULA.
Remark 12.3.3 In view of the Remark (12.2.9
Remark 12.3.4 We have seen earlier that the divided differences are independent of the order of its arguments. As the Lagrange's formula has been derived using the divided differences, it is not necessary here to have the tabular points in the increasing order. Thus one can use
Lagrange's formula even when the points are in any order, which was not possible in the case of Newton's Difference formulae.
), we can observe that is another form of
Lagrange's Interpolation polynomial formula as obtained above. Also the remainder term gives an estimate of error between the true value and the interpolated value of the function.
Remark 12.3.5 One can also use the Lagrange's Interpolating Formula to compute the value of
for a given value of This is done by interchanging the roles of and i.e. while
using the table of values, we take tabular points as and nodal points are taken as
EXAMPLE 12.3.6 Using the following data, find by Lagrange's formula, the value of at
0 1 2 3 4
9.3 9.6 10.2 10.4 10.8
11.40 12.80 14.70 17.00 19.80
mywbut.com
31
Also find the value of where
Solution: To compute we first calculate the following products:
Thus,
Now to find the value of such that we interchange the roles of and and calculate the following products:
Thus,the required value of is obtained as:
mywbut.com
32
EXERCISE 12.3.7 The following table gives the data for steam pressure vs temperature :
360 365 373 383 390
154.0 165.0 190.0 210.0 240.0
Compute the pressure at
EXERCISE 12.3.8 Compute from following table the value of for :
5.60 5.90 6.50 6.90 7.20
2.30 1.80 1.35 1.95 2.00
Also find the value of where
Gauss's and Stirling's Formulas In case of equidistant tabular points a convenient form for interpolating polynomial can be derived from Lagrange's interpolating polynomial. The process involves renaming or re-designating the tabular points. We illustrate it by deriving the interpolating formula for 6 tabular points. This can be generalized for more number of points. Let the given tabular points be
These six points in the given order are not equidistant. We re-designate them for the sake of convenience as follows:
These re-designated tabular points in their given order are equidistant. Now recall from remark (12.3.3
) that Lagrange's interpolating polynomial can also be written as :
mywbut.com
33
which on using the re-designated points give:
Now note that the points and are equidistant and the divided difference are independent of the order of their arguments. Thus, we have
where for Now using the above relations and the transformation
we get
Thus we get the following form of interpolating polynomial
mywbut.com
34
(12.4.1)
Similarly using the tabular points
and the re-
designating them, as and we get another form of interpolating polynomial as follows:
(12.4.2)
Now taking the average of the two interpoating polynomials (12.4.1) and (12.4.2
) (called GAUSS'S FIRST AND SECOND INTERPOLATING FORMULAS, respectively), we obtain Sterling's Formula of interpolation:
(12.4.3)
These are very helpful when, the point of interpolation lies near the middle of the interpolating interval. In this case one usually writes the diagonal form of the difference table. EXAMPLE 12.4.1 Using the following data, find by Sterling's formula, the value of
at
0.20 0.21 0.22 0.23 0.24
1.37638 1.28919 1.20879 1.13427 1.06489
Here the point lies near the central tabular point Thus , we define
to get the difference table in diagonal form as:
mywbut.com
35
(here,
and etc.).
Using the Sterling's formula with we get as follows:
Note that tabulated value of at is 1.1708496.
mywbut.com
36
EXERCISE 12.4.2 Compute from the following table the value of for :
0.00 0.02 0.04 0.06 0.08
0.00000 0.02256 0.04511 0.06762 0.09007
mywbut.com
37