Professional Documents
Culture Documents
Z x0 +nh
h
f (x)dx = y0 + yn + 2(y1 + y2 + ... + yn−1 )
x0 2
]
1 rd
dx
R3
Q1: Evaluate 0 1+x with n = 6 by using Trapezoidal rule, Simpson’s 3
th
rule and Simpson’s 38 rule.
1
A1: Here f (x) = 1+x , a = 0, b = 3, n = 6.
b−a 3−0
h = n = 6 = 0.5.
x : 0 0.5 1 1.5 2 2.5 3
f (x) : 1 0.6667 0.5 0.4 0.3333 0.2857 0.25
From the above table, y0 = 1, y1 = 0.6667, y2 = 0.5,
y3 = 0.4, y4 = 0.3333, y5 = 0.2857, y6 = 0.25.
Z 3
dx h
= y0 + y6 + 2(y1 + y2 + ... + y5 )
0 1+x 2
0.5
= (1 + 0.25) + 2(0.6667 + 0.5 + 0.4 + 0.3333 + 0.2857)
2
= 1.40535.
Z 3
dx h
= y0 + y6 + 2(y2 + y4 ) + 4(y1 + y3 + y5 )
0 1+x 3
0.5
= (1 + 0.25) + 2(0.5 + 0.3333) + 4(0.6667 + 0.4 + 0.2857)
3
= 1.3877
Z 3
dx 3h
= (y0 + y6 ) + 2y3 + 3(y1 + y2 + y4 + y5 )
0 1+x 8
3 × 0.5
= (1 + 0.25) + 2 × 0.4 + 3(0.6667 + 0.5 + 0.3333 + 0.2857)
8
= 1.3888
[ ]
[
]
Exercise:
Trapezoidal Rule
[ ]
Weddle’s Rule
[ ]