568 Chapter 20Numerical methods
Quadratic interpolation
The quadratic function that passes through three successive points, or nodes,(x
0, y
0),
(x
1, y
1) and (x
2, y
2) can be written as
p
2(x) 1 = 1 L
0(x)y
01 + 1 L
1(x)y
11 + 1 L
2(x)y
2(20.18)
where
This is Lagrange’s formulafor quadratic interpolation, and is used to find an
approximate value of a function in the intervalx
0tox
2.
3EXAMPLE 20.8Quadratic interpolation
Three points on the graph of e
xare (to 6 decimal places in e
x)(x
0, y
0) 1 = 1 (0.80,
2.225541), (x
1, y
1) 1 = 1 (0.84, 2.316367)and (x
2, y
2) 1 = 1 (0.88, 2.410900). Quadratic
interpolation atx 1 = 1 0.832then gives (compare Example 20.7)
e
0.8321 = 1 0.12y
01 + 1 0.96y
11 − 1 0.08y
21 = 1 2.297905
compared with the true value 2.297910 (to 6 decimal places).
0 Exercise 17
Lx
xx xx
xxxx
2012021()
()()
()()
=
−−
−−
Lx
xx xx
xxxx
Lx
xx
01201021()
()()
()()
()
(
=
−−
−−
,=
−
0021012)( )
()()
xx
xxxx
−
−−
0
1
2
123
............
........
........
............................
...
...
..
...
..
...
...
...
...
..
...
..
...
.y
x
...........................................................................................................
..
...
...
..
...
...
...
..
...
...
..
...
...
..
...
...
...
..
...
...
..
...
...
..
...
...
..
...
...
..
...
...
..
...
...
........
........
..........
.........
......
....
...
...
...
...
...
...
...
...
....
...
...
...
...
...
....
...
...
...................................................................................................................................................................................................
..
...
...
..
...
...
...
..
...
...
..
...
...
...
...
..
...
...
..
...
...
...
..
...
...
..
...
...
...
...
..
...........................................Table 20.4
xy
0.0 1.0000
0.4 1.8902
0.8 1.0517
1.2 0.9577
1.6 0.5207
2.0 1.0000
2.4 2.1184
2.8 1.3809
3.2 1.5690
Figure 20.5
3Lagrange’s general interpolation formula (1795) was anticipated by Euler in the Institutiones calculi
differentialisof 1755 and given explicitly by Edward Waring (1734–1793), professor at Cambridge, in a
Philosophical Transactions paper of 1779.