EXAMPLES
|
x =
|
1.8
|
2.0
|
2.2
|
2.4
|
2.6
|
2.8
|
3.0
|
3.2
|
3.4
|
f(x) =
|
6.050
|
7.389
|
9.025
|
11.023
|
13.464
|
16.445
|
20.086
|
24.533
|
29.964
|
|
h = (b-a)/(n-1) = (3.4 - 1.8)/(9 -1) = 0.2
Case(i) : Trapezoidal rule
|
xn |
|
Trapezoidal formula =
|
ò f(x)
dx = h/2 ( f0 + 2(f1 + . . . + fn-1)
+ fn ) |
|
|
x0 |
|
= 0.2/2 [6.050 + 2( 7.389 + 9.025 + 11.023 + 13.464 + 16.445
+ 20.086 + 24.533 ) + 29.964]
= 23.9944
Total Error = - (b-a)/12
h2
f iv(x) |
|
|
|
for some x0 < x
< xn
|
|
= -(3.4 - 1.8)/12 * 0.22 f iv(x)
= -0.00533f iv(x)
Case(ii) : Simpson's 1/3rd rule
Simpson's 1/3rd formula =
|
h
|
( f0 + 4f1 + 2f2 |
+ . . . + |
2fn-2 + 4fn-1 + fn
) |
3
|
= 0.2/3 [6.050 + 4 * 7.389 + 2 * 9.025 + 4 * 11.023 +
2 * 13.464 + 4 * 16.445
+ 2 * 20.086 + 4 * 24.533 + 29.964]
= 23.91493
Total Error = - 1/90
h5
f iv(x)
|
|
|
|
for some x0 < x
< xn
|
|
= -1/90 * 0.25 f iv(x)
= 0
Case(iii) : Simpson's 3/8th
rule
Simpson's 3/8th formula =
|
3h
|
( f0 + 3f1 + 3f2 |
+ . . . + |
2fn-3 + 3fn-2 + 3fn-1
+
fn ) |
8
|
= (3* 0.2)/8 [6.050 + 3* 7.389 + 3* 9.025
+ 2* 11.023 + 3* 13.464 + 3* 16.445 + 20.086]
+ 0.2/2[20.086 + 2 * 24.533 + 29.964]
= 23.94793
Total Error = - 3/80
h5
f iv(x1)
|
|
|
|
for some x0 < x
< xn
|
|
= -3/80 * 0.25 f iv(x)
= 0
|
x =
|
1.0
|
1.1
|
1.2
|
1.3
|
1.4
|
1.5
|
1.6
|
1.7
|
1.8
|
f(x) =
|
1.543
|
1.669
|
1.811
|
1.971
|
2.151
|
2.352
|
2.577
|
2.828
|
3.107
|
|
h = (b-a)/(n-1) = (1.8 - 1.0)/(9 -1) = 0.1
Case(i) : Trapezoidal rule
|
xn |
|
Trapezoidal formula =
|
ò f(x)
dx = h/2 ( f0 + 2(f1 + . . . + fn-1)
+ fn ) |
|
|
x0 |
|
= 0.1/2 [1.543 + 2( 1.669 + 1.811 + 1.971 + 2.151 + 2.352
+ 2.577 + 2.828 ) + 3.107]
= 1.76840
Total Error = - (b-a)/12
h2
f iv(x) |
|
|
|
for some x0 < x
< xn
|
|
= -(1.8 - 1.0)/12 * 0.12 f iv(x)
= -6.66E-4 f iv(x)
Case(ii) : Simpson's 1/3rd rule
Simpson's 1/3rd formula =
|
h
|
( f0 + 4f1 + 2f2 |
+ . . . + |
2fn-2 + 4fn-1 + fn
) |
3
|
= 0.1/3 [1.543 + 4 * 1.669 + 2 * 1.811 + 4 * 1.971 +
2 * 2.151 + 4 * 2.352
+ 2 * 2.577 + 4 * 2.828 + 3.107]
= 1.76693
Total Error = - 1/90
h5
f iv(x)
|
|
|
|
for some x0 < x
< xn
|
|
= -1/90 * 0.15 f iv(x)
= 0
Case(iii) : Simpson's 3/8th
rule
Simpson's 1/3rd formula =
|
3h
|
( f0 + 3f1 + 3f2 |
+ . . . + |
2fn-3 + 3fn-2 + 3fn-1
+
fn ) |
8
|
= (3* 0.2)/8 [1.543 + 3* 1.669 + 3* 1.811
+ 2* 1.971 + 3* 2.151 + 3* 2.352 + 2.577]
+ 0.2/2[2.577 + 2 * 2.828 + 3.107]
= 1.76741
Total Error = - 3/80
h5
f iv(x1)
|
|
|
|
for some x0 < x
< xn
|
|
= -3/80 * 0.15 f iv(x)
= 0
|
x =
|
0.00
|
0.12
|
0.53
|
0.87
|
1.08
|
1.43
|
2.00
|
f(x) =
|
1.0000
|
0.8869
|
0.5886
|
0.4190
|
0.3396
|
0.2393
|
0.1353
|
|
h = (b-a)/(n-1) = (2 - 0)/(7 -1) = 0.333
Case(i) : Trapezoidal rule
|
xn |
|
Trapezoidal formula =
|
ò f(x)
dx = h/2 ( f0 + 2(f1 + . . . + fn-1)
+ fn ) |
|
|
x0 |
|
= 0.333/2 [1.0000 + 2( 0.8869 + 0.5886 + 0.4190 + 0.3396 + 0.2393
) + 0.1353]
= 1.01368
Total Error = - (b-a)/12
h2
f iv(x) |
|
|
|
for some x0 < x
< xn
|
|
= -(2 - 0)/12 * 0.3332 f iv(x)
= -0.0185f iv(x)
Case(ii) : Simpson's 1/3rd rule
Simpson's 1/3rd formula =
|
h
|
( f0 + 4f1 + 2f2 |
+ . . . + |
2fn-2 + 4fn-1 + fn
) |
3
|
= 0.333/3 [1.0000 + 4* 0.8869 + 2* 0.5886 + 4* 0.4190 + 2*
0.3396 + 4* 0.2393 + 0.1353]
= 1.01917
Total Error = - 1/90
h5
f iv(x)
|
|
|
|
for some x0 < x
< xn
|
|
= -1/90 * 0.3335 f iv(x)
= 0
Case(iii) : Simpson's 3/8th
rule
Simpson's 1/3rd formula =
|
3h
|
( f0 + 3f1 + 3f2 |
+ . . . + |
2fn-3 + 3fn-2 + 3fn-1
+
fn ) |
8
|
= 0.333/3 [1.0000 + 3* 0.8869 + 3* 0.5886 + 2* 0.4190
+ 3* 0.3396 + 3* 0.2393 + 0.1353]
= 1.01706
Total Error = - 3/80
h5
f iv(x1)
|
|
|
|
for some x0 < x
< xn
|
|
= -3/80 * 0.3335 f iv(x)
= 0
WORK OUT NUMERICAL INTEGRATION HERE
:
|