Tut 10s
Tut 10s
Tutorial 10
1 Recall:
1. Vandermonde interpolation:
Suppose we are given n + 1 observation data:
f0 = f (x0 ), f1 = f (x1 ), . . . , fn = f (xn )
where xi 6= xj for all i 6= j. We determine a polynomial p(x) of degree ≤ n such that
p(xi ) = fi , i = 0, 1, . . . , n
Suppose p(x) = α0 + α1 x + α2 x2 + . . . αn xn , we have
x20 xn0
1 x0 ··· α0 f0
1 x1 x21 ··· xn1 α1 f1
= (1)
.. .. .. .. .. ..
. . ··· . . . .
1 xn x2n ··· xnn αn fn
where the coefficient matrix is called a Vandermonde matrix. Uniqueness of the polynomial p(x) is guaranteed.
But solving for the coefficients αi is computationally expensive and it may be very ill-conditioned (large
condition number).
2. Lagrange interpolation:
Consider the following basis functions:
(x − x0 )(x − x1 ) · · · (x − xj−1 )(x − xj+1 ) · · · (x − xn )
lj (x) = (2)
(xj − x0 )(xj − x1 ) · · · (xj − xj−1 )(xj − xj+1 ) · · · (xj − xn )
for j = 0, 1, · · · , n. Note that lj (xj ) = 1 and lj (xi ) = 0 for all i 6= j. Then the following polynomial of degree
≤n
L(x) = f0 l0 (x) + f1 l1 (x) + · · · fn ln (x)
will satisfy L(xi ) = fi for all i = 0, 1, · · · , n.
3. Newton form of interpolation:
Suppose a = x0 < x1 < · · · < xn−1 < xn = b. Then we define the Divided difference as follows:
The zeroth-order divided difference of f (x) is
f [x0 ] = f (x0 ), f [x1 ] = f (x1 ), · · · , f [xn ] = f (xn )
The first order divided difference of f (x) is
f [x1 ] − f [x0 ] f [x2 ] − f [x1 ]
f [x0 , x1 ] = , f [x1 , x2 ] = , ,··· ,
x1 − x0 x2 − x1
and similar we have the k-th order divided difference of f (x)
f [x1 , x2 , · · · , xk ] − f [x0 , x1 , · · · xk−1 ]
f [x0 , x1 , · · · , xk ] = , ,
xk − x0
The Newton form of interpolation of f (x) is
p(x) = f [x0 ] + f [x0 , x1 ](x − x0 ) + · · · + f [x0 , x1 , · · · , xn ](x − x0 )(x − x1 ) · · · (x − xn−1 )
1
2 Exercises:
Please do the star problem (*) in tutorial class and finish the rest after class.
1. Let f be a function defined on [a, b]. Consider the following n + 1 observation data:
x0 x1 ··· xn
(3)
f0 f1 ··· fn
(a) State the definition of the polynomial interpolation pn (x) for the given data (3).
(b) Write down the basis functions {li (x)}ni=0 of Lagrange interpolation for the given data (3)
(c) Write down the basis function of Newton’s interpolation for the given data (3).
(d) Show the uniqueness of the polynomial interpolation pn (x) in (a) without calculating the determinant of
Vandermonde matrix.
(e) Consider the Vandermonde matrix
x20 xn0
1 x0 ···
1 x1 x21 ··· xn1
A=
.. .. .. .. ..
. . . . .
1 xn x2n ··· xnn
Solution. (a) A p(x) of degree ≤ n is call the polynomial interpolation for the given data if
p(xi ) = fi i = 0, 1, · · · , n.
1, x − x0 , (x − x0 )(x − x1 ), · · · , Πni=0 (x − xi ).
(d) As xi are distinct point, the lagrange basis functions are well-defined. Therefore, the polynomial inter-
polation exists. Let p1 and p2 be two polynomial interpolation, and set q(x) = p1 (x) − p2 (x). It is easy
to see that q(xi ) = 0 for all 0 ≤ i ≤ n. So q is a polynomial with degree ≤ n vanish at n + 1 distinct
point and thus q = 0, using the fundamental theorem of algebra.
2
1 x0
(e) i. If n = 1, A = , then det(A) = X1 − X0 . So n = 1 is true.
1 x1
ii. Consider
x20 xn0
1 x0 ···
1 x1 x21 ··· xn1
f (t) = detA =
.. .. .. .. ..
. . . . .
1 xn−1 x2n−1 ··· xnn−1
1 t t2 ··· tn
Note that we can represent f (t) as
f (t) = ±D0 ∓ D1 t ± · · · + Dn tn
where Di are determinants of n×n matrices that contain no factor of t. Since Dn is the Vandermonde
determinant of the n × n matrix with coefficients x0 through xn−1 , we have f (t) an nth degree
polynomial with leading coefficients Y
k= (xi − xj )
n>i>j
(a) What are the Vandermonde interpolation polynomial, Langrange interpolation polynomial and Newton
interpolation for these data?
(b) When we add one point to the data,
x 1 3/2 0 2
(5)
f (x) 3 13/4 3 5/3
x 0 1 2 3
(6)
f (x) 0 -5/2 -2 27/2
Evaluate the minimum of f (x) over [0, 3] based on the result above.
(d) Write three drawbacks for using Vandermonde interpolation.
Solution. (a)
1 1
p(x) = 3 − x + x2
3 3
3 13 3
L(x) = −6 x − x + (x − 1)x + 2(x − 1) x −
2 2 2
1 1 3
N (x) = 3 + (x − 1) + (x − 1) x −
2 3 2
3
(b)
1 1 3 3
N (x) = 3 + (x − 1) + (x − 1) x − − 2x(x − 1) x −
2 3 2 2
x0 = 0 x1 = 1 x2 = 2 x3 = 3
-2.5 0.5 15.5
(c)
1.5 7.5
2
Therefore,
And
p0 (x) = 6x2 − 9x
whose solutions are x = 0 and x = 1.5. Comparing the three values p(0) = 0, p(1.5) = − 27
8 and p(3) =
27
2 ,
we know that the approximate minimum value of f (x) is − 278 .
(d) i. Finding inverse of matrix requires lots of calculation.
ii. The matrix is ill-posed.
iii. Adding new data has to solve the linear system from the beginning.
3. (a) Show that the basis functions {li (x)}ni=0 of Lagrange interpolation that you write in question 1 are
linearly independent.
(b) Show that
n
X
li (x) = 1.
i=0
4
(c) i. For any polynomial p(x) of degree ≤ n, we have the following fact
n
X
p(xi )li (x) = p(x).
i=1
The above result holds for all x ∈ R. Now since y is arbitrary, we now put y = x, the result follows.
4. Given the data (3), we define the divided difference recursively as follows:
(e) Write down the explicit formulas for f [x], f [x, x + h] and f [x, x + h, x + 2h]. Then Give an explicit
formula for f [x, x + h, x + 2h, · · · , x + nh].
Solution. (a) Note that LHS is the Newton interpolation on the points x0 , x1 , x2 , x3 and the RHS is the
Newton interpolation on the points x1 , x3 , x2 , x0 . By the uniqueness of polynomial interpolation, we
know that they are the same.
(b) Let p(x) be the Newton form of interpolation of f (x) at the nodal points xi ni=0 , and g(x) = f (x) − p(x).
Since f (xi ) = p(xi ) for i = 0, 1, · · · , n, g has n + 1 distinct zeros in [a, b]. Then Rolle’s Thm tells the
existence of a point ξ ∈ (a, b) such that g (n) (ξ) = 0, which implies
(c) Let fc and fd be two polynomials, such that fc interpolates f at x0 , x1 , ..., xn and fd interpolates f at
xi0 , xi1 , ..., xin :
5
We can rewrite the polynomials above as
fc = cn xn + ...
fd = dn xn + ...
Since fc and fd 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 , ..., xin ]. We also know that the polynomial
interpolating the same nodes is unique. Thus the result follows.
Qn
(d) Let ωn+1 = i=0 (x − xi ), we have
n n
X X ωn+1 (x)
li (x) = 0
i=0 i=0
(x − xi )ωn+1 (xi )
n
1 X 1
⇒ = 0
ωn+1 (x) i=0
(x − xi )ωn+1 (xi )
We also have
f (x) − pn (x)
f [x0 , ..., xn , x] =
ωn+1 (x)
Pn ωn+1 (x)
pn (x) = i=0 0 f (xi )
(x − xi )ωn+1 (xi )
Then we have
f (x) − pn (x)
f [x0 , ..., xn , x] =
ωn+1 (x)
f (x) pn (x)
= −
ωn+1 (x) ωn+1 (x)
n
f (x) X f (xi )
= − 0
ωn+1 (x) i=0 (x − xi )ωn+1 (xi )
n n
X f (x) X f (xi )
= 0 − 0
i=0
(x − xi )ωn+1 (xi ) i=0 (x − xi )ωn+1 (xi )
n
X f (x) − f (xi )
= 0
i=0
(x − xi )ωn+1 (xi )
n
X f [x, xi ]
=
ω 0 (x )
i=0 n+1 i
f [x + h, x + 2h] − f [x, x + h]
f [x, x + h, x + 2h] =
2h
f (x + 2h) − f (x + h) f (x + h) − f (x)
−
= h h
2h
f (x + 2h) − 2f (x + h) + f (x)
= ,
2h2
6
By observation, we have