当前位置:文档之家› 数值分析答案第四章

数值分析答案第四章



f (x) = x ,则
0 = −1 + 2 x1 + 3 x2
令 f ( x ) = x 2 ,则
2 2 = 1 + 2 x12 + 3 x2
从而解得
⎧ x1 = −0.2899 ⎧ x1 = 0.6899 或⎨ ⎨ ⎩ x2 = 0.5266 ⎩ x2 = 0.1266
令 f ( x ) = x 3 ,则

1
−1
f ( x)dx = ∫ x3 dx = 0
−1
1
[ f ( −1) + 2 f ( x1 ) + 3 f ( x2 )] / 3 ≠ 0


1
−1
f ( x)dx = [ f (− 1) + 2 f ( x1 ) + 3 f ( x2 )] / 3不成立。
h
因此,原求积公式具有 2 次代数精度。 (4)若
7 h T8 = [ f ( a) + 2∑ f ( xk ) + f ( b)] = 0.11140 2 k =1
复化辛普森公式为
7 7 h S8 = [ f ( a) + 4∑ f ( x 1 ) + 2∑ f ( xk ) + f ( b)] = 0.11157 k+ 6 k=0 k =1 2 1
令 f ( x ) = x 2 ,则
b 1 3 3 2 f ( x ) dx = ∫a ∫a x dx = 3 (b − a ) b −a 1 3 3 [7 f ( x0 ) + 32 f ( x1 ) + 12 f ( x2 )+ 32 f ( x (b − a ) 3 )+ 7 f ( x 4 )]= 90 3 b
(3) n = 4, a = 1, b = 9, h = 2, f ( x ) =
复化梯形公式为
x,
3 h T4 = [ f (a ) + 2∑ f ( x k ) + f (b )] = 17.22774 2 k =1
复化辛普森公式为
3 3 h S4 = [ f ( a) + 4∑ f ( x 1 ) + 2∑ f ( xk ) + f ( b)] = 17.32222 k+ 6 k =0 k =1 2

h
−h
f ( x)dx ≈ A−1 f (− h) + A0 f (0) + A 1 f ( h)
令 f ( x ) = 1 ,则
2 h = A−1 + A0 + A 1
令 f ( x ) = x ,则
0 = − A− 1h + A1h
令 f ( x ) = x 2 ,则
2 3 h = h 2 A−1 + h 2 A1 3

b
令 f ( x ) = x 5 ,则
b 1 f ( x )dx = ∫ x 5 dx = (b6 − a6 ) a a 6 b −a 1 6 6 [7 f ( x0 ) + 32 f ( x1 ) + 12 f ( x2 ) + 32 f ( x3 ) + 7 f ( x4 )]= (b − a ) 90 6 b
f ( x)dx = ∫ xdx =
0

h
0
1 2 h 2 1 2 h 2
h[ f (0) + f (h )] / 2 + ah2 [ f ′(0) − f ′( h)] =
令 f ( x ) = x 2 ,则
h h 1 f ( x)dx = ∫ x2 dx = h3 0 3

0
h[ f (0) + f (h )] / 2 + ah2 [ f ′(0) − f ′( h)] =

a
b −a [7 f ( x0 ) + 32 f ( x1 ) + 12 f ( x2 ) + 32 f ( x3 ) + 7 f ( x4 )]= b− a 90
令 f ( x ) = x ,则
b 1 2 2 f ( x ) dx = ∫a ∫a xdx = 2 (b − a ) b −a 1 2 [7 f ( x0 ) + 32 f ( x1 ) + 12 f ( x2 )+ 32 f ( x (b − a2 ) 3 )+ 7 f ( x 4 )]= 90 2 b

令 f ( x ) = x 4 ,则
h 1 5 4 f ( x ) dx = x dx = h ∫ 0 0 5 1 1 1 1 h[ f (0) + f (h )] / 2 + h 2 [ f ′ (0) − f ′ (h )] = h5 − h5 = h5 12 2 3 6 h

故此时,
h

0
f ( x)dx ≠ h[ f (0) + f ( h)] / 2 +
2h
−2 h
f ( x)dx = ∫
2h
−2 h
x4 dx =
64 5 h 5 16 5 h 3
A−1 f ( −h) + A0 f (0) + A1 f ( h) =
故此时,
2h
∫ ∫
−2 h
f ( x)dx ≠ A−1 f ( −h) + A0 f (0) + A 1 f ( h)
因此,
2h −2 h

f (x) = x ,则
0 = − A− 1h + A1h
令 f ( x ) = x 2 ,则
16 3 h = h 2 A−1 + h 2 A1 3
从而解得
4 ⎧ ⎪ A0 = − 3 h ⎪ 8 ⎪ ⎨ A1 = h 3 ⎪ ⎪ 8 ⎪ A−1 = 3 h ⎩
令 f ( x ) = x 3 ,则
(3) ∫−1 f ( x)dx ≈ [ f ( −1) + 2 f ( x1 ) + 3 f ( x2 )] / 3; (4) ∫ f ( x)dx ≈ h[ f (0) + f ( h)] / 2 + ah2 [ f ′(0) − f ′( h)];
0
h
解: 求解求积公式的代数精度时,应根据代数精度的定义,即求积公式对于次数不超过 m 的多 项式均能准确地成立,但对于 m+1 次多项式就不准确成立,进行验证性求解。 (1)若 (1)
第四章 数值积分与数值微分 1.确定下列求积公式中的特定参数,使其代数精度尽量高,并指明所构造出的求积公式所具 有的代数精度:
(1) ∫ f ( x)dx ≈ A−1 f (− h) + A0 f (0) + A 1 f ( h);
−h
h
(2) ∫
2h
−2 h 1
f ( x)dx ≈ A−1 f ( −h) + A0 f (0) + A 1 f ( h);

0
f ( x)dx ≈ h[ f (0) + f ( h)] / 2 + ah2 [ f ′(0) − f ′( h)]
令 f ( x ) = 1 ,则

h
0
f ( x)dx = h,
h[ f (0) + f (h )] / 2 + ah2 [ f ′(0) − f ′( h)] = h

h
f (x) = x ,则

2h
−2 h
f ( x)dx = ∫
2h
−2 h
x3 dx = 0
A−1 f ( −h) + A0 f (0) + A1 f ( h) = 0


2h
−2 h
成立。 f ( x)dx = A−1 f ( −h) + A0 f (0) + A 1 f ( h)
令 f ( x ) = x 4 ,则

1 1 1
(1 − e− x ) 2 (2) ∫ dx, n = 10; 0 x (3) ∫
9 1
xdx, n = 4;
π
(4) ∫ 6 4 − sin 2 ϕ dϕ , n = 6;
0
解:
(1) n = 8, a = 0, = 8 4 + x2
令 f ( x ) = x 3 ,则
b 1 4 3 4 f ( x ) dx = ∫a ∫a x dx = 4 (b − a ) b −a 1 4 [7 f ( x0 ) + 32 f ( x1 ) + 12 f ( x2 )+ 32 f ( x (b − a4 ) 3 )+ 7 f ( x 4 )]= 90 4 b
从而解得
4 ⎧ ⎪ A0 = 3 h ⎪ 1 ⎪ ⎨ A1 = h 3 ⎪ ⎪ 1 ⎪ A−1 = 3 h ⎩
令 f ( x ) = x 3 ,则

h
−h
f ( x )dx = ∫ x 3dx = 0
−h
h
A−1 f ( −h) + A0 f (0) + A1 f ( h) = 0


h
−h
f ( x )dx = A− 1 f (−h ) + A0 f (0) + A1 f (h ) 成立。

令 f ( x ) = x 6 ,则

h
0
f ( x)dx ≠
b −a [7 f ( x0 ) + 32 f ( x1 ) + 12 f ( x2 ) + 32 f ( x 3 )+ 7 f (x 4 )] 90
相关主题