题目
9.已知sin x在30°,45°,60°的值分别为(1)/(2),(sqrt(2))/(2),(sqrt(3))/(2),分别用一次插值和二次插值求sin 50^circ的近似值并估计其截断误差。
9.已知$\sin x$在30°,45°,60°的值分别为$\frac{1}{2}$,$\frac{\sqrt{2}}{2}$,$\frac{\sqrt{3}}{2}$,分别用一次插值和二次插值求$\sin 50^{\circ}$的近似值并估计其截断误差。
题目解答
答案
**一次插值:**
取 $x_0=45^\circ$,$x_1=60^\circ$,得
\[ L_1(50^\circ) = \frac{\sqrt{3}}{6} + \frac{\sqrt{2}}{3} \approx 0.7600, \]
误差
\[ |R_1| \leq 0.006595. \]
**二次插值:**
取 $x_0=30^\circ$,$x_1=45^\circ$,$x_2=60^\circ$,得
\[ L_2(50^\circ) \approx 0.7654, \]
误差
\[ |R_2| \leq 0.000022. \]
\[
\boxed{
\begin{array}{ll}
\text{一次插值:} & 0.7600, \quad |R_1| \le 0.006595 \\
\text{二次插值:} & 0.7654, \quad |R_2| \le 0.000022 \\
\end{array}
}
\]
解析
本题主要考查拉格朗日插值法以及插值误差估计的知识。解题思路是先根据给定的已知点,分别构建一次插值多项式和二次插值多项式,然后将待求点代入插值多项式得到近似值,最后根据插值误差估计公式计算截断误差。
一次插值
- 构建一次插值多项式
已知要取$x_0 = 45^{\circ}=\frac{\pi}{4}$,$x_1 = 60^{\circ}=\frac{\pi}{3}$,对应的函数值$y_0=\sin x_0=\frac{\sqrt{2}}{2}$,$y_1=\sin x_1=\frac{\sqrt{3}}{2}$。
一次拉格朗日插值多项式为$L_1(x)=l_0(x)y_0 + l_1(x)y_1$,其中$l_0(x)=\frac{x - x_1}{x_0 - x_1}$,$l_1(x)=\frac{x - x_0}{x_1 - x_0}$。
将$x_0=\frac{\pi}{4}$,$x_1=\frac{\pi}{3}$代入可得:
$l_0(x)=\frac{x-\frac{\pi}{3}}{\frac{\pi}{4}-\frac{\pi}{3}}=\frac{x - \frac{\pi}{3}}{-\frac{\pi}{12}}=\frac{12}{\pi}(\frac{\pi}{3}-x)$
$l_1(x)=\frac{x-\frac{\pi}{4}}{\frac{\pi}{3}-\frac{\pi}{4}}=\frac{x - \frac{\pi}{4}}{\frac{\pi}{12}}=\frac{12}{\pi}(x-\frac{\pi}{4})$
则$L_1(x)=\frac{12}{\pi}(\frac{\pi}{3}-x)\cdot\frac{\sqrt{2}}{2}+\frac{12}{\pi}(x - \frac{\pi}{4})\cdot\frac{\sqrt{3}}{2}$。 - 计算$\sin50^{\circ}$的近似值
将$x = 50^{\circ}=\frac{5\pi}{18}$代入$L_1(x)$:
$\begin{align*}L_1(\frac{5\pi}{18})&=\frac{12}{\pi}(\frac{\pi}{3}-\frac{5\pi}{18})\cdot\frac{\sqrt{2}}{2}+\frac{12}{\pi}(\frac{5\pi}{18}-\frac{\pi}{4})\cdot\frac{\sqrt{3}}{2}\\&=\frac{12}{\pi}\cdot\frac{\pi}{18}\cdot\frac{\sqrt{2}}{2}+\frac{12}{\pi}\cdot\frac{\pi}{36}\cdot\frac{\sqrt{3}}{2}\\&=\frac{\sqrt{2}}{3}+\frac{\sqrt{3}}{6}\\&\approx0.7600\end{align*}$ - 估计截断误差
一次插值的截断误差公式为$R_1(x)=\frac{f''(\xi)}{2!}(x - x_0)(x - x_1)$,其中$f(x)=\sin x$,$f''(x)=-\sin x$,$\xi\in(x_0,x_1)$。
$\vert R_1(x)\vert=\frac{\vert f''(\xi)\vert}{2}\vert(x - x_0)(x - x_1)\vert$,因为$\vert f''(\xi)\vert=\vert-\sin\xi\vert\leq1$,$x = \frac{5\pi}{18}$,$x_0=\frac{\pi}{4}$,$x_1=\frac{\pi}{3}$。
$\vert(x - x_0)(x - x_1)\vert=\vert\frac{5\pi}{18}-\frac{\pi}{4}\vert\vert\frac{5\pi}{18}-\frac{\pi}{3}\vert=\vert\frac{10\pi - 9\pi}{36}\vert\vert\frac{5\pi - 6\pi}{18}\vert=\frac{\pi}{36}\cdot\frac{\pi}{18}$
$\vert R_1\vert\leq\frac{1}{2}\cdot\frac{\pi}{36}\cdot\frac{\pi}{18}\approx0.006595$
二次插值
- 构建二次插值多项式
已知$x_0 = 30^{\circ}=\frac{\pi}{6}$,$x_1 = 45^{\circ}=\frac{\pi}{4}$,$x_2 = 60^{\circ}=\frac{\pi}{3}$,对应的函数值$y_0=\sin x_0=\frac{1}{2}$,$y_1=\sin x_1=\frac{\sqrt{2}}{2}$,$y_2=\sin x_2=\frac{\sqrt{3}}{2}$。
二次拉格朗日插值多项式为$L_2(x)=l_0(x)y_0 + l_1(x)y_1 + l_2(x)y_2$,其中$l_0(x)=\frac{(x - x_1)(x - x_2)}{(x_0 - x_1)(x_0 - x_2)}$,$l_1(x)=\frac{(x - x_0)(x - x_2)}{(x_1 - x_0)(x_1 - x_2)}$,$l_2(x)=\frac{(x - x_0)(x - x_1)}{(x_2 - x_0)(x_2 - x_1)}$。
经过计算(过程略)可得$L_2(x)$的表达式,将$x = 50^{\circ}=\frac{5\pi}{18}$代入$L_2(x)$可得$L_2(50^{\circ})\approx0.7654$。 - 估计截断误差
二次插值的截断误差公式为$R_2(x)=\frac{f'''(\xi)}{3!}(x - x_0)(x - x_1)(x - x_2)$,其中$f(x)=\sin x$,$f'''(x)=-\cos x$,$\xi\in(x_0,x_2)$。
$\vert R_2(x)\vert=\frac{\vert f'''(\xi)\vert}{6}\vert(x - x_0)(x - x_1)(x - x_2)\vert$,因为$\vert f'''(\xi)\vert=\vert-\cos\xi\vert\leq1$,经过计算可得$\vert R_2\vert\leq0.000022$。