Explain the entries in rows $5 \to 8$ in the cubic spline interpolation matrix.

44 Views Asked by At

In order to use the Cubic Spline Interpolation Method, we have to satisfy essentially $3$ conditions, which are:

  1. $f_i(x_i)=(1,x_i,x_i^2,x_i^3)c_i=f_i, f_i(x_{i+1})=(1,x_{i+1},x_{i+1}^2,x_{i+1}^3)c_i=f_{i+1}$
  2. $f'_{i-1}(x_i) = (0, 1, 2x_i,3x_i^2)c_{i-1}=f'_{i}(x_i), 1 \leq i < n-1$
  3. $f''_{i-1}(x_i) = (0, 0, 2,6x_i)c_{i-1}=f''_{i}(x_i), 1 \leq i < n-1$

We can describe these piecewise functions with the following system of equations matrix:

$$\begin{pmatrix}1&x_0&x_{0}^2&x_{0}^3&&&&&&\\ 1&x_1&x_{1}^2&x_{1}^3&&&&&&\\ 0&1&2x_1&3x_{1}^2&0&-1&-2x_1&-3x_{1}^2&&\\ 0&0&2&6x_1&0&0&-2&-6x_1&&\\ &&&&1&x_1&x_{1}^2&x_{1}^3&&\\ &&&&1&x_2&x_2^2&x_{2}^3&&\\ &&&&&&&&...&\\ &&&&&&&&&1&x_{n-2}&x_{n-2}^2&x_{n-2}^3\\ &&&&&&&&&1&x_{n-1}&x_{n-1}^2&x_{n-1}^3\end{pmatrix} \cdot \begin{pmatrix}c_0\\ c_1\\ c_2\\ ...\\ c_{n-2}\end{pmatrix}=\begin{pmatrix}f_0\\ f_1\\ 0\\ 0\\ f_1\\ f_2\\ ...\\ f_{n-2}\\ f_{n-1}\\ \end{pmatrix}$$

Rows $1$ and $2$ are for the interpolating points. Rows $3, 4$ are for the first derivatives, but I don't understand how columns $5,6,7,8$ are derived. What is the explanation behind including them in the matrix?

In the cubic Hermite interpolation method, we constructed a system of equations using only the function and its derivative. Therefore, if you were to interpolate between two points, you would need the function for those two points and there derivatives, which we could put in a similar system of equations matrix form, where the matrix is $4 \times 4$. That still made sense but when we incorporate that idea for cubic splines, I can't understand how columns $5 \to 8$ work.

1

There are 1 best solutions below

0
On

You have 4 rules: 1a, 1b, 2 and 3. Rows go like that:

  1. Rule 1a for $i=0$
  2. Rule 1b for $i=0$
  3. Rule 2 for $i=0$
  4. Rule 3 for $i=0$
  5. Rule 1a for $i=1$
  6. Rule 1b for $i=1$
  7. Rule 2 for $i=1$
  8. Rule 3 for $i=1$

...

X. Rule 1a for $i=n-2$

Y. Rule 1b for $i=n-2$