输入点 −2,−1,0,1,2 等距,对应函数值为
2,1,2,−1,10.
差分为
Δ:−1,1,−3,11,
Δ2:2,−4,14,
Δ3:−6,18,
Δ4:24.
四阶差分非零,因此次数不可能低于 4。取
f(x)=x4+x3−3x2−2x+2.
代入验证:
f(−2)=2,f(−1)=1,f(0)=2,f(1)=−1,f(2)=10.
所以所求多项式为
x4+x3−3x2−2x+2.
英文解析
For equally spaced inputs −2,−1,0,1,2, the values are
2,1,2,−1,10.
Their finite differences are
Δ:−1,1,−3,11,
Δ2:2,−4,14,
Δ3:−6,18,
Δ4:24.
The fourth difference is nonzero, so no polynomial of degree at most 3 can fit all five points. The candidate
f(x)=x4+x3−3x2−2x+2
has degree 4. Direct substitution gives
f(−2)=2,f(−1)=1,f(0)=2,f(1)=−1,f(2)=10.
Hence the required polynomial is
x4+x3−3x2−2x+2.