牛顿插值法

退役前写的东西

\(F(x)\)\(n\)次项多项式

拉格朗日插值:\(f(x)=\sum\limits_{k=0}^n f(x_k)l_k(x)=\sum\limits_{k=0}^n f(x_k)\prod\limits_{i\neq k}^n \frac{x-x_i}{x_k-x_i}\)
因为很简单记忆,在OI中应用广泛

缺点:在增加或减少次项时需要重新全部计算

为实现在增加或减少次项时快速计算,我们构造:

\[f(x)=a_0+a_1(x-x_0)+a_2(x-x_0)(x-x_1)+\cdots a_n(x-x_0)\cdots(x-x_{n-1}) \]

这种形式的插值多项式称为牛顿插值多项式。记为\(N_n(x)\),需要满足\(N_n(x_i)=y_i\)

定义1:设函数\(f(x)\)在点\(x_0,x_1,\cdots\)的值为\(f(x_0),f(x_1),\cdots\)\(\frac{f(x_j)-f(x_i)}{x_j-x_i}(i\neq j)\)\(f(x)\)在点\(x_i,x_j\)处的一阶差商,记为\(f[x_i,x_j]\)一阶差商的差商\(\frac{f[x_j,x_k]-f[x_i,x_j]}{x_k-x_i}(i,j,k互异)\)\(f(x)\)\(x_i,x_j,x_k\)处的二阶差商,记为\(f[x_i,x_j,x_k]\)
一般地,称m-1阶差商的差商\(f[x_0,x_1,\cdots,x_m]=\frac{f[x_1,x_2,\cdots ,x_m]-f[x_0,x_1,\cdots ,x_{m-1}]}{x_m-x_0}\),为\(f(x)\)在点\(x_0,x_1,\cdots, x_m\)处的\(m\)阶差商。特别地,零阶差商\(f[x_i]=f(x_i)\)

性质1\(k\)阶差商\(f[x_0,x_1,\cdots ,x_k]\)是由\(f(x_0),f(x_1),\cdots ,f(x_k)\)线性组合成的。有\(f[x_0,x_1,\cdots,x_k]=\sum\limits_{i=0}^k \frac{f(x_i)}{(x_i-x_0)\cdots (x_j-x_{j-1})(x_j-x_{j+1})\cdots (x_j-x_k)}\)

证明:
靠归纳显然成立

性质2:差商具有对称性,即在\(k\)阶差商\(f[x_0,x_1,\cdots ,x_k]\)中任意调换\(2\)个节点\(x_i,x_j\)的顺序,其值不变。

证明:
根据结论1显然成立

性质3\(k\)阶差商\(f[x_0,x_1,\cdots ,x_k]\)\(k\)阶导数\(f^{(k)}(x)\)之间有如下关系:
\(f[x_0,x_1,\cdots ,x_k]=\frac{f^{(k)}(\delta)}{k!}(\delta \in (min\{x_0,x_1,\cdots,x_k\},max\{x_0,x_1,\cdots ,x_k\})\)

证明:
挖坑。下面用不到这条性质。

考虑一个一个添加项:
\(N_0(x_0)=f(x_0)\),可得
\(a_0=f(x_0)=f[x_0]\)
\(N_1(x_1)=f(x_1)\),可得
\(a_1=\frac{f(x_1)-f(x_0)}{x_1-x_0}=f[x_0,x_1]\)
\(N_n(x_2)=f(x_2)\),可得
\(\begin{aligned} a_2&=\frac{f(x_2)-f(x_0)-f[x_0,x_1](x_2-x_0)}{(x_2-_0)(x_2-x_1)}\\ &=\frac{\frac{f(x_2)-f(x_0)}{x_2-x_0}-f[x_0,x_1]}{x_2-x_1}\\ &=\frac{f[x_0,x_2]-f[x_0,x_1]}{x_2-x_1}\\ &=f[x_1,x_0,x_2]\\ &=f[x_0,x_1,x_2]\\ \end{aligned}\)
一般地,可以证明有\(a_k=f[x_0,x_1,\cdots ,x_k]\)

\(N_n(x_i)=f(x_i)(i=0,1,2,\cdots ,n)\)\(n\)次牛顿插值多项式为:
\(\begin{aligned}\\ N_n(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](x-x_0)(x-x_1)\cdots (x-x_{n-1})\\ \end{aligned}\)

另一种简单的证明方式
我们来证明\([y_1,\cdots,y_n](x_n-x_1)\cdots (x_n-x_{n-1})=y_n-P(x_n)\)\(P(x)\)是最高度为\(n-2\)的通过点\((x_1,y_1),\cdots,(x_{n-1},y_{n-1})\))。
若成立,容易得到牛顿多项式就为原多项式。

归纳法:
边界:\([y_1,y_2](x_2-x_1)=\frac{y_2-y_1}{x_2-x_1}(x_2-x_1)=y_2-y_1=y_2-P(x_2)\)\(P(x)=y_1\)
\(\begin{aligned} &[y_1,\cdots,y_{n+1}](x_{n+1}-x_1)\cdots (x_{n+1}-x_{n})\\ &=\frac{[y_2,\cdots,y_{n+1}]-[y_1,\cdots,y_n]}{x_{n+1}-x_1}(x_{n+1}-x_1)\cdots (x_{n+1}-x_{n})\\ &=([y_2,\cdots,y_{n+1}]-[y_1,\cdots,y_n])(x_{n+1}-x_2)\cdots (x_{n+1}-x_{n})\\ &=(y_{n+1}-Q(x_{n+1}))-[y_1,\cdots,y_n](x_{n+1}-x_2)\cdots (x_{n+1}-x_{n})\\ &=y_{n+1}-(Q(x_{n+1})+[y_1,\cdots,y_n](x_{n+1}-x_2)\cdots (x_{n+1}-x_{n}))\\ \end{aligned}\)
(其中\(Q(x)\)是最高度为\(n-2\)通过点\((x_2,y_2),\cdots,(x_n,y_n)\)
\(P(x)=Q(x)+[y_1,\cdots,y_n](x-x_2)\cdots(x-x_n)\),下面证明\(P(x)\)通过点\((x_1,y_1)\cdots(x_{n},y_n)\)且最高度为\(n-1\)。下面证明\(P(x)\)通过\((x_1,y_1)\),根据性质2剩下点也容易证明。
\(\begin{aligned} &Q(x_1)+[y_1,\cdots,y_n](x_1-x_2)\cdots(x_1-x_n)\\ &=Q(x_1)+[y_n,\cdots,y_1](x_1-x_n)\cdots(x_1-x_2)\\ &=Q(x_1)+y_1-Q(x_1)\\ &=y_1\\ \end{aligned}\)

posted @ 2022-01-11 18:14  Grice  阅读(1422)  评论(0编辑  收藏  举报