A Class of Numerical Integration Rules With First Order ... · A novel approach to deriving a...

20
A Class of Numerical Integration Rules With First Order Derivatives Mohamad Adnan AI-Alaoui" Abstract A novel approach to deriving a family of quadrature formulae is presented. The first member of the new family is the corrected trapezoidal rule. The second member, a two-segment rule, is obtained by interpolating the corrected trapezoidal rule and the Simpson one-third rule. The third member, a three-segment rule, is obtained by interpolating the corrected trapezoidal rule and the Simpson three-eights rule. The fourth member, a four-segment rule is obtained by interpolating the two-segment rule with the Boole rule. The process can be carried on to generate a whole class of integration rules by interpolating the proposed rules appropriately with the Newton-Cotes rules to cancel Out an additional term in the Euler-MacLaurin error formula. The resulting rules integrate correctly polynomials of degrees less or equal to n+3 if n is even and n+2 if n is odd, where n is the number of segments of the single application rules. The proposed rules have excellent round-off properties, close to those of the trapezoidal rule. Members of the new family obtain with two additional fianctional evaluations the same order of errors as those obtained by doubling the number of segments in applying the Romberg integration to Newton-Cotes rules. Members of the proposed family are shown to be viable alternatives to Gaussian quadrature. Key words: Numerical integration. Interpolation. Round-off error. Truncation error. Simpson's rule. Trapezoidal rule. Boole's rule. Newton-Cotes rules. Gaussian quadrature. Romberg integration. * Tile author is with tile Department of Electrical and Computer Engineering, American University of Beirut, Beirut, Lebanon. This work was supported in parl by The University Research Board of the American University of Beirut. 25

Transcript of A Class of Numerical Integration Rules With First Order ... · A novel approach to deriving a...

A Class of Numerical Integration Rules With First Order Derivatives

Mohamad Adnan AI-Alaoui"

Abstract

A novel approach to deriving a family of quadrature formulae is presented. The first member of the new family is the corrected trapezoidal rule. The second member, a two-segment rule, is obtained by interpolating the corrected trapezoidal rule and the Simpson one-third rule. The third member, a three-segment rule, is obtained by interpolating the corrected trapezoidal rule and the Simpson three-eights rule. The fourth member, a four-segment rule is obtained by interpolating the two-segment rule with the Boole rule. The process can be carried on to generate a whole class of integration rules by interpolating the proposed rules appropriately with the Newton-Cotes rules to cancel Out an additional term in the Euler-MacLaurin error formula. The resulting rules integrate correctly polynomials of degrees less or equal to n+3 if n is even and n+2 if n is odd, where n is the number of segments of the single application rules. The proposed rules have excellent round-off properties, close to those of the trapezoidal rule. Members of the new family obtain with two additional fianctional evaluations the same order of errors as those obtained by doubling the number of segments in applying the Romberg integration to Newton-Cotes rules. Members of the proposed family are shown to be viable alternatives to Gaussian quadrature.

Key words: Numerical integration. Interpolation. Round-off error. Truncation error. Simpson's rule. Trapezoidal rule. Boole's rule. Newton-Cotes rules. Gaussian quadrature. Romberg integration.

* Tile author is with tile Department of Electrical and Computer Engineering, American University of Beirut, Beirut, Lebanon. This work was supported in parl by The University Research Board of the American University of Beirut.

25

I. Introduct ion

The problem of numerical integration, or quadrature, is that of estimating the number b

I ( f ) = I f ( t ) d t (1) O

with [a,b] finite, [5], [9-12], [14-16], [18-19], [22], [24], [26], [28-29].

The fundamental theorem of calculus proves that the definite integral of a function that has an antiderivative exists and has a value equal to the difference of the values of the antiderivative evaluated at the upper and lower limits of the integral. However, since most integrands do not have antiderivatives expressible in terms of known functions, methods of approximating the definite integrals are employed. There are also occasions for which the analytical form of the integral is known but is too expensive to evaluate and it is cheaper to evaluate it using a quadrature technique, polynomial approximation is often used, with f(t) replaced by an approximating polynomial p(t). Among the most popular methods for approximating the evaluation of the definite integrals are the trapezoidal rule and the Simpson rules.

To improve the approximation, the interval of integration is subdivided into smaller subintervals, or segments, and multiple-application versions of the above rules, often called the composite rules, are employed. Increasing the number of segments results in decreasing the error until the round-off errors begin to dominate and the error begins to increase. In addition, increasing the number of segments increases the computational effort. Hence, if high efficiency and low errors are required, it is advisable to use the Romberg integration to obviate the shortcomings of the traditional rules. The Romberg integration generalizes the Richardson's extrapolation which consists of weighting the results obtained from using different numbers of segments. This latter approach yields lower errors but does not necessarily achieve a higher efficiency since the number of segments is not necessarily reduced drastically [5], [9-12], [14], [16], [18-19], [22], [24], [26]. Members of the new family achieve both higher efficiency and lower errors than those possible by using the multiple application Newton-Cotes rules. The round- off properties of the proposed rules are close to those of the trapezoidal rule. In addition polynomials of degrees less than or equal to five are integrated correctly by the two-segment and three-segment rules while polynomials of degrees less than or equal to seven are integrated correctly by the four-segment rule. Thus for four or less segments the members of the new class yield error expressions that are better or equivalent to those obtained for Gaussian integration. The new rules are competetive with the Romberg integration applied to the traditional Newton- Cotes integration formulas, for with two additional functional evaluations they achieve what the Romberg integration would achieve by doubling the number of segments. The examples show that the new rules are competetive with Gaussian quadrature.

26

II. T h e B a s i c C o n c e p t

The author's interest in differentiators and integrators resulted in the design of analog and digital differentiators and integrators that simulate numerical differentiation and integration [1-8]. The relationships between numerical and digital integrators was noted earlier by Hamming [16- 17]. In this paper, observations of the frequency responses of digital integrators are reflected in the design of the proposed numerical integrators.

The basic concept for the development of the proposed numerical integration rules came from observing that the ideal integrator absolute magnitude response versus frequency lies between the responses of the trapezoidal rule and the Simpson rule [16], [6], [8]. The initial research started with interpolating the trapezoidal and Simpson integration rules motivated by the results in [8]. The final outcome of the research, however, is a class of integration rules that result from the cancellation of a term in the Euler-Maclaurin error formula for each rule as compared to the Newton-Cotes rules with the same number of segments. The first member of the class is the corrected trapezoidal rule.

The first four members of the class are shown below for n = 1, 2, 3, 4. Where n

designates the number of segments and h = (b - a____~). Note that n is also used later to designate the n

number of segments in the composite rules. All the following rules, including the derived rules, have truncation errors of the form

E" = Chkf(k)(r l ) + higher-order-wmls , (2)

where C is a constant, k is an integer, and rl is in [a,h]. The rules assume that f ( t ) is

k continuously differentiable in [ a ,b ] and thus are guaranteed to converge as n--+oo, where n refers to the number of panels in a composite rule, provided that the norm of the derivatives remain finite.

1) n = 1' (b - a) 2

I i ((f) - (b-a------~[f (a)+ f (b)] + [ f ( l ) ( a ) - f(1)(b)] 2 12

h4(b-a)f(4)(q) 4 +- higher - order" - terms.

720

(3)

2) n =2: 7h 16 a + b

I2 (f) = -i~[ f(a) + -~- f ( - -~--) + f(b)] + h2 "(') f(l) (b)] l [t (a)-

h 6 (b - a ) f (6) ( r h ) h 8 ( h - - a).f (8) (q2) 9450 75600

+ higher- order - terms.

(4)

27

3) n=3"

3h 13 ( f ) = ~-7[13f(a)

bU

3h 2 + 27 f (a + h) + 27 f (b - h) + 13f (b)] + - ~ - [ f (1) (a) - f (1) (b)]

3h 6 (b - a ) f (6) (rl)

11,200 ~- higher - order - terms. (5)

4) n = 4:

2h 31 512 144 a+b 512 31 I 4 ( f ) = -~-[-~- f (a) +-~-i- f (a + h) +-~- f (2-~-) +-~-i- f (b- h) + :~ f (b)]

4h2 fO) 12hS(b-a)f(8)(q) +higher-order-terms. + i f ( a ) - (b)] +

63 297,675

(6)

III. T h e T w o - S e g m e n t Intel~ration R u l e

The first error terms of the corrected trapezoidal integration rule and the Simpson integration rules involve the fourth derivative and are of opposite signs. The proposed two- segment integration rule is obtained by combining the corrected trapezoidal rule with the Simpson one-third rule. The error formulas for the resulting rule involve the sixth derivative while those of the constituent rules involve the fourth derivative. In the following, the traditional rules and their properties are presented in a) and b) while the proposed rule is developed in c).

a) The Corrected Trapezoidal Rule: The simple trapezoidal rule is based on approximating f ( t ) of equation (1) by a straight line

(a,f(a)) and (b,f(b)). Adding the first error term to the trapezoidal rule results in the following corrected trapezoidal rule [9], [11].

(b -- a ) 2 (1 i i Or ) _ (b - a ) [ f (a ) + f (b ) ] + [ f ( l ) (a) - f ) (b)], (7)

2 12

where f(i)(13 ) denotes the ith derivative of f(t)evaluated at t= 13. The corrected composite

trapezoidal rule is obtained by breaking up the integral into a sum of integrals over small subintervals and then applying the above rule to each of these smaller integrals. The resulting corrected composite trapezoidal rule is

n-I

II Q]c) = h Q]ci)-- (f0 + f . ) + - i - ~ - [ f ( l ) ( a ) - f ( 1 ) ( b ) ] ,

i=l

(8)

28

where n is an integer such that, b - a

n>l, h= t . = a + / h and .//_. =f(tj__ ) n J "

The error of the composite corrected trapezoidal rule is [8]

E l = IC/" ) - I[' ( f ) = f (4)(rl)h 4 (b - a) " + higher - order - terms 720

(9)

for some 1"1 in [a,b].

The error of the composite corrected trapezoidal rule could also be expressed by the following asymptotic error formula [26]

n n h4 E l = l(:)- ]I (:)= 7~[.]~} 3) f(3) ./o ] + higher- order- temps. (10)

The above error formula may also be written as

El' = E: '4 + higher- order - terms. (11)

b) T h e S i m p s o n Rule:

The Simpson one-third rule, which will be denoted simply as the Simpson rule, interpolating polynomial to approximate f(t) on [a,b] and results in

l . , . ( f ) = h l f ( a ) . ( a + b ' +4f~ -~---J +f(h) 1 •

where, h - (b - a ) 2

uses a quadratic

(12)

h /.'s.' (.f) = ~- [f0 + 4f l + 2../2 + 4f3 + 2 f4 +-.. +2.~,- 2 + 4.£,_ 1 + Z, 1"

The composite Simpson rule is given by where n and k are integers such that,

b - a n : 2 k , k_>l h - , t i = a + j h and f j = f ( t j ) .

n

The above equation can be written more compactly as

n/2

I; = ~ Z [f2./-2 ÷ 4.:2./-I + .:2./]" (I 4) ./=1

(13)

29

The error of the composite Simpson rule is given as [6]

E~' = l ( f ) - I~" ( / ` ) = - h 4 (b - a ) f (4) (rl)

180 + higher order terms, (15)

for some ~ in [a, b]. The error could also be expressed by the following asyrnptotic error formula [9]

h 4 E," = 180 [./,-(3) (b) -./-(3) (a)] + higher - order - terms. (16)

The above equation could be expressed as

E~ = ~..h4 --s + higher order terms. (17)

c) The Two-Segment Rule, I~

The two-segment integration rule, I~ is obtained by combining the corrected composite trapezoidal rule with the composite Simpson rule in such a fashion that the error contributions of

E~' and of E.~" cancel out. Note that n should be restricted to being even for meaningfial interpolation, since n is always even for the Simpson rule. The two-segment integration rule can be obtained as follows

n n I, =cd.,". + ( 1 - o 0 I , . (18)

Solving for ot in the equation

~4 h 4 orE.. + ( I -o r )E , =0, (19)

yields the value ot = 0.2, from the resulting solution.

The resulting composite two-segment rule is

ln=~k =02in=2k +0.8i,,=2k k > l . 2 • s I ' - -

(20)

The simple two-segment rule is obtained from the above composite rule with the value of n taken as 2.

The error of the cornposite two-segment rule, E~ , may be expressed as

30

n = 0 n n (21) E 2 .2E, + 0.8El.

Thus for the composite two-segment rule the resulting error is obtained by adding the error contributions of the higher order terms of the composite corrected trapezoidal rule ,[18, p.302],[24, p. 117], to the error contributions of the higher order terms of the composite Simpson rule [9]. The resulting asymptotic error formula is

0.2h6 [f(5) _ f(5) 0.8h6 [f(5) f(5) E 2 - - - (b) (a)] - - (b) - (a)]. (22) 1512 30,240

Simplifying the above equation and adding the contribution of the next higher term we obtain _ 6 h 8 [f(7) (b ) - f(7~ (a)] h (57 fo) (a)] - (23)

En 9 ~ 0 [f ( b ) - 75600

This implies that the error should be reduced by a factor of 26=64, as h is halved. An alternative form for the error is

h6 (b - a)f(6)('rll ) hS(b- a)f(8)(rh) E~ = 9450 75600 for some rl~ 's in [a, b]. (24)

From this it is seen that E~ = 0 if fit) is a polynomial of degree _<5 . It should be noted that the error term of equation (24) is the same as that of the Boole rule except for a constant multiplier. The constant multiplier corresponding to the new rule is smaller than that of the Boole rule by a factor of 20. The two-segment rule is clearly superior to its constituent rules as derived above and as demonstrated by the following examples. The simple form of the resulting two-segment rule is

I , ( f ) = 7 h [ f ( a ) + 1 6 a + b h2[ f ( ' ) ( a ) - 15 -~- f(--~--) + f(b)] + f(')(b)], (25)

where h = ( b - a) 2

The resulting composite rule is given by

n/2 , 7h Z 16 h 2 12 = 1~ [ f 2 j - 2 +-~-.f2.i-I + f 2 j l + - ~ - [ f ( 1 ) ( a ) - f ( l ) ( b ) ] ,

j = 1

(26)

where n = 2k, k _> 1, b - a

h - , t j = a + . j# and f j = f ( t j ) . tl

Note that the simple rule is obtained from the composite new rule by using n = 2.

31

It is remarkable that this rule was derived by Cornelius Lanczos in 1956, [19] pp. 414-418, using a different approach. The derivation presented in this paper is simpler and more direct than that of Lanczos. Lanczos derivation is not widely known and most of the literature mention the Simpson rule with end corrections using second order derivatives [5], [9-12], [14], [16], [18], [22], [24], [26]. One factor that works against the use of high order Newton-Cotes formulas is that the higher order formulas show greater fluctuation of the weights and larger round-off errors. It will be shown that the round-off properties of the members of the proposed class are closer to the round- off properties of the trapezoidal rule. The two-segment rule round-off properties are better than those of the Simpson rule and close to those of the trapezoidal rule. This is to be expected since the new rule is eighty percent trapezoidal. An estimate of the value of round-off error can be measured by computing the sum of the square of the weights of f(t) in the integration formula [12], [25]. The sum of the squares of the coefficients in the composite trapezoidal rule is

h2(n ; ) , while the sum of the squares of the coefficients in the composite Simpson rule is

h2(1~ n ~ - ] = h 2 ( 1 . 1 1 1 1 n - 0.2222).Thesumofthesquaresofthecoeff icientsinthe

composite new two-segment integation rule is h2(1.0044n - 0.4356), which is closer to the value corresponding to the composite trapezoidal rule.

IV. The Three-Segment Integration Rule

The proposed three-segment integration rule is obtained by combining the corrected trapezoidal rule with the Simpson three-eights rule. The error formulas for the resulting new rule involve the sixth derivative whereas those of the constituent rules involve the fourth derivative. In the following the three-eights rule is presented in a) while the new rule is developed in b).

a) The Three-Eights Rule

The third of the Newton-Cotes rules is obtained by fitting a third order Lagrange polynomial to four points. This rule is often called the Simpson three-eights rule and will be denoted simply as the three-eights rule. The simple form of the rule is

13/8 (f)=3h8-~f (a)+3 f (a+h)+3 f (b-h)+ f (b)]. (27)

The composite three-eights rule is n/3

,, Z ij,; 3 I3/s = + 3.~j_2 + 3./;./_1 + ./;j], j=l

where, n = 3k, k _> 1, that is n is restricted to be a multiple of 3,

h= b-a , t .=a+/h andf ,=.l ' ( t j ) . n .1 • " ./

(28)

32

The error formula for the 3/8 rule is given by

,, h 4 (b E3/8 _ - a).1,.(4) (rl) + higher- order- terms,

8O

for some ri in [ a , b ]. The error could also be expressed as

E~l/8 L 7"h4 = ~3/8 + higher- order- terms.

(29)

(30)

b) T h e T h r e e - S e g m e n t R u l e 13 : The three-segment rule is obtained as follows

I~ = c d ~ / 8 + ( 1 - a ) I ~ .

Solving for oc from the equation

(31)

a - h 4 (b-a) f ( 4 ) (zT)+(l_ a ) h 4 (b-a) f ( 4 ) (V)=0 ' 80 720

yields the value ot = 0.1 from the solution.

(32)

The resulting asymptotic error formula is 0.1h 6 0.9h 6

E~ - [ f (~(b) - f(5~(a)] 3360 30,240

_ _ [f(5)(b) - f(5)(a)] (33)

Simplifying the above equation yields

E n _ 3h 6 [f(5)(b ) _ fcS)(a)] " 3 11,200" - -

(34)

This implies that the error should be reduced by a factor o f 36 if h is reduced to one third of its value. An alternative form of the error is

3h 6 (b - a ) f (6) (rl) E~ = (35)

11,200

for s o m e r / i n [a,b]. From this it is seen that E~ = 0 if f(t) is a polynomial o f degree less than or equal to five. It should be noted that the error term of equation (35) is the same as that o f the Boole rule except for a constant multiplier. The new rule is smaller by a factor o f almost eight.

F o r n =3 the following simple form of the new rule is obtaind

qh 13 ( f ) = - " [ 1 3 f ( a ) + 2 7 f ( a + h) + 2 7 f ( b - h) + 13 f ( b ) ] + ~'--Z--" [ f (1) (a ) - . ) 4"(1) (b)]. (36)

80 " " 4 0 "

33

The composite form of the three-segment rule is

i3 = _ .~ j= ,n S ''n/3 ~-~[13h 3f3j_3 +27f3j_2 +27f3j_l +13f~j]+ [ f ° ) (a ) - f ( ' ) (b ) ] ,

where n is a multiple of three, h= b - a , t .=a+jh, and Jf~='f(tJ)" n J

(37)

Note that the simple form of the three-segment rule is obtained from the composite new rule by letting n = 3.

The round-off properties of the three-segment rule are closer to those of the composite trapezoidal rule, since the new rule is ninety percent trapezoidal. The sum of the squares of the

coefficients in the composite three-eights rule is h2(1 .0313n - 0.2813) while the sum of.the

squares of the coefficients of the composite three-segment rule is h 2(1.0003n - 0.4753). Thus

the three-segment rule has even better round-off properties than the two-segment rule.

V. The Four -Segment Integration Rule

The error terms of the two-segment rule and the Boole rule involve the sixth order derivative and are of opposite signs. The four-segment integration rule is obtained by combining the two- segment rule and the Boole rule. The error formula for the resulting new rule involves the eighth derivative. In the following the Boole rule properties and how it compares with the two-segment and three-segment rules developed above is presented in a), while the four-segment rule is developed in b).

a) The Boole Rule

The Boole rule is the fourth of the Newton-Cotes rules. It is obtained by fitting a fourth order Lagrange polynomial to five points. The simple form of the rule is

2h = . . 2 f (:-~--) + 3 2 f ( b - h ) + 7 f (b ) l . lB(.f) _~517 f (a) + 32 f (a +h) + l " __a +b

The composite form of the Boole rule is

(38)

,,/4 2h I~(f) = Z ~-[Tf4j_ 4 + 32f4j_ 3 + 12f4j_ ~ + 32f4j_ , + 7f4j],

j- |_

where n = 4k, k _> 1, that is n is restricted to be a multiple of 4,

b - a h -

11 - - - , tj = a +.jh and .fj = f ( t j ).

The error formula for the Boole rule, negecting higher order terms is given by

(39)

34

2h6(b - a) hS(b - a) f(8) E~ - f(6) (1"1) a (rl)

945 900

for some rl in [ a, b ].

The error could also be expressed by the following asymptotic error formula

(40)

EB-" 2h694--5 [ f ° ) ( b ) - f °) (a)] + [f(7) ( b ) - f(7) (a)] ' (41)

The error terms of the two-segment rule and the Boole rule are of the same order. Comparing the first error term of equation (24) with that of equation (40), it is found that the two error terms differ only by a negative constant multiplier and that the error of the two-segment rule is smaller in magnitude than that of the Boole rule by a factor of 20. For the three-segment rule, comparing (35) with (40), it is found that the error of the new rule is smaller in magnitude than that of the Boole rule by a factor of 7.9012.

b)The Four-Segment Rule, 14

The first error terms of the Boole rule, the two-segment and three-segment rules involve the sixth derivative and are of opposite signs. A four-segment integration rule is obtained by combining the Boole rule with the two-segment rule in such a fashion that the first error terms of equations (24) and (40) cancel out. The derivation is similar to that carried out in equations (18)-(24). The resulting new integration rule is given by

i~ k 20i.=4k 2~ -- " = + I~ =4k , k > 1 21 2 (42)

The simple form of the rule is

2h 31 + 5 1 2 f ( a + h ) + _ ~ _ f ( T ) + 5 1 2 _ ~ _ 31 i4 ( f ) = _4_~ [__~f (a) 144 a + h •

4h2 - 0 ) + [.] ( a ) - f ( l ) ( b ) ] ,

63

(43)

where h - ( b - a) 4

35

The resulting composite rule is given by

n/4 2h 31 512 _ 144 _

I~' ((f) = 2 - z "~'[-~- f4j-4 + -~-.]4.i-3 + -~-.]4j-2 j=l

4h 2 + - - [ f (1)(a) (b)],

63

512 _ + -2-i .t4 -1

31 + 5 -A j]

(44)

w h e r e n = 4 k , k > l , h - - - b - a

t l , t j : a +. jh and f j = f ( t j ) .

The resulting error formula is obtained from substituting equations (20) and (36) in (38), which yields

12h8 (b - a)f~(n) n g 4 = ( 4 5 )

297675

The error expression in (45) is of the same form as that of the six segment Newton-Cotes rule, but smaller by a factor of ahnost 160. The round-off properties of the four-segrnent rule are closer to the trapezoidal rule since it is about ninety five percent a two-segment rule which in turn is ninety percent trapezoidal. The sum

of the squares of the coefficients of the Boole rule is h 2 ( 1 . 1 7 9 3 n - 0 . "1936) , while the sum of

the squares of the coefficients of the composite four-segment rule is h 2 ( 1 . 0 0 7 0 n - 0 . 4 7 . 1 8 ) .

VI. Comparison With The Romberg Integration and The Gaussian Quadrature

In comparison with the Romberg integration, it is found that the proposed rules, with two additional functional evaluations, achieve error expressions of the same order as those achieved by doubling the number of segments, ahnost doubling the number of functional evaluations, using the Romberg integration. The Newton-Cotes Integration rules are exact for polynomials of degree n + 1, if n is even and for polynomials of degree 11 when n is odd, where n is the number of segments of the single application rules. The rules of the new family are exact for polynomials of degree n +3 if n is even and for polynomials of degree n +2 if n is odd. The Gaussian integration rules are exact for polynomials of degrees < 2 n - 1, where n is the number of the nodes. The two-segment rule, i.e. three nodes, is exact for polynomials of degrees < 5 which makes it equivalent to the Gaussian

36

rules with 3 nodes. The new four-segment rule, i.e. five nodes, is exact for polynomials of degree _< 7 which makes it equivalent to the Gaussian rules with four nodes. Gaussian quadrature formulas of high order suffer even more than the Newton-Cotes formulas from having high order derivatives in the error terms. Additionally, the sum of the squares of the coefficients of the Gaussian quadrature formulas of high order is greater than that corresponding to the composite new rules. This is because the higher formulas have the tendency to greater fluctuation of the weights as the order increases [11],[25]. Thus, it is advisable to use composite rules using Gaussian quadrature formulas of low order. That is, we can break up the interval into subintervals and use a Gaussian formula in each subinterval. Note that we do not get the advantage of having some of the abscissa common to two subintervals as in the case of the Newton-Cotes formulas. In this case the new rules with their higher accuracy provide viable alternatives to Gaussian quadrature. In the examples the proposed rules are indeed shown to be competetive with the Gaussian quadrature formulas of high order.

VII . E x a m p l e s

The computations were carried out using Mathcad 5.0 on an IBM-PC compatible 486-DX2 running at 66 Mhz. The machine epsilon is 2.77E-17. Mathcad has a maximum of 15 significant digits, and all the computations were carried out using 15 significant digits. Examples 1-3 verify the theoretical expectations of the proposed rules. Tables 1-3 summarize the results. They show the results and the relative errors obtained from applying the Boole rule, the Gauss-Legendre quadrature, the two-segment rule and the four-segment rule. It is to be noted that n represents the number of nodes for the Gauss-Legendre quadrature and the number of segments for the other rules. The results of the application of the three-segment rule is not shown since they are similar to those of the two-segment rule. However, the three-segment rule should be considered when low round-off error is desired, since its round-offerror properties are close to those of the trapezoidal rule. The tables also display the Relative Error ,E n ,for each of the rules where

Relative Error = True Value - Computed Value (46) True value

Example 1. This example is used by Smith [27]. In it the integrand is f(x)=cosx, and is integrated over the interval [0, 1 ]. Thus the integral to be evaluated is

I = [lcos xdx (47)

It is significant that with 64 segments the relative error is less than that obtained by using the traditional trapezoidal and Simpson rules with 1000 segments or even 10,000 segments as reported by Smith. For this example the proposed rules are clearly superior to the Gaussian quadrature.

37

Example 2 . The integral to be evaluated is

1.4 1 I = • - - dx (48)

a-4 l + x 2

The value of the above integral is I = 2arctan(4) ~ 2.651635327336065. Table 2 shows that the new rules converge in a manner similar to that of the Gaussian quadrature with a slight edge for the proposed rules for small n.

Example 3. This example is used extensively by Atkinson [9]. In it the integrand is f(x)=eXcosx and is integrated over the interval [0, 7t]. Thus the integral to be evaluated is

I = e cos(x)dx. (49)

(e" + 1) The true value of I is I - - - - ~ - 1 2 . 0 7 0 3 4 6 3 1 6 3 8 9 6 3 . Table 3 shows that although the

2 Gaussian integration is better for small n. The proposed rules give better results for large n.

V I I I . C o n c l u s i o n

This paper presents a novel class of numerical integration rules. The first member of the class is the corrected trapezoidal rule. The second and third members of the class, a two-segment and three-segment rules, are obtained by interpolating the corrected trapezoidal rule and the Simpson rules so that their error O(h 4 ) terms cancel out. The resulting rules have an O(h 6) errors and the errors are proportional to the sixth derivative. The fourth member of the new class is obtained by interpolating the second member of the new class with the Boole rule so that their O(h6)error terms cancel out and the new rule has an error O(h 8) and is proportional to the eighth derivative. The process can be carried on to generate a whole class of new integration rules by interpolating the new rules appropriately with the Newton-Cotes rules to cancel out an additional term in the Euler-MacLaurin error formula. The salient points of the proposed rules are: 1. The proposed rules, like the Newton-Cotes rules, are equal segment rules so they can be applied where Gaussian rules would be inappropriate. 2. The proposed rules were shown to have excellent round-off error properties, close to those of the trapezoidal rule. This make them viable alternatives to Gaussian quadrature, as demonstrated by the examples. This is due in part to the fact that Gaussian quadrature formulas of high order suffer from having high order derivatives in the error ten-ns even more than the Newton-Cotes rules [9], [25].

38

3. The proposed rules obtain with two additional functional evaluations the same order of errors as those obtained by doubling the number of segments in applying the Romberg integration to the Newton-Cotes rules. 4. Applying the Romberg integration to the proposed rules could make them more competetive with the Gaussian quadrature. 5. The proposed rules cannot be applied when the integrand first derivative has singularities at the upper or lower limits. However, an approximation of the derivative may be used. Polya has proved that for continuous functions with singularities in derivatives, the tapezoidal and Simpson rules and others of similar types should converge to the correct integral [23]. Polya's remarks are applicable to the new rules since they are obtained by interpolating the traditional rules. As an alternative Davis shows, by a generalization of the Peano kernel formulation, that the traditional integrals converge, and thus so do the new rules [12]. Lyness and Ninham show that for integrands with algebraic and/or logarithmic singularities, it is often possible to obtain an asymptotic error expansion [20]. 6. The proposed rules exhibit rapid convergence for periodic integrands, this is due to the fact that they are close to the trapeziodal rule in their properties. This was verified for the integral

I = emS(X)dx and the results were omitted for brevity. Donaldson and Elliot had ~0

demonstrated the superiority of the trapezoidal rule for periodic integrands [ 13].

Acknowledgment

It is a pleasure to thank Professors Thomas Kailath and C. L. Nikias for providing the atmosphere conducive to research by inviting me to spend the summers of 1991 and 1993 at Stanford's Information Systems Lab. and the USC Signal and Image Processing Institute, respectively. Thanks are also due to S. Maad, D. Matar and M. Shmaitelly for their help in running the examples.

39

R E F E R E N C E S

[1] M. A. Al-Alaoui, "A Stable Differentiator With a Controllable Signal-to-Noise Ratio", IEEE Transactions on Instrumentation and Measurement, Vol. 37, No. 3, pp. 383-388, September, 1988.

[2] M. A. AI-Alaoui, "A State Variable Approach to Designing a Resistive Input, Low Noise, Noninverting Differentiator", IEEE Transactions on Instrumentation and Measurement, Vol. 38, No. 4, pp. 920-922, August, 1989.

[3] M. A. AI-Alaoui, "A Novel Approach to Designing A Noninverting Integrator With Built-In Low-Frequency Stability, High-Frequency Compensation and High Q", IEEE Transactions on Instrumentation and Measurement, Vol. 38, No. 6, pp. 1116-1121, December, 1989.

[4] M. A. AI-Alaoui, "A Novel Differential Differentiator", IEEE Transactions on Instrumentation and Measurement, Vol. 40, No. 5, pp. 826-830, October, 1991.

[5] M. A. AI-Alaoui, "Novel Approach to Designing Digital Differentiators," Electronics Letters, Vol. 28, No. 15, pp. 1376-1378, 1992.

[6] M.A. AI-Alaoui, "Novel Digital Integrator and Differentiator," Electron. Lett., Vol. 29, No. 4, pp. 376-378, 1993. (See also ERRATA, Electron. Lett., Vol. 29, No. 10, pp. 934, 1993.)

[7] M. A. M-Alaoui, " Novel IIR Differentiator From The Simpson Integration Rule", IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, Vol. 41, No. 2, pp. 186-187, February 1994.

[8] M. A. AI-Alaoui, "A Class of Second Order Integrators and Lowpass Differentiators," IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, vol. 42, no. 4, pp. 220-223, April 1995.

[9] K E. Atkinson: An Introduction To Numerical Analysis Ch.5, Second Edition. New York, NY: John Wiley & Sons, 1989.

[10] S. C. Charpa and R. P. Canale: Numerical Methods for Engineers, Ch.15, Second Edition. New York, NY: McGraw-Hill, 1988.

[11] S. D. Conte and Carl de Boor: Elementary Numerical Analysis, Ch.7, Third Edition, New York, NY: McGraw-Hill, 1980.

[12] P. J. Davis and P. Rabinowitz: "Methods of Numerical Integration ", Second Edition. New York, Academic Press Inc., 1984.

[13] J. Donaldson and D. Elliot, "A unified approach to quadrature rules with asymptotic estimates of their remainders", SIAM J. Numer. Anal. 9, pp.573-602, 1972.

40

[14] G. E. Forsythe, M. A. Malcolm and C. V. Moler: Computer Methods for Mathematical Computations, Ch 5. Englewood Cliffs, NJ: Prentice-Hall, Inc.,1977.

[15] L. Gillman, "An axiomatic approach to the integral", The Aunerican Mathematical Monthly, Vol. 100, No. 1, pp. 16-25, January 1993.

[16] R. W. Hamming: Numerical Methods for Scientists and Engineers. New York, NY: McGraw-Hill, 1972.

[17] R. W. Hamming: Digital Filters, Second Edition. Englewood Cliffs, NJ: Prentice-Hall, 1983.

[18] F. B. Hildebrand: Introduction to Numerical Analysis, Second Edition. New Delhi: TATA McGraw-Hill, 1974.

[19] C. Lanczos: Applied Analysis Ch. VI, New York, Dover Publications Inc., 1988.

[20] J. Lyness and B. Ninham, " Numerical quadrature and asymptotic expansions", Math. Comput. 21, pp. 162-178, 1967.

[21] M. Mori and R. Piessens, ed. : Numerical Quadrature, North-Holland, 1987.

[22] S. Nakamura: Applied Numerical Methods in C, Ch.4. Englewood Cliffs, NJ: Prentice-Hall, 1993.

[23] G. Polya, "Uber die Konvergenz von Quadraturverfahren." Math. Z., 37,pp. 264-268, 1933.

[24] W. P. Press, B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling : Numerical Recipes. Cambridge University Press, 1986.

[25] A. Ralston, "Methods for Numerical Quadrature," pp. 242-248 in Mathematical Methods for Digital Computers. Edited by A. Ralston and H. S. Wilf. New York: John Wiley & sons, Inc. 1960.

[26] F. Scheid: Theory and Problems of Numerical Analysis, Ch. 14 : New York, NY: Schaum's Outline Series, McGraw-Hill Inc., 1968.

[27] J. T. Smith: C++ Applications Guide, Ch.4. New York: McGraw-Hill, 1992.

[28] S. K. Stein, "Do estimate of an integral really improve as n increases?" , Mathematics Magazine, Vol. 68, No. 1, pp. 16-26, February 1995.

[29] J. Wimp, "Quadrature with generalized means", American Mathematical Monthly, Vol. 93, No. 6, pp. 466-468, June-July 1986.

41

E

I

0

~b

" ~ 0

c~l 00

m o

0

~ X

~ W

II

u E < ~ • ~.~

N

i ~ C ~ "~" "-~ "~ " ' ~

I I : I I I I I

E i ,

! ' ~ - i O a', a', a', 0", a'~ 0 i r " - I 0 0 0 0 0

, ~ O,O ~ ~ ~ * l . . . . . .

i

i

m 0

~ -~-~ 0 "~::~" I'-1 t . ~

o ~ o o o o

0 0 0 0 0

42

r~

!

0

E

o....

N

' ,D

~ m

m ~

~ m

c¢-i

% , - ~ t ¢ ' 3

0 ' ,D o c-i

0 m ° ~

E >

o E

c.i ~

L

0

| o o c ~

m

,1"1

~ o

@o

t ~

~D i t3

o o

c ~ o o

=

c ~

0

m

O~ @o

c ' 4 : ~ it")

¢ ~ c-41

, o o

¢~1 o o

o o "~-

o o

c ~

o o

0

0

c q

o o I '~ o o c ~

¢'~ ¢'4 ¢'-1

~ o,3 ¸

c~3 0

'c~'~

14,,"~ i it")

,r") it"l it'3

• • °

c ~ c'4 c '4

o o

4 3

2

i

0

N ~

~ 0

0

0 ~

0 ~

0 M ~ v

>

0

I

c.... ,c~ 0 L~ T-.q

, r q f,,I ~'-.I t"q ~",11",1

~ O0 0 I"~- O0 I¢~ ,--~

E t..,,I t ~ l O0 , ~ - - O0

~ , 0 ~ ~ 0 f",-I ~ ,--~

0

O 0 0 0 0

J

% m

t..,,l i¢-.~ ~,D ~ 0 r',.ll

0 , r~ " ~ - ; r - - - ",.o

~ ~ ~ ~ r , ~

@c

44