1. www.ajms.com 50
ISSN 2581-3463
RESEARCH ARTICLE
Comparison Results of Trapezoidal, Simpson’s
1
3
rule, Simpson’s
3
8
rule, and
Weddle’s rule
A. Karpagam, V. Vijayalakshmi
Department of Mathematics, SRM Valliammai Engineering College, Chennai, Tamil Nadu, India
Received: 02-08-2018; Revised: 12-09-2018; Accepted: 15-11-2018
ABSTRACT
Numerical integration plays very important role in mathematics. In this paper, overviews on the most
common one, namely, trapezoidal Simpson’s
1
3
rule, Simpson’s
3
8
rule and Weddle’s rule. Different
procedures compared and tried to evaluate the value of some definite integrals. A combined approach of
different integral rules has been proposed for a definite integral to get more accurate value for all cases.
Key words: Numerical integration, Simpson’s
1
3
rule, Simpson’s
3
8
rule, trapezoidal rule, Weddle’s rule
INTRODUCTION
Numerical integration of a function of a single
variable is called quadrature, which represents the
area under the curve f (x) bounded by the ordinates
x0
, xn
and X-axis. The numerical integration of
a multiple integral is sometimes described as
cubature.
Numerical integration problems go back at least to
Greek antiquity when, for example, the area of a
circle was obtained by successively increasing the
number of sides of an inscribed polygon. In the
17th
century, the invention of calculus originated
a new development of the subject leading to the
basic numerical integration rules. In the following
centuries, the field became more sophisticated
and, with the introduction of computers in the
recent past, many classical and new algorithms
had been implemented, leading to very fast and
accurate results. An extensive research work has
already been done by many researchers in the field
of numerical integration.[1-5]
Numerical integration
a
b
f x dx
∫ ( ) represents the
area between y=f (x), X-axis and the ordinates
x = a and x = b. This integration is possible only if
the f (x) is explicitly given and if it is integrable.
If the ordered pairs (xi
, yi
), i = 0,1,2,..,n are plotted
and if any two consecutive points are joined by
straight line.
The problem of numerical integration can be
stated as follows:
Given a set of (n+1) paired values (xi
, yi
),
i = 0,1,2,…,n of the function y = f (x) where f (x) is
not known explicitly, it is required to compute
0
∫
n
x
x
ydx .
PRELIMINARIES
Definition 2.1
Trapezoidal rule is a technique for approximating
the definite integral.[6-7]
{displaystyleint_{a}^{b}
Address for correspondence:
A.Karpagam,
E-mail: karpagamohan@rediffmail.com
2. Karpagam and Vijayalakshmi: Comparison Results of Trapezoidal
AJMS/Oct-Dec-2018/Vol 2/Issue 4 51
f(x),dx}Thetrapezoidalruleworksbyapproximating
the region of the function {displaystyle f(x)} f(x) as
a trapezoid and calculating its area.{displays
Definition 2.2
Simpson’sruleisamethodofnumericalintegration
that provides an approximation of a definite
integral over the interval [a,b] using parabolas.
The integral of a function f(x) over the interval
[a,b] subintervals length can be approximated as,
as long as n is even.
Definition 2.3
Weddle’s rule, a function f(x) be tabulated at points
xi
equally spaced by h = xi+1
−xi
, so f1
= f (x1
). Then,
Weddle’s rule approximating the integral of f (x) is
given by the Newton–Cotes like formula [Table 1].
Definition 2.4
Quadrature formula for equidistant ordinates
For equally spaced intervals, we have Newton’s
forward difference formula as follows:
y x y u y
u u
y
u u u
y
( ) = + ∆ +
−
∆ +
− −
∆ +
0 0
2
0
3
0
1
2
1 2
3
( )
!
( )( )
!
....
Here, u =
−
= +
x x
h
x x nh
0
0
, , dx = h du
x
x
x
x nh
x
x nh
n
n
ydx f x dx P x dx
0 0
0
0
0
∫ ∫ ∫
= ( ) = ( )
+ +
=
0
0 0
2
0
3
0
1
2
1
2
3
n
y u y
u u
y
u u
u
y
hd
∫ + ∆ +
−
( )
∆ +
−
( )
−
( )
∆ +…
! !
u
u
= h y u y
u u
y
u u
u
y
d
n
0
0 0
2
0
3
0
1
2
1
2
3
∫ + ∆ +
−
( )
∆ +
−
( )
−
( )
∆ +…
! !
u
u
= h ny
n
y
n n
y
[ ]
0
2
0
3 2
2
0
2
1
2 3 2
+ ∆ + −
∆ +…
This is called Newton’s–Cotes quadrature formula.
Existing rule
Trapezoidal rule is a technique for approximating
the definite integral. {displaystyleint _{a}^{b}
f(x),dx} {displays
By putting n = 1 in quadrature formula, we get the
trapezoidal rule.
x
x
n n
n
ydx
h
y y y y y y
0
2
2
0 1 2 3 1
∫ = +
( )+ + + +…+
( )
−
Simpson’sruleisamethodofnumericalintegration
that provides an approximation of a definite
integral over the interval [a,b] using parabolas.
By putting n = 2 in quadrature formula, we get the
Simpson’s
1
3
rule.
x
x
n n
n
ydx
h y y y y y
y y
0
3
2
4
0 2 4 2
1 3
∫ =
+
( )+ + +…+
( )+
+ +…+
(
By putting n = 3 in quadrature formula, we get the
Simpson’s
3
8
rule.
x
x
n
n
ydx
h y y y y y y
y y
0
3
8
3
2
0 1 2 4 5
3 6
∫ =
+
( )+ + + + +…
( )+
+ +…+
(
Weddle’s rule
Weddle’s rule, a function f(x) be tabulated at points
xi
equally spaced by h = xi+1
−xi
, so f1
= f (x1
).[8]
Then, Weddle’s rule approximating the integral of
f(x) is given by the Newton–Cotes like formula
x
xn
ydx
h
y y y y y y
y y y y y y
0
3
10
5 6 5
2 5 6 5
0 1 2 3 4 5
6 7 8 9 10 1
∫ =
+ + + + +
( )+
+ + + + + 1
1
6 5 4
3 2 1
2 5
6 5
( )+
………
( )+ + + +
+ + +
− − −
− − −
(
[ )
y y y
y y y y
n n n
n n n n
3. Karpagam and Vijayalakshmi: Comparison Results of Trapezoidal
AJMS/Oct-Dec-2018/Vol 2/Issue 4 52
Proposed rule
Let y0
,y1
,y2
,….,yn−1
,yn
be the values of the function
y=f (x) at x0
,x1
,x2
,x3,
x4
….,xn,
respectively.
By putting n = 1, h = 1, and sum of all the variables
in quadrature formula, we get the trapezoidal rule.
x
x
n n
n
ydx y y y y y
0
1
2
0 1 2 1
∫ = + + +…+ +
−
[ ]
The curve on each consecutive pair of intervals
is approximated b a parabola. The dotted line is
graph of f (x) in [a,b].
By putting n = 2, h = 1 and in quadrature formula,
we get the Simpson’s
1
3
rule.
x
x
n n
n n
n
ydx y y y y y y
y y y y
0
1
3
1
6
0 1 2 1 0
1 2 1
∫ = + + +…+ +
[ ]+ +
+ +…+ +
−
−
[
]
By putting n = 3 and h = 1 in quadrature formula,
we get the Simpson’s
3
8
rule.
x
x
n n
n
ydx y y y y y
0
3
8
1
8
0 1 2 1
∫ = + + + +…+ +
−
[ ]
Weddle’s rule
x
x
n n
n n
n
ydx y y y y y y y
y y y
0
3
10
1
5
0 1 2 1 0 1
2 1
∫ = + + +…+ +
[ ]+ +
+ +…+ +
−
−
[
]
CONCLUSION
In this paper, to find the numerical approximate
value of a definite integral
0
( )
∫
n
x
x
f x dx , trapezoidal,
Simpson’s
1
3
rule, Simpson’s
3
8
rule, and Weddle’s
rule are used and its seen that the Weddle’s rule
gives more accuracy compared the other rules.
REFERENCES
1. Richard LB, Faires JD. Numerical Analysis. Pacific
Grove, CA: Wadsworth Group; 2001.
Table 1: Comparison results of trapezoidal, Simpson’s 1
3
rule, Simpson’s
3
8
rule, and Weddle’s rule
Integral Actual Trapezoidal Simpson’s 1
3
Simpson’s
3
8
Weddle’s rule
3
4
3
x dx
−
∫
97.2 98.000 97.999 98.000 98.000
Error 0.8 0.799 0.000 0.000
6
0
1
1
dx
x
+
∫
1.9459 2 1.999 2 2
Error 0.0541 0.0004 0.000 0.000
0
sin xdx
∫
2 1.9825 1.7131 1.5326 1.85746
Error 0.0175 0.2869 0.4674 0.1425
6
2
0
1
dx
x
+
∫
1.4056 1.083778 1.083759 1.08374 1.08378
Error 0.321822 0.32186 0.32182
5.2
4
e
log x dx
∫
2.182 2.2804 2.2802 2.2804 2.2803
Error 0.0984 0.0982 0.0984 0.0981
4. Karpagam and Vijayalakshmi: Comparison Results of Trapezoidal
AJMS/Oct-Dec-2018/Vol 2/Issue 4 53
2. Jain MK, Iyengar SR, Jain RK. Numerical Methods
for Scientific and Engineering Computation. 6th
ed.
New Delhi: New Age International; 2012.
3. Frontini M, Sormoni E. Some variants of Newton’s
method with third order convergence. Appl Math
Comput 2003;140:419-26.
4. Jisheng K,Yitian L, XiuhuaW.Third-order modification
of Newton’s method. J Comput Appl Math 2007;
205:1‑5.
5. Jayakumar J, Kalyanasundaram M. Modified Newton’s
method using harmonic mean for solving nonlinear
equations. IOSR J Math 2013;7:93-7.
6. Natarajan A, Mohankumar N. A comparison of some
quadrature methods for approximating Cauchy principal
value integrals. J Comput Phys 1995;116:365-8.
7. Liu DJ, Wu JM, Yu DH. The super convergence of the
Newton-cotes rule for cauchy principal value integrals.
J Comput Appl Math 2010;235:696-707.
8. UllahA. Numerical integration and a proposed rule.Am
J Eng Res 2015;4:120-3.