Math — Lagrange Interpolation
Fitting a polynomial through given points.
Rendering…
Make it your own.
P(x) = \sum_i y_i\,\ell_i(x)
\ell_i(x) = \prod_{j\neq i}\frac{x - x_j}{x_i - x_j}
n+1 \text{ points} \Rightarrow \text{degree } \leq n
P(x_i) = y_i