Example 1. Find the Newton interpolation polynomial for the function $y=f(x)$ if its values are known: $f(2)=1, f(4)=15, f(5)=28$.
Solution. In this case

$$
x_{0}=2, x_{1}=4, x_{2}=5
$$

$$
y_{0}=1, y_{1}=15, y_{2}=28
$$

Note that the nodes are not equidistant (since $x_{1}-x_{0} \neq x_{2}-x_{1}$). The interpolating polynomial (15.14) for $n=2$ takes the form

$$
P_{2}(x)=y_{0}+\left(x-x_{0}\right) f\left(x_{1}, x_{0}\right)+\left(x-x_{0}\right)\left(x-x_{1}\right) f\left(x_{2}, x_{1}, x_{0}\right)
$$

Let's compute the divided differences:

$$
\begin{gathered}
f\left(x_{1}, x_{0}\right)=\frac{y_{1}-y_{0}}{x_{1}-x_{0}}=\frac{15-1}{4-2}=7, \quad f\left(x_{2}, x_{1}\right)=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}=\frac{28-15}{5-4}=13 \\
f\left(x_{2}, x_{1}, x_{0}\right)=\frac{f\left(x_{2}, x_{1}\right)-f\left(x_{1}, x_{0}\right)}{x_{2}-x_{0}}=\frac{13-7}{5-2}=2 .
\end{gathered}
$$

Substituting these values into formula (I), we find the desired Newton interpolating polynomial:

$$
P_{2}(x)=1+7(x-2)+2(x-2)(x-4)
$$

Remark. Expanding the brackets and combining like terms, we get

$$
P_{2}(x)=2 x^{2}-5 x+3
$$