Given two quadrature rules and with the same degree of precision , we begin by proposing a scheme to construct a new rule of higher degree. One desirable assumption is that the rules and are companion, in the sense that one can assign opposite signals to the respective error. In particular, we show that the basic quadrature rules known as midpoint, trapezoidal, and Simpson rules can all be obtained as linear combinations of companion rules of lower degree of precision. The theoretical background applied in this work relies on the method of undetermined coefficients (, p. 565), ( p. 170).
We generalize the referred scheme by presenting a rule transformation (defined in the set of rules of degree ), which to a pair of rules of , assigns a new rule of greater degree. This leads to an algorithm to obtain quadrature rules of arbitrary order of precision, as suggested in the worked examples. The rule is called the mean rule since it is a weighted mean of and . It can be seen as a least-squares best approximation as discussed in paragraph 4.1.
The main results of this paper are discussed in Section 5. We first show that if one takes a set of of open rules of degree one, , whose first member is the midpoint rule and the other members have two symmetrical rational nodes, there exists a unique linear combination of the rules such that the combined rule has degree (see Proposition 3). As an illustration we apply the composite version of the rule to obtain approximations of with 60 significant digits (Example 8) using the model function .
Finally we show that one can expand the scheme considering combined rules where the nodes of the -degree starting rules are pseudorandom rational numbers (paragraph 5.1). In particular, we use a pseudorandom -degree combined rule giving an approximation of with more than significant digits as detailed in Example 9.
2 Notation and definitions
A quadrature rule is an approximation of the integral obtained using values of (and/or its derivatives) on a discrete set of points in (see for instance ).
Without loss of generality, we consider to be the interval of integration and we will denote by a general quadrature rule to approximate the integral .
Note that a rule , defined in , can be rewritten for the interval as , through a change of variable defined by the bijection
The monomials , are denoted by , for .
(Degree of rule)
Let be an integer, ,
for oddand , for even , and let
A rule is of degree if it is exact for , with , but not exact for , that is,
In what follows,
(a.k.a. the principal moment) plays a key role and we shorten its notation to
(Sign of a rule)
Let be a quadrature rule of degree , such that
The rule is positive (resp. negative) if (resp. ).
A pair of rules of the same degree whose respective value have opposite signs are rules of particular interest. Such rules will be called companion rules.
Two rules and , of the same degree , such that and have opposite signs are called companion rules.
3 Linear combination of two rules
We now address the problem of combining a pair of companion rules and show that the resulting rule is not only a weighted mean of the two rules considered but also it has higher degree of precision. An obvious advantage of this approach is that at a minor computational cost, the value of the new rule can be closer to the integral than the values of the rules of the starting pair (see Example 2).
Let and be two rules both of degree , such that
and consider the linear combination of the rules
where is the principal moment in (1). Then, the degree of the rule is at least .
If and are companion rules of degree , such that
then the combined rule (3) has degree at least and
Proof of Proposition 1.
Both rules are exact for , with , that is, . Therefore,
So, the rule has degree at least . It remains to show that this rule is exact for which implies that its degree is at least . From (2), we have
Proof of Corollary 1.
We assume that is positive and is negative being the proof in the other case completely analogous. By definition of sign of a rule, we have and , i.e.
Let and which implies . The rule can be written as
So, the rule is a linear combination of the rules and with positive coefficients and . Consequently, the inequalities in (4) hold, and the rule is a weighted mean of the companion rules and . ∎
The well-konown midpoint and trapezoidal rules are, respectively,
For , the principal moment is
Since and , we have
Let us show that the linear combination (3) of these two rules of degree 1 coincides with the Simpson rule, which is a rule of degree .
As and , from (3) it follows
Taking into account the expressions (5), we get
which coincides with Simpson rule (see next example).
(A combined rule of degree 5 using the Simpson rule )
One easily verifies that in the (open) rule
and the Simpson rule (closed)
are both of degree . Let us show that they are companion rules, and verify that the respective combined rule (3) has degree .
The principal moment is , and
and so is positive while is negative. We have and the rule has the form
The explicit expression of the weighted mean (6) is
The rule has degree since
In order to observe the numerical improvement one can get passing from a pair of companion rules to the respective combined rule , let us approximate the following integral which will be used as a test model in the subsequent examples:
For the first rule we obtain , for the Simpson rule and for the combined rule . Thus, the respective errors are
while Once computed and the cost for computing is only an addition, two multiplications and a division. In this example an relative error in and yields to a relative error of of the rule , meaning that the combined rule is approximately 15 times more accurate than the two referred companion rules.
3.1 Families of companion two-point rules
Let be two distinct nodes belonging to , and the two-point quadrature rule
where the parameters , will be determined in order that the rule has a degree of precision at least 1.
There are infinite choices of points in the square region , for which the rule (considered as a function of ) is either positive or negative and simultaneously has degree 1;
There are more positive rules than negative ones;
The points for which has exact degree , lie on the hyperbole ,
There is exactly one (two-point) rule with degree , namely for , , that is given by
In Figure 1 the points in the square region for which the rule is either positive or negative are displayed in gray and white respectively. The boundary of this region contains points of the hyperbole in (9). For belonging to the hyperbole the rule has exactly degree one, meaning that there is an infinite number of rules of -degree each one with nodes for which the point belongs to one of the two branches of the hyperbole in Figure 1. Moreover, one immediately sees that the two-point closed Newton-Cotes rule ( and ) is a negative rule of order one, as it was assumed in Example 1. It is also worth to recall that any closed Newton-Cotes rule of any degree is negative as well, whereas the open Newton-Cotes rules are all positive.
Instead of the canonical polynomial basis of monomials of degree , we consider the basis
Imposing the condition that the rule is of degree at least 1, the parameters in (8) are computed. That is, considering and , we obtain the following triangular system in the unknowns :
The solution of this system is and . Consequently, the two-point rule
has degree at least one.
The rule applied to the nodal polynomial gives , whereas the moment . So,
Thus, the rule is of degree one and positive for the points displayed in gray color in Figure 1 and negative for the white points.
One advantage of the polynomial basis is that from the nodal polynomial onwards the rule is null and so the value of the parameter coincides with . This is the reason why we call the principal moment of the rule which also gives the sign of a rule in the sense of Definition 2.2.
The rule has degree if and only if (9) holds and it has null moment . The rule has degree 2 and is positive when and negative otherwise. The condition is given by the equation
In Figure 2, the points for which (positive rule of degree 2) are displayed in dark gray and in light gray the points with (negative rule). The boundary of the respective domains is shown in dark bold. This boundary is the algebraic curve defined by a cubic polynomial as in (11).
The intersection points of the curves and are symmetrically distributed with respect to the origin and are given by , with . In figures 1-2 these intersection points are the center of the circles in blue.
This fully justify the facts -. Analogous procedures enable us to obtain the geometry of a family of rules with three distinct nodes. Indeed, following the same lines as above, we will obtain a famous (positive) rule of degree 5, known as Gauss-Legendre rule (see for instance , Ch. 6) with three nodes, which might be be combined with the 5 degree rule given in Example 2.
3.2 Families of companion three-point rules
In , we consider the set of 3-point quadrature rules
Firstly, we obtain the weights in order that all the rules in the set have degree 2 and are either positive or negative. This will enable us to find candidates to pairs of companion rules of degree 2.
The weights can be written as functions , for . In fact, taking the polynomials
the rule has degree if and only if it is exact for and . That is, the weights are solution to the triangular system
Since we are assuming , this system has a unique solution,
Now, let us consider the polynomials
Note that the rule (13) is null when applied to , for , and so the degree of the rule is the same of the first index for which .
By construction, the rule has order
. Therefore, for any polynomial of the vector space(polynomials of degree ) the rule is exact. In particular, it is exact for the elements of the canonical basis of , that is for , with .
Since , we have , where Thus, has order exactly 2 if and order if .
Let be the following polynomial
where are given by (14).
The rule (13) is:
positive if ;
negative if ;
of degree if is a root of the polynomial equation .
Let , (see Figure 3 where the point has coordinates111After defining the polynomial expression (15), the coordinates of the point A have been found using the predicate as argument to the Mathematica  command FindInstance. ) and as in (15). Computing the ’s, given by (14) we get . Therefore the rule
is positive, with degree 2.
Considering now and (point in Figure 3) we have . Thus, the rule
is negative, with degree 2. Taking , the coefficients (3) of the combined rule are:
As and have errors of opposite sign they are companion rules (see Definition 2.3). The combined rule is
which coincides with the (open) 4-point rule
It can be verified that , for , and
Thus the combined rule is negative and of degree .
As an exercise, the interested reader can verify that for any of the points referred in Figure 3 the corresponding rule in (13) has degree 3. Thus, one may conclude that there exists an infinite set of rules of the referred type which are negative and of degree 3. Consequently, as all rules belonging to the set of open Newton-Cotes rules, , are positive, so they are good candidates to use in pairs of companion rules in order to obtain combined rules of arbitrary order.
(-point Gauss-Legendre rule of degree 5)
Taking into account the values of and , the rule (17) has degree 5 and is positive. This is the Gauss-Legendre rule with 3 nodes. In Figure 3, the points and correspond to the nodes for which the rule has degree 5.
4 The mean transformation rule
In what follows, denotes the set of rules with degree . In Proposition 1, a new rule has been assigned to a pair of companion rules belonging to . In order to generalize this scheme, let us define a transformation
where will enjoy analogous properties of the linear combination in (3), in the sense that the rule has degree greater than those of the arguments and . The rule will be called mean rule.
As before, for a given rule , we compute the quantities and , defined by
Let be the set of rules of degree and belonging to . The mean rule of and is
where and are as in (18).
The mean rule (19) has degree at least .
As the rules and have degree , we know that , for odd , and
In the case , from (20), it follows
So, has degree .
When , let us show that there exists a unique pair such that
has degree .
For , substituting in by each and applying (20), we obtain the linear system
Since this system has the unique solution
Thus, has degree at least . ∎
We now construct the mean rule of (10) and the Simpson’s rule (both rules of degree 3) and show that the mean rule has degree 5. The starting rules will be denoted by and , respectively: