Page 298 - Numerical Analysis Using MATLAB and Excel
P. 298
Chapter 7 Finite Differences and Interpolation
,
,
,
,
The formula of (7.54) is valid only when the values x x x … x n are equally spaced with inter-
2
0
1
val . It is used to interpolate values near the smaller values of , that is, the values near the
h
x
beginning of the given data set. The formula that we will study on the next section, is used to
interpolate values near the larger values of , that is, the values near the end of the given data
x
set.
Example 7.8
(
Use the Gregory−Newton forward interpolation formula to compute f1.03 ) from the following
data.
TABLE 7.12 Table for Example 7.8
x 1.00 1.05 1.10 1.15 1.20 1.25
y = f x() 1.000000 1.257625 1.531000 1.820875 2.128000 2.453125
Solution:
We enter the given and f x() values in a difference table; then, we compute the first, second,
x
and third differences. These are not divided differences and therefore, we simply subtract the second
value of fx() from the first, the third from the second, and so on, as shown in Table 7.13.
For this example,
(
)
f = f1.00 = 1.000000
0
h = x – x = 1.05 – 1.00 = 0.05 (7.56)
0
1
x – x 1.03 1.00
–
1
r = -------------- = --------------------------- = 0.60
h 0.05
and with the values shown in Table 7.13 and using (7.54), we obtain
( 0.60 ⋅ ( 0.60 – 1 )
)
)
(
)
)
f1.03 = 1.000000 + ( 0.60 ⋅ ( 0.257625 + --------------------------------------------
2! (7.57)
)
)
( 0.60 ⋅ ( 0.60 – 1 0.60 2 )
(
–
) ⋅
+ -------------------------------------------------------------------- ( 0.000750 = 1.152727
3!
The spreadsheet of Figure 7.3 shows the layout and computations for this example.
7−20 Numerical Analysis Using MATLAB® and Excel®, Third Edition
Copyright © Orchard Publications