MTH 214: Introduction to Numerical Analysis
NUMERICAL INTEGRATION
b
We know that
a
f ( x) dx represents the area between y f ( x), x axis and the ordinates
x a and x b. This int egration is possible only if the f ( x) is exp licitly given and if it is
int egrable. The problem of numerical int egration can be stated as follows : Given a set of
(n 1) paired values ( xi , y i ), i 0,1, 2, 3, ..., n of the function y f ( x) is not exp licitly, it is
xn
required to compute y dx. As we did in the case of int erpolation, we replace f ( x) by an
x0
xn
int erpolating polynomial Pn ( x) and obtain Pn ( x) dx which is approximately taken as the
x0
xn
value for f ( x) dx.
x0
Trapezoidal Rule
The Trapezoidal rule for Numerical Integration is given as:
xn
f ( x) dx 2 ( y y n ) 2 y1 y 2 y 3 ... y n 1
h
0
x0
h
Sum of the first and last ordinates 2Sum of the remaining ordinates
2
Simpson’s one-third Rule
The Simpson’s one-third rule for Numerical Integration is given as:
xn
f ( x) dx 3 ( y y n ) 2 y 2 y 4 y 6 ... y n 2 4 y1 y 3 y 5 ... y n 1
h
0
x0
h Sum of the first and last ordinates 2Sum of remaining even ordinates
3 4Sum of odd ordinates
Page 1 of 2
Simpson’s Three-Eighth’s Rule
The Simpson’s Three-Eighth’s rule for Numerical Integration is given as:
xn
f ( x) dx 8 ( y y n ) 2 y 3 y 6 y 9 ... y n 3 y1 y 2 y 4 y 5 ... y n 1
3h
0
x0
Simpson' s three eighth' s rue is applicable only when the rangea. b is divided int o a number
of sub int ervals which must be a multiple of 3, that is n is a multiple of 3.
Example
1
6
1. Evaluate I dx u sin g (i) Trapezoidal rule (ii) Simpson' s one third rule
01 x
(iii) Simpson' s three eighth' s rule.
Solution :
ba 60
Take the number of int ervals as 6 h 1
n 6
x 0 1 2 3 4 5 6
1
y 1 0.5 0.3333 0.25 0.2 0.1667 0.1429
1 x
(i ) Trapezoidal rule
0 1 xdx 2 1 0.1429 20.5 0.3333 0.25 0.2 0.1667 2.02143
6 1 1
(ii) Simpson' s one third rule
I 1 0.1429 30.3333 0.2 40.5 0.25 0.1667 1.9587
1
3
(iii) Simpson' s three eighth' s rule
3 1
I 1 0.1429 30.5 0.3333 0.2 0.1667 20.25 1.9661
8
Exercise
61
1. Evaluate I dx u sin g (i) Trapezoidal rule (ii) Simpson' s one third rule
0 1 x2
(iii) Simpson' s three eighth' s rule.
Page 2 of 2