%% Generalization of 19. \item Instead of the 'natural' and 'clamped' boundary conditions, the matlab built-in 'spline' function enforces the so-called 'not-a-knot' boundary condition by requiring $S'''(x)$ to be continuous across $x_1$ and $x_{n-1}$ (although you could impose the clamped boundary condition as well. See 'help spline' for details). Show that this is equivalent to assigning one cubic polynomial on each of the intervals $[x_0, x_2], [x_2, x_3], [x_3, x_4], \cdots, [x_{n-4}, x_{n-3}], [x_{n-3}, x_{n-2}], [x_{n-2}, x_{n}]$, with the usual continuity conditions across the 'knots' $x_2, x_3, \cdots, x_{n-2}$ and two extra conditions $S(x_1)= f(x_1)$, $S(x_{n-1})= f(x_{n-1})$. In this sense, neither $x_1$ nor $x_{n-1}$ is a knot, hence the name. \item Interpolate the function $f(x) = {1 \over 1+x^2}$ on $[-5,5]$ with equally spaced nodes \\ $-5, -4.5, -4, \cdots, 4.5, 5$ using matlab built-in spline, the Lagrange polynomials and Hermite polynomials, respectively. Plot the interpolated polynomials on $-5:0.05:5$. Hand in your source code by Sun, Nov 28 via email to the homework account. Put all your codes in a single file and name it as na10f\_hw10\_your-id-number.m. Execute this file again before handing in. Sample files will be provided on the course homepage to explain how to plot more than one figures at the same time. % \item Hermite polynomial % Section 3.4: Problems 25. \item % Section 4.1: Problems 7(a), 19, 22, 24, 28, 29. Section 4.1 is put in homework 11. %% \item %% In continuation of problems 24 and 19 in section 4.1, % Use the sample file. % What you will observe is known as Runge's phenomenum. % This is the reason to use piecewise polymomial interpolaton, % instead of a high order polynomial interpolation. \end{enumerate} \end{document}