1. Introduction
Numerical analysis has a rich store of methods to find the answer by purely arithmetical operations. Many practical problems in applied sciences and mathematical physics are given in the form of integrals. Different analytical techniques are available to compute such integrals; several numerical techniques have been developed to obtain approximate solutions for various classes of integrals. The methods of numerical integration are sometimes referred to as quadrature rules because these are used to approximate the integrals of the functions of one variable. As quadrature rules provide a very close estimate of the actual integration in most critical problems, the numerical evaluation of integrals through these techniques has been a key topic in mathematical research. These formulas are used for calculating the area under the region defined by the integrand within a range, finite or infinite, and when the integrand either cannot be integrated analytically or values are given in a tabular form only without its explicit mathematical description then numerical integration is the only option [
1,
2]. The worst cases consist of a definite integral whose analytical evaluation is not possible especially when these are associated with singularities and nonlinearities in solving differential and integral equations [
2,
3], for example:
The efficiency of quadrature rules is usually categorized in terms of the degree of precision and order of accuracy. Therefore, obtaining higher precision and accuracy in numerical integration formulas becomes one of the challenges in the field of numerical analysis. A numerical integration formula is generally given as:
where the constant
are the weights and
are
equidistant nodes in the interval
. The Formula (2) represents Newton–Cotes quadrature rules, in general, form. In the semi-open Newton–Cotes formulae, the function evaluation at one of the endpoints of the interval is excluded. In this paper, we excluded the endpoint, which is on the right side of the interval, i.e., nodes at equally spaced points of
are considered. We can rewrite (2) as:
where
are distinct 𝑛 integration points and
are 𝑛 weights within the interval
with
,
, and
.
The starting semi-open Newton–Cotes quadrature rule in basic form along with the local error term is defined as:
where
and is known as the one-point semi-open Newton–Cotes rule. The composite form of this method with the global error term is defined as:
where
,
,
and
.
The Newton–Cotes quadrature rules are interpolatory in nature. This means that the rules are formed by assuming that the integrand is an interpolatory polynomial of a suitable degree, and thus can be expressed exactly as a regular Taylor’s series approximation. The formulation of Newton–Cotes rules are frequently based upon interpolating polynomials due to Lagrange. Similarly, Hermite-type polynomials can also be focused as are based on the exactness of the integrand as well as its first-order derivative. This new formation of integration formulas is referred to as corrected Newton–Cotes quadrature rules. These formulas are more accurate than the conventional rules since they have a higher order of precision and accuracy [
4]. Several new quadrature rules were discovered that were termed to be optimal for different families of integrands [
4], which have proven to be much more significant. Various numerical techniques have been proposed as an improvement of classical Newton–Cotes rules. A unified approach to solving systems of linear equations with coefficient matrices of the Vandermonde type for closed and open Newton–Cotes rules was given by El-Mikkawy in [
5,
6]. An improvement in Newton–Cotes formulas with usual nodes along with nodes at both, none, and only one endpoint of the interval of integration to raise the degree of precision and accuracy of the methods by changing the endpoints from constants to variables [
7,
8,
9]. The key idea of this research was to extend the monomials of space that increase the number of equations and unknowns. Additionally, the developments of first and second-kind Chebyshev quadrature rules of Newton–Cotes type were devised for open and semi-open rules in [
10,
11]. Burg proposed enhanced classes of Newton–Cotes rules with both endpoints by using first-order derivatives [
12] and also using the derivatives at the midpoint [
13] of the interval using the concept of precision degree. In [
14], a class of methods for closed Newton–Cotes formulas was proposed using the midpoint derivative value and are proved to obtain an increase of two precision orders over the classic closed Newton–Cotes formula. These authors in [
15] presented a derivative-based trapezoid rule for the Riemann–Stieltjes integral. In [
3], a comparison was made between the polynomial collocation and quadrature methods that are uniformly spaced for the Fredholm integral equation of the second kind. Memon et al. [
16] proposed derivative-based schemes for Riemann–Stieltjes integration, the same authors [
17], devised a new technique for four-point Riemann–Stieltjes integrals. An error analysis of Newton–Cotes cubature rules was focused on in detail by Malik et al. in [
18].
Integration has wide applications in the many fields of science and engineering, for instance in the field of probability theory [
19,
20], stochastic processes and oscillators [
21,
22,
23], and functional analysis [
24], particularly in the spectral theorem for self-adjoint operators in Hilbert space [
25]. Some special types of integrals based on the oscillatory, periodic, or singular nature of integrands were also highlighted in detail in the literature and the consequent approximations using quadrature rules were encouraged [
26,
27,
28,
29,
30]. In the recent past, numerous new approaches have been devised to find the approximation of definite integrals in which the derivatives of the function at different statistical means were used. In [
31] a Newton–Cotes rule was proposed using the derivative at the mid-point of the interval for algebraic functions. Likewise, this work was extended where the derivatives of the functions were assessed by geometric mean and harmonic mean at the endpoints of the interval in [
32]. On the other hand, the comparison between the three techniques using the arithmetic mean, geometric mean, and harmonic mean was made in [
33]. Additionally, several other approaches for closed and open Newton–Cotes rules were invented where the derivatives of the integrand were employed utilizing the centroidal Mean [
34], contra-harmonic mean [
35], and heronian mean [
36]. Two efficient derivative-based schemes were introduced by Rike and Imran in [
37] where the arithmetic mean was used in the mid-point rule. These new derivative-based schemes were proved to be more effective than the original Newton–Cotes formulas, in terms of error terms and approximate integral values. The literature tailors to the fact that semi-open Newton–Cotes has been less focused on the perspectives of derivative-based end-point corrections to improve the accuracy and precision of the conventional rules. Such improvements can prove to be more efficient in dealing with integrals having an end-point singularity instantly than other closed methods. Consequently, the derivative-based refinements in basic semi-open Newton–Cotes will give rise to more studies on their application for the numerical approximation of higher dimensional integrals, Riemann–Stieltjes integrals, and complex line integrals on one hand. On the other hand, more appropriate numerical techniques can be devised for numerical solutions of differential equations in one or more independent variables, and one-dimensional and boundary integral equations [
15,
16,
17,
18].
In this research, some new quadrature formulas which are utilized derivatives to compute integrals are proposed and are proven to be time-efficient and cost-effective. This is conducted by attempting to modify the classical semi-open Newton–Cotes rule, i.e.,
by introducing first-order derivatives at all nodes, excluding the upper endpoint of the interval
. The proposed methods are proved to be more efficient in terms of order of accuracy and degree of precision than the classical SONC rules. However, to increase the accuracy of the new methods, the weights of the first-order derivatives of the function are used, which work as additional parameters and are computed by using the concept of precision through associated systems of linear equations. The theoretical development of the new methods, error analysis and exhaustive numerical experiments are used to demonstrate the performance of proposed rules against the conventional Newton–Cotes rules of semi-open type. In parallel, the proposed modifications are also tested against the Gauss–Legendre (GL) rules [
29] of similar orders of accuracy on varying nature integrands including periodic, oscillatory and derivative singularities. The proposed formulas guarantee a substantial reduction in computational cost and execution time for a fixed predefined error tolerance against SONC without derivatives and compete well with the GL methods.
4. Results and Discussion
Here, various numerical tests have been conducted on proposed quadrature formulas MSONC1–4 with derivatives against the existing conventional rules SONC without derivatives as well as one-point and two-point Gauss–Legendre rules (GL1 and GL2), which confirm the validity of the theoretical results. While all the proposed methods are modifications of the one-point derivative free SONC rule only, we have also included the GL2 rule in comparison for analysis of improvement in the accuracy of the proposed rules. The GL methods have been programmed in composite form like the other methods, to compare the efficiency in similar situations.
Ten numerical problems have been solved for each scheme, as taken from [
4,
7] with motivations on special integrands [
22,
23,
26,
27,
28,
29,
30,
38], whose exact values were determined using MATLAB (R2014b) software in double precision arithmetic. All the results are noted in Intel (R) Core i5 Laptop with RAM of 8.00 GB and a processing speed of 1.8 GHz. Additionally, the computational order of accuracy (COC) and the absolute errors are computed for all the integrals. The following integrals are analyzed to prove our results. The exact integral values with 15 decimal places are shown against each example. Examples 1–5 represent regular integrands involving polynomial, rational, exponential, logarithmic and trigonometric integrands. Example 6 represents an integrand with derivative singularity, Examples 7 and 8 are periodic integrals defined in the range of periodic intervals, and Examples 9 and 10 are more challenging situations concerning the evaluations of complicated and highly oscillatory integrals. These ten examples have been added in the comparison to comment on the performance of proposed and existing methods exhaustively from viewpoint of computational efficiency in different situations.
Example 1. Example 2. Example 3. Example 4. Example 5. Example 6. Example 7. Example 8. Example 9. Example 10. We compute and discuss the results of the comparative analysis of the methods in several ways here to show the distinct roles of the performance of the proposed methods. After the derivation and theoretical error analysis of the proposed approaches in the previous section, where we observed the rapidly decreasing error patterns and distributions of the methods, ascendance in precision degrees and orders of accuracy, here we begin with the computational order of accuracy (COC) being analyzed using the following formula, defined in [
4].
whereas
N(0) means the exact result, and
N(h) and
N(2h) are the numerical results of the definite integrals with step size
h and
2h, respectively.
Table 1,
Table 2,
Table 3,
Table 4,
Table 5,
Table 6,
Table 7,
Table 8,
Table 9 and
Table 10 show the computational order of accuracy COC of all the methods for examples 1–10, respectively, against the number of strips (
), which also confirms the theoretical order of accuracy of the proposed methods. The columns below each heading of
SONC signify the computational order of accuracy of classical
SONC quadrature rules, while the columns below the heading of
MSONC1, MSONC2, MSONC3 and
MSONC4 represent the computational order of accuracy of proposed derivative-based semi-open Newton–Cotes rules. The COC indices for the
GL1 and
GL2 rules are also worked out in these tables. In the case of Examples 1–5, the order of accuracy of the modified derivative-based schemes
MSONC1, MSONC2, MSONC3 and
MSONC4 are observed as 2, 2, 3 and 4, respectively; the order of accuracy of the classical method
SONC is 1 and of the
GL1 and
GL2 rules is 2 and 4, which shows that the proposed methods
MSONC-1,2 are efficient in comparison to the conventional
SONC and compete well the
GL1 rule, whereas
MSONC-3 is higher-order accurate than
SONC and
GL1 rules;
MSONC4 shows enhanced accuracy than all others and competes well with the
GL2 rule. While the proposed rules are one-point methods, the obvious enhancement in the approximation is observed due to the fact that derivatives have been used as additional information. For Example 6, where the integrand has a derivative singularity, not only for the proposed derivative-based rules but also the derivative-free
SONC, GL1 and
GL2 rules, they could not meet with the expected order of accuracy, which is seen as 1 for
SONC and 1.5 by all others instead of 2, 3 or 4. This is because even the derivative-free methods contain the derivatives passively in the error terms; thus, singularities have an effect on the convergence of the methods. Example 6 highlights the fact that the derivative-based methods can behave similarly to the derivative-free methods in such situations, whereas for cases without singularities, the former show accelerated convergence. Examples 7 and 8 represent the periodic integrals defined in their periodic interval length. It can be seen that the proposed derivative-based
MSONC1–4 and conventional derivative-free
SONC methods show much-accelerated convergence than the usual theoretical ones, whereas the
GL1-2 methods in comparison take a bit more effort to achieve accuracy. Finally, in the case of highly nonlinear and oscillatory integrands in Examples 9 and 10, all methods show oscillatory error distributions. This is because the integrand is subject to many oscillations throughout the interval of integration, thus adding more strips, or equivalently, increasing the number of sub-intervals in the composite forms the consequent errors are moderated due to oscillations. In these examples, the proposed methods do show enhanced convergence alternatively and more frequently for increased strips as compared to the
GL1 and
GL2 rules.
We compare the absolute error distributions versus the number of strips between the new and conventional approaches. The following formula is used to examine the absolute errors [
1].
where,
and
represents the exact and approximate values (obtained by proposed methods) of the integrand.
Figure 1,
Figure 2,
Figure 3,
Figure 4 and
Figure 5 represent the absolute errors that are calculated to examine and compare the results of the classical
SONC,
GL1, GL2, and modified derivative-based
SONC methods and
MSONC1–4 versus the number of strips for the first five integrals mentioned above. Hence, these figures show the decreasing absolute error distributions for all the integrals and the trends depict the faster convergence of the proposed methods, and the order of accuracy is consistent with the derived error terms. The outcomes generated by the new methods confirm that these possess lower errors than the original ones. Particularly, the
MSONC4 behaves best of all, even the accompanying
GL2 rule with similar order of accuracy (4). Whereas the
MSONC2 and 3 are better than
SONC and
GL1 rules. For Example 6 through
Figure 6, which is with a derivative singularity of the integrand, all applicable proposed methods continue the similar improvement and exhibit lower absolute errors as strips increase against respective derivative-free
SONC,
GL1 and
GL2 rules. For the periodic integrals of Examples 7 and 8, the error drops from
Figure 7 and
Figure 8 confirm that the proposed
MSONC1–4 and the conventional
SONC rules show much-accelerated convergence than what is theoretically expected and achieve double precision accuracy quickly in fewer strips as compared to the
GL1 and
GL2 rules. This is due to the fact that Newton–Cotes rules and consequent improvements are more suitable for the periodic integrals than other methods utilizing zeros of orthogonal polynomials as nodes.
Figure 9 and
Figure 10 show an oscillatory pattern of error drops for approximating integrals in Examples 9 and 10 by all methods as expected. However, the higher order methods, without any specification that they use derivatives or not, try to hit lower errors alternatively. The
MSONC4 and
GL2 behave in this way better than other methods in Examples 9 and 10, respectively. These last two examples highlight the fact that when integrands are highly nonlinear and oscillatory, the decreasing error patterns are not that smooth and stable; however, all interpolatory quadrature methods have to compromise on accuracy regardless of the use of derivatives.
Finally, the total computational cost per integration step is observed to achieve the pre-specified error tolerance, i.e.,
mostly in regular examples, whereas bit lower in complicated integrals, and the average C.P.U time (in seconds) is also computed. Due to the higher number of function evaluations at each integration step, a quadrature rule might provide reasonable accuracy in fewer steps but could also be computationally more expensive and less effective than other approaches. First, the computational costs are determined for the methods generally in
Table 11 as the total evaluations required per strip summarized for the modified and existing methods, by which we found the computational costs of each test problem. In
Table 12 and
Table 13, we list the total computational cost for the integrals mentioned in Examples 1–6 and Examples 7–10, respectively. It is analyzed from the numerical results that the computational cost of the proposed
MSONC1–4 methods is lesser than the conventional
SONC and
GL-1 methods for examples 1–5, whereas the
MSONC-4 and
GL-2 methods are computationally closer in performance with
GL-2 taking a slight edge over the
MSONC4. It should be noted that the error drops of the
MSONC4 over shown to be smaller than those of
GL-2 in similar examples through
Figure 1,
Figure 2,
Figure 3,
Figure 4 and
Figure 5. Thus, the proposed methods are cost-effective as compared to the conventional ones and
MSONC4 competes well with the
GL-2 rule which is a two-point method and the
MSONC4 is a one-point method. For Example 6, the
MSONC1,2,4 exhibit cost-efficient behavior from
Table 12 against all derivative-free methods
SONC and
GL-1,2. Here,
MSONC4 is best of all computationally for the integral with derivative singularity. All the
SONC versions, existing derivative-free as well as the proposed derivative-based
MSONC1–4 out-perform in comparison to the
GL-1,2 rules for periodic integrals in Examples 7 and 8 from the viewpoint of achieving the double precision accuracy in lesser cost as shown in
Table 13. For the oscillatory integrals of Examples 9 and 10 through
Table 13, one can see that the
SONC,
GL-2 and the
MSONC1–4 show similar performance with the
GL-2 and
MSONC4 taking the edge over others to achieve one decimal place accuracy. However, for higher accuracy, all methods continue showing oscillatory error drops as shown in
Figure 9 and
Figure 10 already.
After computational ascendance in terms of computational costs to achieve a preset error of at most
in regular examples and slightly lower in some, we now explore the execution times as CPU times (in seconds), which are used to determine the runtime of the processor in MATLAB software for each code of the method separately to meet up the preset accuracy level. The execution times account for all evaluations: derivative as well as functional ones to finally determine the time efficiency of the methods. A salient feature to examine the execution times is to explore the concern of whether the proposed rules with derivatives add much more burden on the processor based on the fact that derivatives may sometimes be more complex in computation than the functions alone. We noted already that the proposed quadrature formulas use a lower total number of evaluations (functional as well as derivative) compared to the
SONC and some other conventional rules without derivatives in form of computational costs. The execution time helps us in proving that the amount of processing power required for functional, as well as some derivative evaluations in the proposed quadrature formulas, is not a big compromise as that required by the conventional rules with only a lot of functional evaluations.
Table 14 and
Table 15 list the CPU times (in seconds) for all methods in the case of Examples 1–6 and 7–10, respectively. We observe that in this sense as well, the proposed formulas take ascendancy over the existing derivative-free one-point methods:
SONC and
GL-1. For the two-point
GL-2 method, the results by the proposed
MSONC1–4 compare well and are mostly lower in some instances. Additionally, the average CPU time achieved by the new techniques is smaller than the average CPU time of the original
SONC method and comparable with the
GL-1,2 rules, which utilize special nodes at the zeros of Legendre polynomials, to achieve the same error. Thus, the proposed methods are time efficient as well and the numerical evidence suggests that the execution times for the derivatives are not as high as for the usual nodes.