Lagrangeinterpolated
Lagrange interpolation is a method for constructing a polynomial that passes through a given set of distinct points. Given n+1 data points (x_0, y_0), (x_1, y_1), ..., (x_n, y_n), the Lagrange interpolating polynomial is the unique polynomial of degree at most n that passes through all these points. The formula for the Lagrange interpolating polynomial P(x) is given by:
P(x) = sum_{j=0}^{n} y_j * L_j(x)
where L_j(x) are the Lagrange basis polynomials. Each basis polynomial L_j(x) is defined as:
L_j(x) = product_{i=0, i!=j}^{n} (x - x_i) / (x_j - x_i)
The key property of the Lagrange basis polynomials is that L_j(x_k) equals 1 if j=k and 0