


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Math 128A, Spring 2007
Homework 3 Solution
4.1.12 (a) L 0 (x) + L 1 (x) + L 2 (x) + L 3 (x) is the unique polynomial of degree ≤ 3 interpolating the data (x 0 , 1), (x 1 , 1), (x 2 , 1), (x 3 , 1). Since the polynomial 1 also has degree ≤ 3 and interpolates the data, we conclude
L 0 (x) + L 1 (x) + L 2 (x) + L 3 (x) = 1.
(b) In general, L 0 (x) + · · · Ln(x) and 1 are both degree ≤ n interpolants of (x 0 , 1),... , (xn, 1), and therefore must be equal.
4.1.13 For j ≤ 3, note that xj 0 L 0 (x)+xj 1 L 1 (x)+xj 2 L 2 (x)+xj 3 L 3 (x) and xj^ are both polynomials of degree ≤ 3 interpolating (x 0 , xj 0 ), (x 1 , xj 1 ), (x 2 , xj 2 ), (x 3 , xj 3 ). Since such interpolants are unique, the two polynomials must be equal. For j > 3, note that each Li(x) has degree ≤ 3, so a linear combination of them can’t have the same degree as xj^.
4.1.15 Note: this is the complicated solution.
In analogy to the Lagrange basis {Li(x)}, we want to find a basis {Hi(x)} for the (vector space of) polynomials of degree ≤ 3 so that the coordinates of P (x) with respect to {Hi(x)} are (y 0 , y 0 ′, y 1 , y′ 1 ). The analogous versions of the requirements Li(xj ) = δij are
H 2 i(xj ) = δij H′ 2 i(xj ) = 0 H 2 i+1(xj ) = 0 H′ 2 i+1(xj ) = δij
These insure, for example, that H 0 (x) controls the value of P (x) at 0, but doesn’t affect the value of P (x) at 1 or the derivative of P (x) at 0 or 1. The requirements are met by the polynomials
H 2 i(x) = (1 − 2 L′ i(xi)(x − xi))L^2 i (x) and H 2 i+1(x) = (x − xi)L^2 i (x)
where L 0 (x) and L 1 (x) are the usual Lagrange basis elements. I.e.
H 0 (x) =
x 0 − x 1 (x − x 0 )
x − x 1 x 0 − x 1
H 1 (x) = (x − x 0 )
x − x 1 x 0 − x 1
H 2 (x) =
x 1 − x 0
(x − x 1 )
x − x 0 x 1 − x 0
H 3 (x) = (x − x 1 )
x − x 0 x 1 − x 0
and P (x) = y 0 H 0 (x) + y′ 0 H 1 (x) + y 1 H 2 (x) + y′ 1 H 3 (x)
4.1.16 The divided differences are easy to compute
i xi f [xi] f [xi, xi+1] f [xi, xi+1, xi+2] 0 0 − 1 0 2 1 1 − 1 4 2 1 − 1
(remember that f [x, x] = f ′(x)!) and the polynomial just as easy to read off from the top row:
P (x) = −1 + 0 · x + 2 · x(x − 1)
The method of the previous problem is more complicated. We want poly- nomials {Qi(x)} for i = 0, 1 , 2 which form a basis for the polynomials of degree ≤ 2 so that the coordinates of the polynomial we’re looking for are (− 1 , − 1 , 4). In particular, we require
Q 0 (0) = 1 Q 0 (1) = 0 Q′ 0 (1) = 0 Q 1 (0) = 0 Q 1 (1) = 1 Q′ 1 (1) = 0 Q 2 (0) = 0 Q 2 (1) = 0 Q′ 2 (1) = 1
So we find solutions:
Q 0 (x) = (x − 1)^2 , Q 1 (x) = 1 − (x − 1)^2 , and Q 2 (x) = x(x − 1)
and then write
P (x) = − 1 · (x − 1)^2 − 1 · (1 − (x − 1)^2 ) + 4 · x(x − 1)
4.1.28 Because we have 6 data points and the original polynomial has degree ≤ 5, we know that the interpolating polynomial is the original polynomial. The divided difference algorithm:
i xi f [xi] · · · 0 − 2 − 5 6 − 3 1 0 0 1 − 1 1 0 0 1 0 2 0 1 0 3 1 3 1 1 6 6 4 2 7 18 5 3 25
yields
p(x) = −5 + 6(x + 2) − 3(x + 2)(x + 1) + 1(x + 2)(x + 1)x
so p(x) has degree 3.
and, since the xis have even spacing h,
|x − xn+1| ≤ |x 0 − xn+1| = (n + 1)h
Putting these together yields
|(x − x 0 ) · · · (x − xn)| ≤ (n + 1)!hn+
If instead x ∈ [x 1 , xn+1], a symmetric argument yields the same conclu- sion.
4.2.14 We compute
|ex^ − Pn(x)| ≤
(x − x 0 ) · · · (x − xn) n! ec
n!(1/n)n+ n!
ec^ ≤ (1/n)n+1ec^ ≤ (1/n)n+1e → 0