Cubic splines
- Given $n+1$ data points $\left(x_i, f_i\right)$ such that: $x_i<x_{i+1}$
- We want a function $y(x)$ such that this function $f(x)$ interpolates continuously (up to and including the second derivative) using cubic equations in the interval $\left[x_0, x_n\right]$.
- $y(x)=y_i(x)=a_i+b_i\left(x-x_i\right)+c_i\left(x-x_i\right)^2+d_i\left(x-x_i\right)^3$ als $x$ in $\left[x_i, x_{i+1}\right]$
- $y_i\left(x_i\right)=f_i \Leftrightarrow a_i=f_i$
- $y_i\left(x_{i+1}\right)=y_{i+1}\left(x_{i+1}\right) \Leftrightarrow a_i+b_i\left(x_{i+1}-x_i\right)+c_i\left(x_{i+1}-x_i\right)^2+d_i\left(x_{i+1}-x_i\right)^3=a_{i+1}$
- $y_i^{\prime}\left(x_{i+1}\right)=y_{i+1}^{\prime}\left(x_{i+1}\right) \Leftrightarrow b_i+2 c_i\left(x_{i+1}-x_i\right)+3 d_i\left(x_{i+1}-x_i\right)^2=b_{i+1}$
- $y^{\prime \prime} i\left(x_{i+1}\right)=y^{\prime \prime} i+1\left(x_{i+1}\right) \Leftrightarrow c_i+3 d_i\left(x_{i+1}-x_i\right)=c_{i+1}$
My question:
- is about the "end points" of each interval. It states that the end point is the begin point of the next spline. However, what about the last spline (which doesn't have a next spline)? Isn't there something missing in the 3rd point of the steps? Some edge case statement about the end point of the last spline?