0

Let $x_k, y_k \in \Bbb R, \ x_k = kh, \ k = 0, 1, 2$ and $h \in (0,1)$. I want to build an interpolation polynomial $p \in P_2$ (so a polynomial of degree $2$) with the help of the Newton base. Following the formula, I receive

$$p(x) = y_0 + {{y_1 - y_0} \over h}(x-x_0) + {{2y_1 - y_0 - y_2} \over 2h^2}(x-x_0)(x-x_1).$$

Although we have $p(x_0) = y_0$, we don't have $p(x_1) = y_1$ and $p(x_2) = y_2$, and I just don't see where I am mistaken here. It should be a simple calculation actually. Can anybody help me out?

Julian
  • 1,401

1 Answers1

3

You got the coefficient of $(x-x_0)(x-x_1)$ wrong. It should be $$\frac{\frac{y_2-y_1}{x_2-x_1}-\frac{y_1-y_0}{x_1-x_0}}{x_2-x_0}=\frac{y_0+y_2-2y_1}{2h^2}.$$