Professional Documents
Culture Documents
Problem 1: Let P3 (x) be the interpolating polynomial for the data (0, 0), (0.5, y), (1, 3)
and (2, 2). Find y if the coefficient of x3 in P3 (x) is 6.
where
(x − x1 )(x − x2 )(x − x3 )
L0(x) = ,
(x0 − x1 )(x0 − x2 )(x0 − x3)
(x − x0 )(x − x2 )(x − x3 )
L1(x) = ,
(x1 − x0 )(x1 − x2 )(x1 − x3)
(x − x0 )(x − x1 )(x − x3 )
L2(x) = ,
(x2 − x0 )(x2 − x1 )(x2 − x3)
(x − x0 )(x − x1 )(x − x2 )
L3(x) = .
(x3 − x0 )(x3 − x1 )(x3 − x2)
(x − 0.5)(x − 1)(x − 2) x3 − 72 x2 + 72 x − 1 7 7
L0(x) = = = −x3 + x2 − x + 1,
(0 − 0.5)(0 − 1)(0 − 2) −1 2 2
(x − 0)(x − 1)(x − 2) 3 2
x − 3x + 2x 8 16
L1(x) = = 3 = x3 − 8x2 + x,
(0.5 − 0)(0.5 − 1)(0.5 − 2) 8
3 3
(x − 0)(x − 0.5)(x − 2) x3 − 52 x2 + x
L2(x) = = = −2x3 + 5x2 − 2x,
(1 − 0)(1 − 0.5)(1 − 2) − 12
(x − 0)(x − 0.5)(x − 1) x3 − 32 x2 + 12 x 1 1 1
L3(x) = = = x3 − x2 + x.
(2 − 0)(2 − 0.5)(2 − 1) 3 3 2 6
Thus,
1
Since we want the coefficient of x3 to be equal to 6, we need:
8y − 16
= 6,
3
17
or y = 4 = 4.25. X
We can check whether this polynomial interpolates function f , that is, whether we got the
correct answer. Note that
P3 (0) = 0,
P3 (0.5) = 4.25,
P3 (1) = 3,
P3 (2) = 2.
where
x − x1 x − 0.5
L0(x) = = ,
x0 − x 1 −0.5
x − x0 x
L1(x) = = .
x1 − x 0 0.5
Thus,
x − 0.5 0 x
P1 (x) = − ·e + · e0.5 = −2x + 1 + 3.2974x = 1.2974x + 1.
0.5 0.5
We can check whether this polynomial interpolates function f , that is, whether we got the
correct answer. Note that
P1 (0) = 1 = e0 ,
P1 (0.5) = 1.6487 = e0.5.
2
Problem 3: For a function f , the forward divided differences are given by
f [xi ] = f (xi ).
Note that steps ➀ and ➁ could be interchanged. However, step ➂ could only be done last.
3
Problem 4: Let i0 , i1, . . . , in be a rearrangement of the integers 0, 1, . . ., n.
Show that f [xi0 , xi1 , . . . , xin ] = f [x0 , x1, . . . , xn ].
Solution: Let Pc and Pd be two polynomials, such that Pc interpolates f at x0, x1, . . . , xn
and Pd interpolates f at xi0 , xi1 , . . ., xin :
Pc = c0 + c1 (x − x0 ) + . . . + cn (x − x0)(x − x1 ) · · · (x − xn−1 ),
Pd = d0 + d1 (x − xi0 ) + . . . + dn (x − xi0 )(x − xi1 ) · · · (x − xin−1 ),
Since Pc and Pd were defined to be in the form of Newton’s polynomials, we know that cn
and dn are nth divided differences, cn = f [x0 , x1, . . . , xn ] and dn = f [xi0 , xi1 , . . ., xin ] :
We also know that the polynomial interpolating the same nodes is unique, that is, Pc = Pd .
Thus,
4
Problem 5: Give explicit formulas for f [a], f [a, b], f [a, b, c] in terms of f (a), f (b), f (c).
Optional: Give an explicit formula for f [x, x + h, x + 2h, . . ., x + nh].
Solution:
Similar to problem 3, we can write the Newton’s divided difference formulas as:
f [a] = f (a), X
f [b] − f [a]
f [a, b] =
b−a
f (b) − f (a)
= , X
b−a
f [b, c] − f [a, b]
f [a, b, c] =
c−a
f (c)−f (b) f (b)−f (a)
c−b − b−a
=
c−a
(f (c) − f (b))(b − a) − (f (b) − f (a))(c − b)
= . X
(c − b)(b − a)(c − a)
f [x] = f (x),
f (x + h) − f (x)
f [x, x + h] = ,
h
f [x + h, x + 2h] − f [x, x + h]
f [x, x + h, x + 2h] =
2h
f (x+2h)−f (x+h)
h − f (x+h)−f
h
(x)
=
2h
f (x + 2h) − 2f (x + h) + f (x)
= ,
2h2