Beruflich Dokumente
Kultur Dokumente
Fernandez, RCE,RMP
CHAPTER 7
Numerical Integration
Composite Simpsons Method
Composite Simpsons method is a technique in numerical analysis which require the Simpsons
rule. The concept of this method is to breakdown the function into certain subinterval m then applying
the Simpsons rule. This method is very useful in attaining a good results in approximating the value of a
function with a specified interval.
Fig. 1 Simpsons Rule
Theorem (Composite Simpson Rule) Suppose that [a,b] is subdivided into 2M subintervals [xn,
xn+1] of which h=(b-a)/2M by using xn=x0+nh for n =0,1,., 2M. The composite Simpson rule for 2M
subintervals can be expressed in any of the equivalent ways:
S f , h
h
3
f x
n 1
2n2
4 f x2 n 1 f x 2 n
Eq. 1
or
S f , h
h
f 0 4 f1 2 f 2 4 f 3 .... 2 f 2 M 2 4 f 2 M 1 f 2 M
3
Eq. 2
or
S f , h
h
f a f b 2h
3
3
M 1
k 1
f x2 n
4h
3
M 1
f x
k 1
2 n 1
Eq. 3
5|Page
x dx
S f , h
Eq. 4
Error Calculation:
If C2 [a, b], there exists a value c with a < c < b so that the error term Es ( f, h) has the form
(
ES (f,h) =
( )
Eq. 5
Then, The Complete General equation of the composite Simpsons rule is:
( )
)
Eq. 6
Algorithm Procedure:
1.
2.
3.
4.
5.
6.
7.
6|Page
Example:
Consider f (x) = 2+sin(2x). Investigate the error when the composite Simpsons rule is used over [1,6]
and the number of subinterval M is 5 ,10 and 20.
Solution:
2-5:
Table 2
h=
0.5
M=
Xn
f(xn)
f(xa)
f(xb)
4*f(xodd)
2*f(xeven)
S(f,h)
2.909297
2.909297
0.484883
1.5
2.638158
10.55263
1.758772
2.308072
2.5
1.979316
7.917266
1.683053
3.5
1.435304
5.741216
1.243198
4.5
1.108318
4.433271
1.028722
5.5
1.000241
4.000966
0.666828
10
1.017358
0
1.017358
0.16956
Sum s(f,h)
f(x)Exact
Error
4.616143 0.769357
0
1.319544
3.366106 0.561018
0
0.956869
2.486395 0.414399
0
0.738878
2.057444 0.342907
8.183015494
dx
8.183479208
0.000463714
7|Page
Table 3
h=
n
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
0.25
Xn
1
1.25
1.5
1.75
2
2.25
2.5
2.75
3
3.25
3.5
3.75
4
4.25
4.5
4.75
5
5.25
5.5
5.75
6
f(xn)
2.909297
2.786749
2.638158
2.475772
2.308072
2.14112
1.979316
1.82586
1.683053
1.552508
1.435304
1.332095
1.243198
1.168661
1.108318
1.06183
1.028722
1.008414
1.000241
1.003479
1.017358
M=
f(xa)
f(xb)
2.909297
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1.017358
Sum of S(f,h)
f(x)Exact
Error
dx
10
4*f(xodd)
0
11.147
0
9.903087
0
8.56448
0
7.303441
0
6.210033
0
5.328379
0
4.674643
0
4.247319
0
4.033656
0
4.013917
0
2*f(xeven)
S(f,h)
0
0.242441
0
0.928916
5.276315 0.439693
0
0.825257
4.616143 0.384679
0
0.713707
3.958633 0.329886
0
0.60862
3.366106 0.280509
0
0.517503
2.870608 0.239217
0
0.444032
2.486395
0.2072
0
0.389554
2.216635 0.18472
0
0.353943
2.057444 0.171454
0
0.336138
2.000483 0.166707
0
0.334493
0
0.08478
8.183447497
8.183479208
3.17114E-05
8|Page
h=
n
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
0.125
Xn
1
1.125
1.25
1.375
1.5
1.625
1.75
1.875
2
2.125
2.25
2.375
2.5
2.625
2.75
2.875
3
3.125
3.25
3.375
3.5
3.625
3.75
3.875
4
4.125
4.25
4.375
4.5
4.625
4.75
4.875
5
5.125
5.25
5.375
f(xn)
2.909297
2.852251
2.786749
2.714833
2.638158
2.558091
2.475772
2.392161
2.308072
2.224195
2.14112
2.059351
1.979316
1.901383
1.82586
1.75301
1.683053
1.616169
1.552508
1.492189
1.435304
1.381923
1.332095
1.285848
1.243198
1.20414
1.168661
1.136733
1.108318
1.083369
1.06183
1.043638
1.028722
1.017008
1.008414
1.002855
f(xa)
2.909297
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
M=
f(xb)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
20
4*f(xodd)
0
11.409
0
10.85933
0
10.23236
0
9.568645
0
8.896779
0
8.237403
0
7.605531
0
7.012042
0
6.464677
0
5.968756
0
5.527693
0
5.143394
0
4.81656
0
4.546931
0
4.333475
0
4.17455
0
4.068032
0
4.011419
2*f(xeven)
0
0
5.573498
0
5.276315
0
4.951544
0
4.616143
0
4.28224
0
3.958633
0
3.65172
0
3.366106
0
3.105016
0
2.870608
0
2.664189
0
2.486395
0
2.337322
0
2.216635
0
2.123659
0
2.057444
0
2.016828
0
S(f,h)
0.121221
0.475375
0.232229
0.452472
0.219846
0.426348
0.206314
0.398694
0.192339
0.370699
0.178427
0.343225
0.164943
0.316897
0.152155
0.292168
0.140254
0.269362
0.129376
0.248698
0.119609
0.230321
0.111008
0.214308
0.1036
0.20069
0.097388
0.189455
0.09236
0.180561
0.088486
0.17394
0.085727
0.169501
0.084034
0.167142
9|Page
36
37
38
39
5.5
5.625
5.75
5.875
1.000241
1.000481
1.003479
1.009138
40
1.017358
0
0
0
0
0
Sum of (f,h)
f(x)Exact
0
0
0
0
0
4.001925
0
4.036551
2.000483
0
2.006959
0
1.017358
dx
0.04239
8.183477168
8.183479208
2.0402E-06
Error
6.
0.083353
0.166747
0.083623
0.16819
Conclusion
It has been observed that if we reduce the value of h, the error is also decreasing.
Since h = (b-a)/2M, it signifies that the error will be more likely minimize if there is
several number of intervals (M). Furthermore, the error is reduced by approximately 93
% if we double the value of M.
Graphical Presentation
Fig. 2
Simpson's Method
3.5
3
2.5
f(Xn)
7.
2
1.5
1
0.5
0
Xn
10 | P a g e
Graphical presentation shown is merely similar to the Composite Trapezoidal method due to
data similarity.
11 | P a g e