Numerical Methods, Neville method of aproximation and Lagrange interpolation

201 Views Asked by At

So I have a set of points x = [0 2 7 8] and y = [3 0 15 7] respectively. I tried to approximate it using Neville Method and the formula $P_{i,j}=\frac {(x - x_j)P_{i, j - 1} + (x_i - x)P_{i + 1, j}}{x_i - x_j}$ for $0\leq i \leq j \leq 3$ and $P_{i, i} = f(x_i)$ for $i = 0, 1, 2, 3$, and I wanted to approximate it at the point $x = 5$ and got the approximation with Neville's $14.429$ and with Lagrange interpolation using formula:

$$P_n(x) = \sum_{i = 0}^n f(x_i) \prod_{k = 0, k \neq i}^{n}\frac {x - x_k}{x_i - x_k}$$

and got the approximation of $P_3(5) = -11.289$. Why they are so different?