Newton polynomial interpolation, which formula for the coefficients in rigth?

150 Views Asked by At

I'm studying Newton Polynomial interpolation, and there are formulas for the coefficients $c_i$ in the expansion

$$P(x) = c_0 + c_1(x-x_0) + c_2 (x-x_0)(x-x_1)$$

On Wikipedia, the third coefficient is

$$\frac{\frac{f(x_2)-f(x_1)}{x_2-x_1}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_0}$$

On here, it is

$$\frac{\frac{f(x_2)-f(x_0)}{x_2-x_0}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_1}$$

which one is rigth?

2

There are 2 best solutions below

1
On

The following version $$c_2= \frac{\frac{f(x_2)-f(x_0)}{x_2-x_0}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_1}$$ is correct.

You may verify it by evaluating the polynomial at $$x=x_0, x=x_1, and, x=x_2.$$

0
On

$$\frac{\frac{f(x_2)-f(x_1)}{x_2-x_1}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_0}=\frac{\frac{f(x_2)-f(x_0)}{x_2-x_0}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_1}$$ Both are the same and if you want to check them,take random numbers to see that they give you same the value