Applied Numerical Methods (MATH 151A) Assignment 3

$35.00

Category:

Description

5/5 - (2 votes)

1. Let f(x) = 1/x, xi = i + 1, 0 ≤ i ≤ 2, find the Lagrange interpolation polynomial
interpolating the points (xi
, f(xi)) using
(a) Lagrange interpolation formula.
(b) Neville’s method.
(c) the divided difference interpolation.

2. Find the natural cubic spline passing through (−1, 1) , (0, 1), (1, 2).

3. Consider Hermite interpolation problem. Prove the following theorem:
Let f ∈ C
1
([a, b]) and x0, x1, …xn be n distinct nodes in [a, b], and let
H(x) = Xn
i=0
f(xi)Hn,j (x) +Xn
i=0
f
0
(xi)Hˆ
n,j (x)
where
Hn,j = [1 − 2(x − xj )L
0
n,j (xj )]L
2
n,j (x) Hˆ
n,j = (x − xj )L
2
n,j (x).
Show that H(xi) = f(xi) and H0
(xi) = f
0
(xi), for all 0 ≤ i ≤ n. (You do not need to
prove the uniqueness of H.)
1

4. Let f(x) be a function defined on the interval [x0 − h, x0 + h], and f ∈ C
3
[x0 − h, x0 + h] .
(a) Let P(x) be the Lagrange interpolation polynomial of f(x) at the nodes x = x0 −
h, x0, x0 + h. Write down the expression of P(x).
(b) Write down the error term E(x) := f(x) − P(x) in terms of the derivatives of f(x).
(c) Using the fact that f(x) = P(x)+E(x), calculate the derivatives of f, f
0
(x) at x = x0.
(d) If we approximate the derivative f
0
(x0) by P
0
(x0), is it true that the above approximation is exact if f is a polynomial of degree less than or equal to 2 ? Why ?
(e) Write down an error bound of this approximation rule suggested in (d) for a general
function f(x) based on the result in (b).

5. (Programming problem)

Let a number of points (xi
, f(xi)) be given, 0 ≤ i ≤ n. Let P(x) be its Lagrange interpolation polynomial interpolating the points (xi
, f(xi)), 0 ≤ i ≤ n.
Write a program which allow inputs {(xi
, f(xi))} and a value a, and calculate the value of
P(a).
2