当前位置:文档之家› 数值分析第四章数值积分与数值微分习题答案

数值分析第四章数值积分与数值微分习题答案

第四章 数值积分与数值微分1.确定下列求积公式中的特定参数,使其代数精度尽量高,并指明所构造出的求积公式所具有的代数精度:10121012112120(1)()()(0)();(2)()()(0)();(3)()[(1)2()3()]/3;(4)()[(0)()]/2[(0)()];hhhh hf x dx A f h A f A f h f x dx A f h A f A f h f x dx f f x f x f x dx h f f h ah f f h -----≈-++≈-++≈-++''≈++-⎰⎰⎰⎰解:求解求积公式的代数精度时,应根据代数精度的定义,即求积公式对于次数不超过m 的多项式均能准确地成立,但对于m+1次多项式就不准确成立,进行验证性求解。

(1)若101(1)()()(0)()hhf x dx A f h A f A f h --≈-++⎰令()1f x =,则1012h A A A -=++令()f x x =,则110A h A h -=-+令2()f x x =,则3221123h h A h A -=+ 从而解得011431313A h A h A h -⎧=⎪⎪⎪=⎨⎪⎪=⎪⎩令3()f x x =,则3()0hhhhf x dx x dx --==⎰⎰101()(0)()0A f h A f A f h --++=令4()f x x =,则4551012()52()(0)()3hhhhf x dx x dx h A f h A f A f h h ---==-++=⎰⎰故此时,101()()(0)()hhf x dx A f h A f A f h --≠-++⎰故101()()(0)()h hf x dx A f h A f A f h --≈-++⎰具有3次代数精度。

(2)若21012()()(0)()hhf x dx A f h A f A f h --≈-++⎰令()1f x =,则1014h A A A -=++令()f x x =,则110A h A h -=-+令2()f x x =,则32211163h h A h A -=+ 从而解得11438383A h A h A h -⎧=-⎪⎪⎪=⎨⎪⎪=⎪⎩令3()f x x =,则22322()0hhhhf x dx x dx --==⎰⎰101()(0)()0A f h A f A f h --++=令4()f x x =,则22452264()5hhhhf x dx x dx h --==⎰⎰510116()(0)()3A f h A f A f h h --++=故此时,21012()()(0)()hhf x dx A f h A f A f h --≠-++⎰因此,21012()()(0)()h hf x dx A f h A f A f h --≈-++⎰具有3次代数精度。

(3)若1121()[(1)2()3()]/3f x dx f f x f x -≈-++⎰令()1f x =,则1121()2[(1)2()3()]/3f x dx f f x f x -==-++⎰令()f x x =,则120123x x =-++令2()f x x =,则22122123x x =++从而解得120.28990.5266x x =-⎧⎨=⎩或120.68990.1266x x =⎧⎨=⎩ 令3()f x x =,则11311()0f x dx x dx --==⎰⎰12[(1)2()3()]/30f f x f x -++≠故1121()[(1)2()3()]/3f x dx f f x f x -=-++⎰不成立。

因此,原求积公式具有2次代数精度。

(4)若20()[(0)()]/2[(0)()]hf x dx h f f h ah f f h ''≈++-⎰令()1f x =,则(),hf x dx h =⎰2[(0)()]/2[(0)()]h f f h ah f f h h ''++-=令()f x x =,则20221()21[(0)()]/2[(0)()]2hh f x dx xdx h h f f h ah f f h h ==''++-=⎰⎰令2()f x x =,则2302321()31[(0)()]/2[(0)()]22hh f x dx x dx h h f f h ah f f h h ah ==''++-=-⎰⎰故有33211232112h h ah a =-=令3()f x x =,则340024441()41111[(0)()]/2[(0)()]12244hh f x dx x dx h h f f h h f f h h h h==''++-=-=⎰⎰令4()f x x =,则450025551()51111[(0)()]/2[(0)()]12236hh f x dx x dx h h f f h h f f h h h h==''++-=-=⎰⎰故此时,21()[(0)()]/2[(0)()],12hf x dx h f f h h f f h ''≠++-⎰因此,21()[(0)()]/2[(0)()]12hf x dx h f f h h f f h ''≈++-⎰具有3次代数精度。

2.分别用梯形公式和辛普森公式计算下列积分:12012101(1),8;4(1)(2),10;(3),4;(4),6;x xdx n x e dx n xn n ϕ-=+-===⎰⎰⎰解:21(1)8,0,1,,()84xn a b h f x x =====+ 复化梯形公式为781[()2()()]0.111402k k hT f a f x f b ==++=∑复化辛普森公式为7781012[()4()2()()]0.111576k k k k hS f a f x f x f b +===+++=∑∑121(1)(2)10,0,1,,()10x e n a b h f x x--===== 复化梯形公式为9101[()2()()] 1.391482k k hT f a f x f b ==++=∑复化辛普森公式为99101012[()4()2()()] 1.454716k k k k hS f a f x f x f b +===+++=∑∑(3)4,1,9,2,()n a b h f x =====复化梯形公式为341[()2()()]17.227742k k hT f a f x f b ==++=∑复化辛普森公式为3341012[()4()2()()]17.322226(4)6,0,,,()636k k k k hS f a f x f x f b n a b h f x ππ+===+++======∑∑复化梯形公式为561[()2()()] 1.035622k k hT f a f x f b ==++=∑复化辛普森公式为5561012[()4()2()()] 1.035776k k k k hS f a f x f x f b +===+++=∑∑3。

直接验证柯特斯教材公式(2。

4)具有5交代数精度。

证明:柯特斯公式为01234()[7()32()12()32()7()]90bab af x dx f x f x f x f x f x -=++++⎰令()1f x =,则01234()90[7()32()12()32()7()]90bab a f x dx b af x f x f x f x f x b a -=-++++=-⎰令()f x x =,则2222012341()()21[7()32()12()32()7()]()902bb a af x dx xdx b a b a f x f x f x f x f x b a ==--++++=-⎰⎰令2()f x x =,则23333012341()()31[7()32()12()32()7()]()903bb a af x dx x dx b a b a f x f x f x f x f x b a ==--++++=-⎰⎰令3()f x x =,则34444012341()()41[7()32()12()32()7()]()904bb a af x dx x dx b a b a f x f x f x f x f x b a ==--++++=-⎰⎰令4()f x x =,则45555012341()()51[7()32()12()32()7()]()905bb a af x dx x dx b a b a f x f x f x f x f x b a ==--++++=-⎰⎰令5()f x x =,则56666012341()()61[7()32()12()32()7()]()906bb a af x dx x dx b a b a f x f x f x f x f x b a ==--++++=-⎰⎰令6()f x x =,则012340()[7()32()12()32()7()]90hb af x dx f x f x f x f x f x -≠++++⎰因此,该柯特斯公式具有5次代数精度。

4。

用辛普森公式求积分1x e dx -⎰并估计误差。

解:辛普森公式为[()4()()]62b a a bS f a f f b -+=++ 此时,0,1,(),x a b f x e -===从而有1121(14)0.632336S e e --=++=误差为4(4)04()()()1802110.00035,(0,1)1802b a b a R f f e ηη--=-≤⨯⨯=∈5。

推导下列三种矩形求积公式:223()()()()();2()()()()();2()()()()();224ba ba baf f x dx b a f a b a f f x dx b a f b b a a b f f x dx b a f b a ηηη'=-+-'=---''+=-+-⎰⎰⎰证明:(1)()()()(),(,)f x f a f x a a b ηη'=+-∈两边同时在[,]a b 上积分,得()()()()()bbaaf x dx b a f a f x a dx η'=-+-⎰⎰即2()()()()()2(2)()()()(),(,)baf f x dx b a f a b a f x f b f b x a b ηηη'=-+-'=--∈⎰两边同时在[,]a b 上积分,得()()()()()bbaaf x dx b a f a f b x dx η'=---⎰⎰即22()()()()()2()(3)()()()()(),(,)22222baf f x dx b a f b b a a b a b a b f a b f x f f x x a b ηηη'=---''++++'=+-+-∈⎰两连边同时在[,]a b 上积分,得2()()()()()()()22222bb b aa a ab a b a b f a b f x dx b a f f x dx x dx η''++++'=-+-+-⎰⎰⎰ 即3()()()()();224b aa b f f x dx b a f b a η''+=-+-⎰6。

相关主题