【数值分析】第2章-插值

第2章-插值

插值多项式的存在唯一性:对于\((x_i, y_i), i = 0..n\),次数不大于n的插值多项式是唯一的。

2.1 拉格朗日插值

Lagrange多项式

条件:无重合节点,即$ i \ne j, x_i \ne x_j $

\[L_n(x) = \sum_{i=0}^n l_i(x)y_i \]

\[其中\\ l_i(x) = \prod_{j \ne i, j =0}^{n} \frac{(x-x_j)}{(x_i-x_j)} \]

插值余项 \(R_n\)(截断误差)

\[R_n(x) = f(x)-L_n(x) \]

定理:设\(f^{(n)}(x)\)\([a,b]\)上连续,\(f^{(n+1)}(x)\)\((a,b)\)内存在,节点$ a \le x_0 < x_1 < \dots < x_n \le b$ ,则对于任何\(x \in [a,b]\),有:

\[R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}\omega_{n+1}(x) \]

这里 $ \xi \in (a,b) $,且依赖于 \(x\),$\omega_{n+1}(x) = \prod_{i=0}^n (x-x_i) $。

我怀疑这个定理是针对Lagrange多项式而言的

一个重要结论

\[\sum_{j=0}^n x_j^kl_j(x)\equiv x^k, k=0,1,\dots,n \]

参考链接:数值分析例题分析(一)的例题三

2.2 牛顿插值

Newton多项式

\[N_n(x) = \sum_{i=0}^n c_i \phi_i(x) \]

\[其中 \\ \phi_0(x) = 1, \phi_{i}(x) = (x-x_{i-1})\phi_{i-1}(x) \]

\[c_0 = f(x_0), c_i = f[x_0, x_1,\dots, x_i] (称为差商) \]

差商表

\(x_i\) \(f(x_i)\) 一阶差商 二阶差商 三阶差商
\(x_0\) \(f(x_0)\)
\(x_1\) \(f(x_1)\) \(f[x_0, x_1]\)
\(x_2\) \(f(x_2)\) \(f[x_1, x_2]\) \(f[x_0, x_1, x_2]\)
\(x_3\) \(f(x_3)\) \(f[x_2, x_3]\) \(f[x_1, x_2, x_3]\) \(f[x_0, x_1, x_2, x_3]\)
... ... ... ... ...

$f[x_0, x_1] = \frac{f(x_0)-f(x_1)}{x_0 - x_1} $

$f[x_0, x_1, x_2] = \frac{f[x_0, x_1]-f[x_1, x_2]}{x_0 - x_2} $

$f[x_0, x_1, x_2, x_3] = \frac{f[x_0, x_1, x_2]-f[x_1, x_2, x_3]}{x_0 - x_3} $

Newton插值的插值余项

\[R_n(x) = f[x,x_0,\dots , x_n]\omega_{n+1}(x) \]

由唯一性可知$N_n(x) \equiv L_n(x) $,故插值余项也相同,即

\[R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}\omega_{n+1}(x) \]

2.3 埃尔米特插值

就是知道y的同时还知道y'(或者更高次导数)的插值

两点三次Hermite插值

参考链接数值分析(4)-多项式插值: 埃尔米塔插值法

已知:

\(x\) \(x_0\) \(x_1\)
\(f(x)\) \(y_0\) \(y_1\)
\(f'(x)\) \(y'_0\) \(y'_1\)

可用\(H_3(x)\)作为插值函数,满足:

\[H_3(x_i) = y_i, H'_3(x_i) = y'_i(i=0,1) \]

直接设\(H_3(x) = ax^3+bx^2+cx+d\)算起来太复杂;

引入四个基函数:

\[\alpha_0(x), \alpha_1(x), \beta_0(x), \beta_1(x) \]

使得

\(\alpha_0(x_0)=1\) \(\alpha_1(x_0) = 0\) \(\beta_0(x_0) = 0\) \(\beta_1(x_0)= 0\)
\(\alpha_0(x_1)=0\) \(\alpha_1(x_1) = 1\) \(\beta_0(x_1) = 0\) \(\beta_1(x_1)= 0\)
\(\alpha'_0(x_0)=0\) \(\alpha'_1(x_0) = 0\) \(\beta'_0(x_0) = 1\) \(\beta'_1(x_0)= 0\)
\(\alpha'_0(x_1)=0\) \(\alpha'_1(x_1) = 0\) \(\beta'_0(x_1) = 0\) \(\beta'_1(x_1)= 1\)

参考视频Hermite插值

先看第三列:

\(x_1\) 处函数、导数值都为0,故一定含有项 \((x-x_1)^2\)\(x_0\)处函数值为0,导数值不为0,故含有项 \((x-x_0)\) ;函数总共就3次,此时已经满足3次了。所以

\[\beta_0(x) = C_{\beta_0}(x-x_0)(x-x_1)^2 \]

C为常数;

同理,看第四列,有

\[\beta_1(x) = C_{\beta_1}(x-x_0)^2(x-x_1) \]

再看第一列:

\(x_1\) 处函数、导数值都为0,故一定含有项 \((x-x_1)^2\) ,剩下的项比较难判断,但已知函数是3次的,还差一次,所以直接设剩下的一项为 \((ax-b)\) ,然后利用待定系数法求出\(a,b\)

第二列也是同理。

最后上结果:

\[\alpha_0(x) = (1-2\frac{x-x_0}{x_0-x_1})(\frac{x-x_1}{x_0-x_1})^2 \]

\[\alpha_1(x) = (1-2\frac{x-x_1}{x_1-x_0})(\frac{x-x_0}{x_1-x_0})^2 \]

\[\beta_0(x) = (x-x_0)(\frac{x-x_1}{x_0-x_1})^2 \]

\[\beta_1(x) = (x-x_1)(\frac{x-x_0}{x_1-x_0})^2 \]

2.4 分段低次插值

参考视频
分段低次多项式插值

posted @ 2023-10-31 22:53  码鸽  阅读(68)  评论(0编辑  收藏  举报