Interpolation Comparison Back EN · ZH
Interpolation

Interpolation Methods Comparison

Compare Lagrange, Newton, cubic spline, PCHIP, and linear interpolation on the same chart. Experience Runge's phenomenon with high-degree polynomials.

Data Points & Settings
Presets
Data Points (max 10)
x y
Methods
Query x value

Lagrange Basis

$$L(x)=\sum_{i=0}^n y_i \prod_{j\neq i}\frac{x-x_j}{x_i-x_j}$$
Linear value
Lagrange value
Spline value
Condition no. (est.)
Interpolated values at query x = 0.5

Natural Cubic Spline

Piecewise cubic $S_i(x)$ on each interval $[x_i, x_{i+1}]$, continuity conditions:

$$S_i(x_{i+1})=S_{i+1}(x_{i+1}),\quad S_i'(x_{i+1})=S_{i+1}'(x_{i+1}),\quad S_i''(x_{i+1})=S_{i+1}''(x_{i+1})$$

Natural boundary: $S''(x_0)=S''(x_n)=0$

Runge's phenomenon: equally spaced high-degree polynomial interpolation ($n \geq 7$) produces large oscillations near the interval endpoints.

CAE Relevance: Spline fitting of stress-strain curves for FEM material models / LS-DYNA *DEFINE_CURVE / field quantity interpolation between mesh nodes / NURBS and B-spline geometry (rational extensions of spline interpolation). PCHIP is recommended for monotone material data.