牛顿插值多项式 (3)

连结:牛顿插值多项式(2)

在〈牛顿插值多项式(2)〉中,我们讨论了牛顿插值多项式形式的意义。接下来,我们想要介绍数值分析中对于牛顿插值多项式中各项係数的运算规则和简便求法。基本上,它的思路和〈牛顿插值多项式(2)〉中所谈论的想法一致,只是我们透过符号的辅助,帮助掌握其中所涉及的规律。我们的问题为

给定 \(n+1\) 个资料点 \(({x_0},f({x_0})),({x_1},f({x_1})),({x_2},f({x_2})), \cdots ,({x_n},f({x_n}))\),
求满足这 \(n+1\) 个资料点的 \(n\) 次多项式 \(f(x)\)。

首先,从满足两个点 \(({x_0},f({x_0})),({x_1},f({x_1}))\) 的一次多项式 \(f_1(x)\) 讨论起。

假设 \({f_1}(x) = f({x_0}) + {b_1}(x – {x_0})\)

那幺,\({f_1}({x_1}) = f({x_1}) = f({x_0}) + {b_0}({x_1} – {x_0}) \Rightarrow {b_1} = \frac{{f({x_1}) – f({x_0})}}{{{x_1} – {x_0}}}\)。

因此 \({f_1}(x) = f({x_0}) + \frac{{f({x_1}) – f({x_0})}}{{{x_1} – {x_0}}}(x – {x_0})\)

接着,考虑满足三个点 \(({x_0},f({x_0})),({x_1},f({x_1})),({x_2},f({x_2}))\) 的二次多项式 \(f_2(x)\)。

承上面的结果,可以假设

\(\begin{array}{ll}{f_2}(x) &= {f_1}(x) + {b_2}(x – {x_0})(x – {x_1}) \\&= f({x_0}) + \frac{{f({x_1}) – f({x_0})}}{{{x_1} – {x_0}}}(x – {x_0}) + {b_2}(x – {x_0})(x – {x_1})\end{array}\)

那幺,

\(f({x_2}) = {x_0} + \frac{{f({x_1}) – f({x_0})}}{{{x_1} – {x_0}}}({x_2} – {x_0}) + {b_2}({x_2} – {x_0})({x_2} – {x_1})\)

\(\begin{array}{ll}\displaystyle \Rightarrow {b_2} &=\displaystyle\frac{{f({x_2}) – f({x_0}) – \frac{{f({x_1}) – f({x_0})}}{{{x_1} – {x_0}}}({x_2} – {x_0})}}{{({x_2} – {x_0})({x_2} – {x_1})}} \\\displaystyle &=\displaystyle\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}}}\end{array}\)

因此,

\(\displaystyle \begin{multline*}{f_2}(x) = f({x_0}) + \frac{{f({x_1}) – f({x_0})}}{{{x_1} – {x_0}}}(x – {x_0}) \\+ \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}}}(x – {x_0})(x – {x_1})\end{multline*}\)

到这裏,是否觉得各项係数看来有「迹」可寻!都是两项相减后再相除的比值。因此,数学家就引进「均差」的概念和符号加以定义:

一阶均差:\(f[{x_i},{x_j}] = \frac{{f({x_i}) – f({x_j})}}{{{x_i} – {x_j}}}\),\(i \ne j\)。

二阶均差:一阶均差的均差,因此

 \(\begin{array}{ll} f[{x_i},{x_j},{x_k}] &=\displaystyle \frac{{f[{x_i},{x_j}] – f[{x_j},{x_k}]}}{{{x_i} – {x_k}}},~i\ne j\ne k \\&=\displaystyle \frac{{\frac{{f({x_i}) – f({x_j})}}{{{x_i} – {x_j}}} – \frac{{f({x_j}) – f({x_k})}}{{{x_j} – {x_k}}}}}{{{x_i} – {x_k}}}\end{array}\)

类推下去,\(n\) 阶均差:\(n-1\) 阶均差的均差,因此

\(f[{x_0},{x_1}, \cdots ,{x_n}] =\displaystyle \frac{{f[{x_0},{x_1}, \cdots ,{x_{n – 1}}] – f[{x_1},{x_2}, \cdots ,{x_n}]}}{{{x_0} – {x_n}}}\)

所以,\({b_1} = \frac{{f({x_1}) – f({x_0})}}{{{x_1} – {x_0}}} = f[{x_1},{x_0}] = f[{x_0},{x_1}]\),

\({b_2} =\displaystyle\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}}} = f[{x_2},{x_1},{x_0}] = f[{x_0},{x_1},{x_2}]\)

则 \(f_2(x)\) 可以表示如下

\({f_2}(x) = f({x_0}) + f[{x_0},{x_1}](x – {x_0}) + f[{x_0},{x_1},{x_2}](x – {x_0})(x – {x_1})\)

进一步,也能写出满足 \(n+1\) 个资料点的 \(n\) 次牛顿插值多项式

\(\begin{array}{cl}f(x) &=f({x_0}) + f[{x_0},{x_1}](x – {x_0}) + f[{x_0},{x_1},{x_2}](x – {x_0})(x – {x_1}) +\cdots\\&+ f[{x_0},{x_1}, \cdots ,{x_{n – 2}},{x_{n – 1}}](x – {x_0})(x – {x_1})\cdots (x – {x_{n – 2}})(x – {x_{n – 1}})\\&+f[{x_0},{x_1}, \cdots ,{x_{n – 1}},{x_n}](x – {x_0})(x – {x_1}) \cdots (x – {x_{n – 1}})(x – {x_n})\end{array}\)

换句话说,只要求出各阶均差,就能轻鬆地写出任何阶数符合要求的牛顿插值多项式。下图清楚表明各阶均差的关係,也可以当成计算辅助之用:

牛顿插值多项式 (3)

实际演练一下,更能掌握箇中规律,请看下面问题

求过 \((-1,-2),(1,6),(2,7)\) 及 \((4,93)\) 四点的三次多项式。

将上述资料表列计算如下图:

牛顿插值多项式 (3)

因此,所求三次多项式为

\(f(x) =- 2 + 4(x + 1) – (x + 1)(x – 1) + 3(x – 1)(x + 1)(x – 2)\)

看完真正「完全版」的牛顿插值多项式,相信对于它的评价应该「改观」不少吧!至少,当我们的资料点数增加时,牛顿插值多项式只要继续添加更高次的单项,而拉格朗日插值多项式可是需要整个打掉重练才行呢!