Solution (source code)

= Solution

The successive <divided differences> for nodes $-1,0,1,3$ are
$$
\begin{array}{c|r|r|r|r}
x&f[x]&f[x,x_{\rm next}]&f[x,x_{\rm next},x_{\rm next\ next}]&f[-1,0,1,3]\\\hline
-1&-7&4&-2&1\\
0&-3&0&2&\\
1&-3&6&&\\
3&9&&&
\end{array}
$$
Thus the <Newton interpolation polynomial> is
$$
\boxed{p(x)=-7+4(x+1)-2(x+1)x+(x+1)x(x-1).}
$$
Expanding the products gives the power form
$$
\boxed{p(x)=x^3-2x^2+x-3.}
$$
The four values verify the data. Uniqueness follows because the difference of two degree-at-most-three interpolants would have four distinct roots.