Numerical Integration Method Comparation (Fixed)
Numerical Integration Method Comparation (Fixed)
Numerical Integration Method Comparation (Fixed)
Abstract— This study aims to compare several Newton-Cotes methods: the Trapezoidal rule, the classic Simpson’s ⅜ rule, as well as the fuzzified
Simpson’s ⅓ and ⅜ rules, using MATLAB implementation. With the growing interest in numerical methods, the fuzzification approach becomes
significant as it can handle uncertainty and variability in data that often arise in real-world applications. The research results indicate that the
classic Simpson’s ⅜ rule has the highest accuracy with the smallest error, followed by the fuzzified Simpson’s ⅓ and ⅜ rules, while the Trapezoidal
method has the largest error. The fuzzification methods exhibit higher computational complexity, making them more suitable for applications
requiring high accuracy levels, such as in science and engineering fields. In contrast, the Trapezoidal and classic Simpson’s ⅜ rules are more
suitable for applications requiring quick and simple calculations. This study also highlights the importance of more in-depth statistical analysis to
strengthen the comparison results.
1. INTRODUCTION
b
I =∫ f (x)dx
a
In the formula above, A and B are the integration limits, and f(x) is a function that can be expressed in a complex form as an equation or
empirically as a table of values. There are three main approaches to deriving numerical integration formulas. The first approach is based
on interpreting the integral as a sum of points and rectangular strips, known as the quadrature method. The second approach uses
interpolation polynomials. In this approach, the function f(x) is approximated by the interpolation polynomial Pn(x). The numerical
integration formulas derived from this approach are called Newton-Cotes methods.
With the increasing interest in numerical methods, more flexible and adaptive approaches have emerged, one of which is the fuzzification
approach. Fuzzification can help handle uncertainty and variability in data, which often arise in real-world applications.
This study aims to conduct a comparative analysis of Newton-Cotes numerical methods: the Trapezoidal rule, the classic Simpson’s ⅜
rule, and the fuzzified versions of Simpson’s ⅓ rule and Simpson’s ⅜ rule. We will develop a computer program using MATLAB to
implement these methods. By conducting this comparison, we hope to provide further insights into the advantages and limitations of each
method, as well as the potential applications of the fuzzified Simpson’s ⅓ rule and fuzzified Simpson’s ⅜ rule in practical scenarios.
In addition to the above, it is essential to recognize the growing significance of numerical methods in various fields, including
engineering, physics, and economics. Accurate and efficient numerical integration techniques are crucial for solving complex problems
where analytical solutions are impractical or impossible. Therefore, this study not only compares the performance of different Newton-
Cotes methods but also highlights the relevance of integrating fuzzification to enhance the robustness and adaptability of numerical
integration in the presence of uncertain or imprecise data. The ultimate goal is to identify the most suitable methods for specific
applications, thereby contributing to the advancement of numerical analysis and its practical implementations.
1
2. THEORETICAL FOUNDATIONS
As a further development, in this study, we refer to the theories that have been studied, including:
According to Wang (1997:105), fuzzification is the mapping from a crisp set to a fuzzy set. All members of the crisp set must belong to
the fuzzy set, and the fuzzy system inputs used should not have disturbances that make the calculations easier. Defuzzification is the
reverse of fuzzification, meaning the shift from a fuzzy set B to a crisp set, according to Wang (1997:108). In this context, the fuzzy set is
the result of inference. Three requirements must be met for the defuzzification process: it must be reasonable, computationally simple, and
continuous. A Crisp Set can be defined as all items that exist within the crisp set that define the set. The value associated with aaa is 1 if
aaa is a member of A, but the value associated with aaa is 0 if aaa is not a member of A.
The Newton-Cotes method is a commonly used technique for deriving numerical integration by using interpolation polynomials.
Within the Newton-Cotes methods, there are several derivative methods frequently used for performing numerical integration
calculations, including:
The trapezoidal rule is one of the numerical integration methods based on the summation of segments shaped like trapezoids. To
approximate the value of an integral, this method works by approximating the area under the graph of 𝑓( 𝑥) as a series of trapezoids of
equal width. The area of each trapezoid is then calculated and summed. The essence of this method is that the area of the trapezoid formed
between the curve and the vertical lines from each point can be calculated to obtain the area under the curve 𝑓( 𝑥).
We can use the Integral Method to calculate the area of an irregular region. Among the various methods to find or approximate the value
of an integral, we will focus on Simpson's ⅓ method. We can find the integral value using Simpson's ⅓ method with a second-degree
polynomial equation. The second-degree polynomial of Simpson's ⅓ method passes through 3 coordinate points: (𝑥𝑖−1, 𝑓(𝑥𝑖−1)), (𝑥𝑖,
𝑓(𝑥𝑖)), dan (𝑥𝑖+1, 𝑓(𝑥𝑖+1)).
The second-degree polynomial connects these three coordinate points, which we then integrate to obtain Simpson's ⅓ method. The
interval in Simpson's ⅓method is divided into several segments. Each segment includes the three points mentioned above. For each
segment, we can use a quadratic polynomial to estimate the function's value.
This quadratic polynomial provides a more accurate approximation than the trapezoidal method because it accounts for the curvature of
the function. We can further improve the integral value approximation by using higher-degree interpolation polynomials. For example, the
function 𝑓(𝑥) can be approximated with a second-degree interpolation polynomial as a parabola. The area calculated as an approximate
integral value is the area under the parabola. To estimate this area, three data points are required, such as (0, 𝑓(0)), (h, 𝑓(h)), dan (2h,
𝑓(2h)). , dan (2h, 𝑓(2h)).
The accuracy of integration using Simpson's ⅓ method can be improved. To achieve this, we can approximate the function with a higher-
degree interpolation polynomial. The numerical method that employs this approach is Simpson's ⅜ method.
In theory, the difference between these two Simpson's methods lies in the degree of their interpolation polynomials. Simpson's ⅓ method
uses a second-degree interpolation polynomial, while Simpson's ⅜ method uses a third-degree interpolation polynomial. This approach
results in more accurate integration. Similar to Simpson's ⅓ method, the area calculated as an approximate integral value is the area under
2
the polynomial curve. To form a third-degree interpolation polynomial, four data points are required: (0, f(0)), (h, f(h)), (2h, f(2h)), dan
(3h, f(3h))
The methods to be conducted include several Newton-Cotes methods: the Trapezoidal rule, the Simpson’s ⅓ and ⅜ rules modified using
the fuzzification approach, and the classic Simpson’s ⅜ rule. We will use MATLAB to implement these methods and test their
performance on a given problem. Through this comparison, we hope to provide a deeper understanding of the advantages and
disadvantages of each method, as well as the potential application of the fuzzified Simpson’s ⅓ and ⅜ rules compared to the other
methods.
In this problem, we will evaluate the integral of the exponential function e x over a given fuzzy interval. This fuzzy interval is defined by
two fuzzy sets: [3.99, 4, 4.01] for the upper limit and [-0.01, 0, 0.01] for the lower limit. We will use the appropriate numerical
integration methods to solve this problem, taking into account the given fuzzy membership.
To explain further, we can consider the function f (x)=e x and the fuzzy set H = [0.99, 1, 1.01]. Thus, our goal is to compute the integral
of e^x within the defined fuzzy limits, using an appropriate approach to handle the fuzzy sets and ensuring that the resulting solution is
applicable within the fuzzy context. The steps to be taken include:
1. Definition of Function and Fuzzy Limits: Define the exponential function and the fuzzy limits of the given interval.
2. Fuzzy Approach: Use an appropriate approach to calculate the integral within the fuzzy context.
3. Evaluation of the Integral: Use numerical integration methods to calculate the integral of e x within the given fuzzy interval.
4. Interpretation of Results: Interpret the integral results within the fuzzy context to obtain meaningful values that can be applied in
practical applications.
By following these steps, we aim to provide a comprehensive understanding of how to integrate e x over a fuzzy interval and demonstrate
the potential applications of this approach in solving real-world problems involving uncertainty and imprecision.
In this study, a table of values X and Y = 𝑓( 𝑥)) has been prepared. This table will facilitate the work, as each X value will have a
corresponding Y value calculated using the exponential function f (x)=e x . Thus, we can easily observe how Y changes as X varies
within the range defined by the fuzzy sets. This process is crucial to ensure that all variables affecting the final result of the fuzzy integral
calculation are considered.
3
Table 1.
x y=f(x)
The table above shows the values of X and Y = f(x) In this table, the values of X are divided into several fuzzy intervals. Each X value
yields a corresponding Y value according to its interval. Each row in the table represents the associated X and Y values, providing an
overview of how Y changes as X varies within the defined intervals.
3.2. Methods
4
Figure 3.
The interpolation polynomial that passes through these two points is:
Δ f (x 0) Δf0
p1 (x)=f (x 0)+ x = f 0+ x
h h
Next, integrating P1(x) over the interval [0,1] yields the Trapezoidal rule, along with its error term, which has been derived from the basic
method.
h
∫ f (x )dx ≈ h2 (f 0 + f 1)+O(h3)
0
The Trapezoidal rule integrated over the interval [0,h] is then used to compute the area for all the points.
b
I =∫ f (x)dx
a
b n
∫ f (x )dx = h2 ( f 0 +2 ∑ f i+ f n )+ O(h2 )
a i=1
The Trapezoidal method is a numerical method used to approximate the integral of a continuous function. In the case of a fuzzy integral,
this method can be applied by treating the fuzzy bounds as crisp values chosen from the fuzzy set. This study chooses to use the middle
member of the fuzzy set as the crisp value.
5
In fuzzy set theory, each element of a fuzzy set has a membership degree indicating how strongly the element belongs to the set. A crisp
value is a single value taken from the fuzzy set for further calculations. Selecting the middle member of the fuzzy set is a simple yet
effective defuzzification method. The middle member is considered a good representation of the fuzzy set.
Fuzzification is the conversion of crisp elements into fuzzy elements. Therefore, to fuzzify the classical Simpson's ⅓ rule, the values of
this technique are replaced with triangular fuzzy numbers. As a result, the following expression is obtained for the fuzzified Simpson's ⅓
rule. Assume Y=f(x) as the function.
Xn
H
∫ f ( x ) dx= [ 3 , 3 ,3 ]
X0
¿(sum of the extreme ordinates + [2,2,2] x (sum of the even ordinates) + [4,4,4] x (sum of the even ordinates)]
H
¿ ¿ + [4,4,4] (Y 1 +Y 3 +...)]
[3 ,3 , 3]
Where 𝑋0 = [𝑋0(min), 𝑋0(med), 𝑋0(max)], 𝑋𝑛 = [𝑋𝑛(min), 𝑋𝑛(med), 𝑋𝑛(max)] are triangular fuzzy numbers, and 𝑌0 and 𝑌𝑛 are the first
and last ordinates in fuzzy form. The remaining odd coordinates 𝑌1, 𝑌3, …𝑌𝑛−1are fuzzy triangular numbers, specifically 𝑌1 =
[𝑌1(min), 𝑌1(med), 𝑌1(max)], 𝑌3 = [𝑌3(min), 𝑌3(med), 𝑌3(max)], ..., 𝑌𝑛−1 = [𝑌𝑛−1 (min), 𝑌𝑛−1(med), 𝑌𝑛−1(max)].
6
The remaining even ordinates, 𝑌2, 𝑌4, … 𝑌𝑛−2 are also fuzzy triangular numbers, specifically, yaitu 𝑌2 = [𝑌2(min), 𝑌2(med), 𝑌2(max)], 𝑌4 =
[𝑌4(min), 𝑌4(med), 𝑌4(max)], ..., 𝑌𝑛−2 = [𝑌𝑛−2 (min), 𝑌𝑛−2(med), 𝑌𝑛−2(max)].
Below is the MATLAB code for the Fuzzified Simpson ⅓ method and its defuzzification:
Figure 5. Fuzzified Simpson’s ⅓ Rule and Defuzzified Code with Defined x and y Values
b n−1 n−3
∫ f ( x ) dx ≈ 38h (f 0 +3 ∑ f i +2 ∑ f i +f n)
a i=1 ,i ≠3 ,6 ,9 ,... i=3 ,6 , 9 ,...
In the case of fuzzy integrals, the Simpson's ⅜ method can be applied by treating fuzzy boundaries as crisp values selected from the fuzzy
set. This study will conduct two experiments. The first experiment chooses to use the middle member of the fuzzy set as the crisp value.
In fuzzy set theory, each element of the fuzzy set has a degree of membership indicating how much the element belongs to the set. A crisp
value is a single value taken from the fuzzy set for further calculations. Choosing the middle member of the fuzzy set is a simple yet
effective defuzzification method, as the middle member is considered a good representation of the fuzzy set.
The second experiment applies the fuzzified Simpson's ⅜ rule based on all intervals. These intervals refer to the fuzzy minimum, medium,
and maximum members.
7
In the first implementation, the values x 0 = 0 and xn = 4 are taken as the middle values of the fuzzy set. The implementation of the
classical Simpson's ⅜ method in MATLAB code can be seen in the figure below.
In this code, the integral interval is set between a = 0 and b = 4 with the number of segments n = 6. The number of segments must be a
multiple of 3 to use the Simpson's ⅜ method. This code calculates the interval length (h) as well as the X and Y values for each point in
the interval. Then, the Simpson's ⅜ method is applied by checking the multiples of segments, and the integral is calculated using the
Simpson's ⅜ formula. This method is usually more accurate than the Simpson's ⅓ method because it uses higher-degree polynomials to
approximate the function, especially for more complex functions. However, the requirement that the number of segments must be a
multiple of 3 makes this method less flexible compared to the Simpson's ⅓ method.
In the second implementation, all intervals, which are the members of the fuzzy set, are included in the fuzzified Simpson's ⅜ rule. The
fuzzification formula for Simpson's ⅜ rule becomes:
b
[3 ,3 , 3]h
∫ f ( x ) dx ≈ [8 , 8 , 8]
¿
a
Suppose Y = f(x) is the function. Where 𝑋0 = [𝑋0(min), 𝑋0(med), 𝑋0(max)], 𝑋𝑛 = [𝑋𝑛(min), 𝑋𝑛(med), 𝑋𝑛(max)] are triangular fuzzy
numbers, and 𝑌0, 𝑌𝑛 are the first and last ordinates in fuzzy form.
The coordinates that are multiples of 3 in fuzzy form are 𝑌3, 𝑌6, 𝑌9,… 𝑌3k. where, 𝑌3 = [ 𝑌3(min), 𝑌3(med), 𝑌3(max)], 𝑌6 =
[𝑌6(min), 𝑌6(med), 𝑌6(max)], ..., 𝑌3k = [𝑌3k(min), 𝑌3k(med), 𝑌3k(max)].
The coordinates that are not multiples of 3 in triangular fuzzy number form are 𝑌1, 𝑌2, 𝑌4…, where, 𝑌1 = [ 𝑌1(min), 𝑌1(med), 𝑌1(max)],
𝑌2 = [𝑌2(min), 𝑌2(med), 𝑌2(max)], 𝑌4 = [𝑌4(min), 𝑌4(med), 𝑌4(max)].
8
Figure 7. Simpson’s ⅜ Rule and Defuzzified Code with Defined x and y Values
4. RESULT
Comparison between numerical integration methods, namely the Fuzzy Simpson's ⅓ and ⅜ methods, the Trapezoidal Rule, and the classic
Simpson's ⅜ Rule, shows variations in their accuracy in approximating the crisp value.
9
Figure 8. Results of the Method in MATLAB
Numerical Method
Crisp Trapezium Simpson Fuzzified Fuzzified Simpson
Value Rule ⅜ Rule Simpson ⅓ Rule ⅜ Rule
The table above compares the results of several numerical methods for calculating an integral value. First, the Crisp Value, obtained
directly without numerical or fuzzy approximation, is 53.5982. Second, the Trapezoidal Value, obtained using the trapezoidal method for
numerical integration, yields a value of 57.9919, which is higher than the Crisp Value. Third, the Simpson's ⅜ Classic Rule Value shows
the result from the Simpson's ⅜ method, yielding a value of 53.7177, close to the Crisp Value. Fourth, the Fuzzy Simpson's ⅓ Rule Value
shows the range of values generated from the fuzzy logic approach using the Simpson's ⅓ method: 51.1884, 53.8637, and 56.6775. Fifth,
the Fuzzy Simpson's ⅜ Rule Value shows the range of values generated from the fuzzy approach using the Simpson's ⅜ method: 50.6629,
52.4890, and 54.8893. Lastly, the Defuzzified Values obtained from defuzzification using the Simpson's ⅓ and ⅜ methods are 53.8984
and 52.6326. This illustrates how different numerical methods can provide varying results and how the fuzzy approach offers a range of
values in the context of uncertainty, giving a more comprehensive picture of possible outcomes.
The table shows the comparison of errors between several numerical methods for calculating the integral of e x dx, where the actual
integral value is 53.5982. The error for the Trapezoidal method is 4.3938, indicating that this method has a relatively large error.
Meanwhile, Simpson's ⅜ method shows a smaller error of 0.11957. For the fuzzy methods, Fuzzy Simpson's ⅓ produces an error range
between 2.4097 and 3.0794, with the error at defuzzification being 0.3002, whereas Fuzzy Simpson's ⅜ results in an error range between
2.9352 and 1.2912, with the error at defuzzification being 0.9656. From these results, it can be concluded that the Simpson's ⅜ method
provides the most accurate results with the smallest error, followed by the fuzzy Simpson's ⅓ and fuzzy Simpson's ⅜ methods, while the
Trapezoidal method shows the largest error.
10
5. CONCLUSION
This research compares several Newton-Cotes methods, namely the Trapezoidal rule, the classic Simpson's ⅜ rule, and the fuzzified
versions of Simpson's ⅓ rule and Simpson's ⅜ rule. We conducted the comparison of these methods using MATLAB implementation.
This research provides us with an understanding of:
1. Accuracy of Methods: The classic Simpson's ⅜ rule shows results that are closest to the crisp value compared to the Trapezoidal
method. Meanwhile, the fuzzy Simpson's ⅓ and fuzzy Simpson's ⅜ methods provide a wider range of values, reflecting the
uncertainty in the results.
2. Complexity: Fuzzification methods, both Simpson's ⅓ and Simpson's ⅜, exhibit higher computational complexity compared to the
Trapezoidal method and the classic Simpson's ⅜ rule. This can be seen from the MATLAB programs which require more
calculations for the fuzzification methods.
3. Application: The fuzzy Simpson's ⅓ and fuzzy Simpson's ⅜ methods are more suitable for applications that require a high level of
accuracy and can handle uncertainty, such as in science and engineering. On the other hand, the Trapezoidal method and the classic
Simpson's ⅜ rule are more suitable for simpler, practical applications that require quick calculations.
4. MATLAB Implementation: MATLAB can be used to implement all these methods effectively. MATLAB shows good
performance in terms of accuracy and computation speed for all the methods tested.
In this study, there are still shortcomings in proving the comparison between the methods used. The comparison we made is only based on
the display of the calculation result table, without a more in-depth analysis. Ideally, the comparison should be complemented with more
detailed statistical analysis and comparison graphs. Without these additional steps, the comparison results obtained may be less
convincing and require further verification.
REFERENCE
[1] Bora, T. (2022). Fuzzification of Simpson’s ⅓ Rule and Development of its Computer Program. Journal of Coastal Life Medicine.
[2] Wang, L.X.(1997). A Course in Fuzzy System and Control International Edition, United States of America: Prentice-Hall
International.
[3] R. Marjulisa, M. Natsir, Metode Newton-Cotes Tertutup Berdasarkan Turunan Rata-Rata Aritmatika, Pekanbaru: Sekolah Tinggi
Teknologi Pekanbaru, 2021.
[4] Meliana, B. Prihandono, Yudhi, Penyelesaian Integral Tak Wajar Secara Numerik Menggunakan Metode Trapesium, Pontianak:
Universitas Tanjungpura, 2024.
[5] A. K. Nisa, M. Abdy, A. Zaki, Penerapan Fuzzy Logic untuk Menentukan Minuman Susu Kemasan Terbaik dalam Pengoptimalan
Gizi, Makassar: Universitas Negeri Makassar, 2020.
[6] S. Sandi, Helmi, Yudhi. Solusi Nmerik Persamaan Integral Volterra Jenis Pertama Menggunakan Metode Simpson ⅓, Pontianak:
Universitas Tanjungpura, 2023.
[7] Institut Teknologi Bandung, Integrasi Numerik, Bandung: Institut Teknologi Bandung.
[8] Kusumadewi. S dan H. Purnomo. (2004). Aplikasi Logika Fuzzy Untuk Mendukung Keputusan. Graha Ilmu, Yogyakarta
11