Numerical Analysis I, Fall 2014 (http://www.math.nthu.edu.tw/˜ wangwc/)

Homework Assignment for Week 06

1. Section 3.1: Problems 9, 10, 13(a), 17 (the last sentence simply means h = (10 − 1)/n for some positive integer n).

2. Section 3.1: Problem 6(a). Evaluate it with for loops.

Hint: One can compute L_{n,k}(x) with a for loop for each of the k = 0, ⋯, n, then evaluate P (x) with another for loop on k. Note that, in C, the index for an array a(i) starts with i = 0 by default. However, the index starts with i = 1 in matlab. One should shift the index in the Lagrange interpolation formula accordingly.

Note however, this is not the most efficient method to evluate the Lagrangian interpolation. The proper way is to evaluate P (x) using Neville’s method in section 3.2. An alternative way is to compute the coefficients of P (x) using Newton’s divided-difference formula in section 3.3, then evaluate P (x). Both these methods are and will not appear in the exams in this class.

3. Let x_{0}, ⋯, x_{n} be uniformly spaced nodes on [a, b] with x_{j} = a + jh, h = (b − a)/n.

(a) Show that |(x − x_{0}) ⋯ (x − x_{n})| ≤ n!h^{n+1} on a ≤ x ≤ b.

(b) Let P_{n} be the degree n interpolating polynomial of e^{x} with uniformly spaced nodes on [0, 1]. Show that

max_{0≤x≤1} |e^{x} − P_{n}(x)| → 0 as n → ∞

Note that uniform convergence of interpolating polynomials as in (b) does not hold in general. The example on p158-p160 is a good illustration. Another well known example with simular behavior is f(x) = 1/(1 + x^{2}) on [−5, 5] with uniformly space nodes.

4. Section 3.4: Problems 12, 13, 14, 20, 26, 27.

5. The cubic spline with not-a-knot condition gives rise to to a linear system Ax = b where A is an (n + 1) × (n + 1) matrix and x = (c_{0}, c_{1}, ⋯, c_{n})^{T}. Write down A.