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

Quiz 03

2:20-3:10PM, Nov 17, 2020.

1. Let P_{n} be the degree n interpolating polynomial of cos(2x) on the uniformly spaced nodes x_{0}, ⋯, x_{n} on [0, 1] with x_{j} = jh, h = 1/n. Is it true that

max_{0≤x≤1} | cos(2x) − P_{n}(x)| → 0 as n → ∞?

Give all details and explain.

2. Denote by P_{0,1,···,k}(x) the Lagrange interpolating polynomial on the data set (x_{0}, f(x_{0})), (x_{1}, f(x_{1}), ⋯ (x_{k}, f(x_{k})). Express P_{0,1,···,k} in terms of P_{0,1,···,j−1,j+1,···,k} and P_{0,1,···,i−1,i+1,···,k}. Then \underline{verify} that your answer is indeed the Lagrange interpolating polynomial.

3. A natural cubic spline S on [0, 2] is defined by

S(x) = \{ \begin{matrix}S_{0}(x) = 1 + 2x − x^{3}, & 0 ≤ x ≤ 1 \\ S_{1}(x) = 2 + b(x − 1) + c(x − 1)^{2} + d(x − 1)^{3}, & 1 ≤ x ≤ 2 \end{matrix}

Find b, c, d.

4. Suppose that we are to construct a piecewise polynomial interpolation S(x) on the data (x_{0}, f(x_{0})), (x_{1}, f(x_{1})), ⋯, (x_{n}, f(x_{n})), with additional continuity conditions for S′, S′′ and S′′′ on the interior nodes x_{1}, ⋯, x_{n−1}. If we use polynomials of the same degree on each of the interval [x_{0}, x_{1}], ⋯, [x_{n−1}, x_{n}], what is the minimal degree needed in each interval? How many additional end conditions are needed? Count carefully and explain (give details).

5. Given four data (x_{i}, exp(−2x_{i})): (0.3, 0.5488), (0.4, 0.4493), (0.5, 0.3679) and (0.6, 0.3012) (you should generate the data yourself to avoid typo in inputting data). Use Inverse Interpolation to find the root of x = exp(−2x). You can use any algorithm for Lagrange interpolation. After finding x, check yourself that x = exp(−2x) is indeed satisfied in case of a bug in your code. Just check it yourself and need not show this last part.

Hand in code, put all data within the code so that it can be executed immediately.

Name your codes in the same format as your_{s}tudent_{i}d_{n}umber.m or your_{s}tudent_{i}d_{n}umber.c and make sure it is executable/compilable.