数值分析简明教程课后习题答案

f(4)(?)R3(x)?(x?1)(x?1)(x?3)(x?4)?(x?1)(x?1)(x?3)(x?4)

4!)的近3、(p.55,题13)依据下列数据表,试用线性插值和抛物线插值分别计算sin(0.3367似值并估计误差。

i xi sin(xi)

0 0.32 0.314567 1 0.34 0.333487 2 0.36 0.352274 f(4)(?)3【解】依题意,n?3,拉格朗日余项公式为 R3(x)?(x?xi) ?4!i?0(1) 线性插值

因为x?0.3367在节点x0和x1之间,先估计误差

R1(x)?max(x?x0)(x1?x)f''(?)sin(?)(x?x0)(x?x1)?(x?x0)(x1?x)? 2!220.0121???104;须保留到小数点后4为,计算过程多余两位。

22y(x1-x0)2/4y=(x-x0)(x-x1)0P1(x) ?P1(x) ?

x0x1x

x?x0x?x11?(x?x0)sin(x1)?(x1?x)sin(x0)? sin(x0)?sin(x1)?x0?x1x1?x0x1?x01?(0.3367?0.32)sin(0.34)?(0.34?0.3367)sin(0.32)? 0.021?0.0167?sin(0.34)?0.0033?sin(0.32)? ?0.02?0.3304

(2) 抛物线插值 插值误差:

?R2(x)

f'''(?)?cos(?)(x?x0)(x?x1)(x?x2)?(x?x0)(x1?x)(x?x2) 3!6max(x?x0)(x1?x)(x2?x)3?0.0131????10?6

662yy=(x-x0)(x-x1)(x-x2)Max=3(x1-x0)3/80抛物线插值公式为:

x0x1x2x

P2(x)

?(x?x0)(x?x2)(x?x1)(x?x0)(x?x1)(x?x2)sin(x0)?sin(x1)?sin(x2)

(x0?x1)(x0?x2)(x1?x0)(x1?x2)(x2?x1)(x2?x0)?(x1?x)(x?x0)1?(x1?x)(x2?x)?sin(x)?(x?x)(x?x)sin(x)?sin(x)00212?220.022???P2(0.3367)

10?5?3.8445?sin(0.32)?38.911?sin(0.34)?2.7555?sin(0.36)? ?0.02210?5?3.8445?sin(0.32)?38.911?sin(0.34)?2.7555?sin(0.36)? ?0.33037439? ?20.02经四舍五入后得:P2(0.3367,与sin(0.3367)?0.330374191?精确值相比)?0.330374较,在插值误差范围内完全吻合!

1.3分段插值与样条函数

?x3?x21、(p.56,习题33)设分段多项式 S(x)??322x?bx?cx?1?是以0,1,2为节点的三次样条函数,试确定系数b,c的值.

【解】依题意,要求S(x)在x=1节点

0?x?1

1?x?2

S?(1)?13?12?2?13?b?12?c?1?1?S?(1),

即:b?c?1(1)

''一阶导数连续: S?(1)?3?12?2?1?6?12?2?b?1?c?S?(1),

即:2b?c??1(2) 解方程组(1)和(2),得b??2,c?3,即

函数值连续:

导数亦连续。

?x3?x20?x?1 S(x)??321?x?2?2x?2x?3x?1''''由于S?所以S(x) 在x=1节点的二阶(1)?3?2?1?2?6

>>閻忕偞娲栫槐鎴﹀礂閵婏附鐎�<<
12@gma联系客服:779662525#qq.com(#替换为@)