数值计算 --- 三次样条函数插值(Cubic spline function interpolation)_三次样条插值_松下J27的博客-CSDN博客
[Mathematics] A spline is a special function defined piecewise by polynomials.
Instead of fitting a single, high-degree polynomial to all of the values at once, spline interpolation fits low-degree polynomials, to small subsets of the values.
<aside> 💡 Originally, spline was a term for elastic rulers 橡皮尺that were bent to pass through a number of predefined points, or knots.
</aside>
A sequence of $n+1$ predefind knots: ${(x_i,y_i)}$
A cubic or higer ploynomial $y=q_i(x),x\in(x_{i-1},x_{i}),y\in(y_{i-1},y_i)$, so there will be $n$ polynomials
.{Otherwise, you vanish one or both of $y',y''$}
The curvature 曲率 of any curve $y=y(x)$ is defined as
$$ \kappa=\frac{y^{\prime\prime}}{(1+y^{\prime2})^{3/2}}, $$
To make the spline take a shape that minimizes the bending, we will defined both $y',y''$ to be continuous everywhere, including at the knots.
$$ \left\{\begin{array}{l}q_i(x_i)=q_{i+1}(x_i)=y_i\\q_i^{\prime}(x_i)=q_{i+1}^{\prime}(x_i)\\q_i^{\prime\prime}(x_i)=q_{i+1}^{\prime\prime}(x_i)\end{array}\right.\quad1\leq i\leq n-1. $$
We got $2\times n+ 2\times(n-1)$ equations, but we need $2\times n+ 2\times n$ equations to determine cubic and square term of plynoial{linear and constant term is determined by Lagrange interpolation.$q_j(x)=a+bx+cx^2+dx^3=Ay_j+By_{j+1}+Cy_j''+Dy_{j+1}''$}.
分段插值
一阶导数处处光滑,二阶导数连续