IT-2210 : Computational
mathematics LAB with
MATLAB
4/10/2017MATLAB by Tajim 1
Lecture 9: MATLAB – Simpson 1/3
and trapezoidal method.
4/10/2017MATLAB by Tajim 2
4/10/2017MATLAB by Tajim 3
4/10/2017MATLAB by Tajim 4
4/10/2017MATLAB by Tajim 5
This is the general quadrature formula.
If we put n=1 in (1) we get: Trapezoidal rule
If we put n=2 in (1) we get: Simpson’s One-
Third rule
If we put n=3 in (1) we get: Simpson’s Three-
Eight’s rule
If we put n=4 in (1) we get: Weddle’s rule
4/10/2017MATLAB by Tajim 6
4/10/2017MATLAB by Tajim 7
4/10/2017MATLAB by Tajim 8
Example 1
4/10/2017MATLAB by Tajim 9
Example 1………cont………
4/10/2017MATLAB by Tajim 10
Example 1………cont………
4/10/2017MATLAB by Tajim 11
Example 1………cont………
4/10/2017MATLAB by Tajim 12
MATLAB code for
simpson 1/3 rule.
4/10/2017MATLAB by Tajim 13
4/10/2017MATLAB by Tajim 14
Output for simpson 1/3 rule
4/10/2017MATLAB by Tajim 15
MATLAB code for
Trapezoidal
method.
4/10/2017MATLAB by Tajim 16
4/10/2017MATLAB by Tajim 17
Trapezoidal method output
4/10/2017MATLAB by Tajim 18
End of
LECTURE Nine
Thank You .
References: MSK and MMS sir’s lecture.
Reference Book:
1)Introductory Methods of Numerical Analysis: by S.S. Sastry.
2)Numerical Methods -Gerald/Wheetley

Matlab lecture 9 – simpson 1,3 and trapezoidal method@taj