Starting from:

$30

MATH151A-Homework 3 Solved

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 ∈ C1([a,b]) and x0,x1,...xn be n distinct nodes in [a,b], and let



where

                                       Hn,j = [1 − 2(x − xj)L0n,j(xj)]L2n,j(x)              Hˆn,j = (x − xj)L2n,j(x).

Show that H(xi) = f(xi) and H0(xi) = f0(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 ∈ C3[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, f0(x) at x = x0.

(d)   If we approximate the derivative f0(x0) by P0(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 generalfunction 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).

More products