Deriving a tridiagonal system for cubic spline interpolation

635 Views Asked by At

enter image description here

Can anyone explain how $B_{i-1} = 1/4$ and $B_{i+1} = 1/4$ were chosen in line 6 of the picture, just above the matrix?

I'm trying to understand cubic splines but this result seems like it came out of nowhere.

1

There are 1 best solutions below

0
On BEST ANSWER

For equally spaced nodes, the cubic splines consist of sums of several copies of translated and scaled copies of the cardinal spline $$ B(t) = \begin{cases} 1 - \frac34 t^2(2-|t|), \qquad & |t|\le 1 \\ {(2-|t|)^3}/{4} ,\qquad & 1\le |t|\le 2 \\ 0 \qquad & \text{otherwise} \end{cases} $$ The cardinal spline is designed to have value $1$ at $0$, to be zero outside of $[-2,2]$, and to be $C^2$ smooth as a cubic spline ought to be. These properties determine it uniquely.

Observe that in addition to $B(0)=1$, we have nonzero values at neighboring integers: $B(\pm 1) = 1/4$. This is where $1/4$ in that formula comes from: evaluating a basis spline at a node that neighbors its maximum. $$B_{i-1}(x_i) = B_{i+1}(x_i)=\frac14$$