\item Section 3.1: Problems 25. % Use the sample file. % What you will observe is known as Runge's phenomenon. % This is the reason to use piecewise polynomial interpolation, % instead of a high order polynomial interpolation. \item Section 3.2: Problem 6, 8, 11, 12. For problem 11, you will need to write a function (or subroutine) based on the practice in the recitation this Tuesday. The function takes the input vectors $x$, $y$, $x^*$, where $x \in R^d$, $y=f(x) \in R^d$ are data points and $x* \in R^m$ is the vector of points to be interpolated (in problem 11, $x^*$ is a single point $x^*=1+\sqrt{10}$, that is $m=1$ ). The function then determines $d$ by checking the lengths of $x$ and/or $y$ and outputs the interpolated values $y^* \in R^m$ as an approximation of $f(x^*)$. To start with, you can use direct evaluation of Lagrangian interpolating polynomials here (and also in problem 12) as in homework 7. You are encouraged to revise it to Neville's method later on. Once the function is written, you can generate $x$, $y$ from outside with any chosen $d$ and $m$ and call the function in the main program. At this point, you can plot the interpolating polynomial vs the original function with roughly $n \approx 8-12$ and $m \approx 100$. Bring your code next Tuesday to recitation in case of any problem or doubts. Repeat the procedure and change the original function from $1\over 1+ x^2$ to $\sin x$, $\cos x$ and observe the difference in behavior of the interpolating polynomials. Do the same with cubic spline next week. % \item Section 3.5: Problems 12, 13, 14, 20, 26, 27. %9th ed page 162 \item Section 3.5: Problems 12, 13, 14, 30, 34, 35. %10th ed page 162 Remark: In problem 12: `clamped' means $S'(1)=f'(1)$, $S'(3)=f'(3)$. In problem 13: `natural' means $S''(1)=0$, $S''(3)= 0$. \item The requirement $S(x)$, $S'(x)$ and $S''(x)$ be continuous at interior nodes $x_1, \cdots, x_{n-1}$ can be conveniently referred to as $S \in C^2([a,b])$, or $S$ is a $C^2$ spline. We showed in class how to count the number of these (continuity) conditions and conclude that there are 4 unknowns in each interval $[x_j, x_{j+1}]$, hence a cubic polynomial there and that two additional boundary conditions are required. Do the same for $C^1$ splines. Give the degree of the piecewise polynomial and number of additional boundary conditions.