An Euler-Maclaurin-Like Summation Formula for Simpson's Rule

An Euler-Maclaurin-Like Summation Formula for Simpson's Rule

An Euler-Maclaurin-like summation formula for Simpson’s rule S.K. Lucas James Madison University Harrisonburg, VA 22807 [email protected] One of the most popular numerical integration formulas is the composite Simpson’s rule, which is derived in every numerical analysis textbook (and many Calculus texts) as n/2−1 n/2 b h f(x) dx = f(x )+2 f(x )+4 f(x − )+ f(x ) 3 0 2j 2j 1 n a j=1 j=1 Z X X (1) (b − a)h4 − f (4)(ξ), 180 where n is even, h = (b − a)/n, xi = a + ih, and ξ ∈ (a, b). We usu- ally derive (1) using Lagrange polynomials or making the formula exact for f(x)=1, x, x2. A standard exercise for a numerical analysis class is to use the composite Simpson’s rule to approximate an integral with n equal to successive powers of two, and verify that (as long as the fourth derivative of f is well behaved) the errors reduce by a factor of sixteen due to the h4 term. 1 4 dx Recently I assigned this exercise with the integral 2 = π. Imag- 0 1+ x ine my surprise when the ratio of errors was not sixteenZ as expected, but sixty four! Clearly in this case the h4 error term has been eliminated and the error is in fact order h6. But why? What follows resurrects an alternative form of the error term for Simp- son’s rule, and uses it to explain the behavior of this integral. In the process a new derivation of the Euler-Maclaurin summation formulas follow naturally. The derivation is then extended to derive an Euler-Maclaurin-like formula for 1 Simpson’s rule. The first Euler-Maclaurin summation formula (for example equation 21.1.30 of Abramowitz and Stegun [1]) can be written as − b h n 1 f(x) dx = f(a)+2 f(a + kh)+ f(b) a 2 " # Z Xk=1 − m 1 h2kB − 2k f (2k−1)(b) − f (2k−1)(a) (2) (2k)! Xk=1 − h2m+1B n 1 − 2m f (2m)(a + kh + θh), (2m)! Xk=0 where the first 2m derivatives of f are continuous on (a, b), h = (b − a)/n, and θ ∈ (0, 1). In the case that f is analytic and its derivatives do not grow too quickly, the error term can be removed and the second last summation extended to infinity. Standard rules, nonstandard error terms x2 Consider approximating f(x) dx, where xi = x0 + ih and h = xi − xi−1. x0 In this case the numberZ of intervals, n, equals two. For simplicity we shall assume that f is analytic. Let us start with Taylor’s series for f(x) around x1, ∞ (x − x )k f(x)= f(x )+ 1 f (k)(x ). 1 k! 1 Xk=1 Integrating from x0 to x2 gives ∞ x2 x2 (k) x2 f (x1) k f(x) dx = f(x1) dx + (x − x1) dx x0 x0 k! x0 Z Z k=1∞ Z X (k) k+1 x2 f (x1) (x − x1) =(x2 − x0)f(x1)+ k! k +1 x0 ∞ k=1 f (kX)(x ) =2hf(x )+ 1 hk+1 − (−h)k+1 , 1 (k + 1)! k=1 X 2 and since the even terms in the summation cancel, we have ∞ x2 2k+1 2h (2k) f(x) dx =2hf(x1)+ f (x1). (3) x0 (2k + 1)! Z Xk=1 This is just the midpoint rule, but with a nonstandard error term. Usually 3 ′′ the error term is written as h f (ξ)/3 where ξ ∈ (x0, x2). Let us now evaluate the Taylor series at x0 and x2, giving ∞ (−1)khk f(x )= f(x )+ f (k)(x ), and (4) 0 1 k! 1 k=1 X∞ hk f(x )= f(x )+ f (k)(x ). (5) 2 1 k! 1 Xk=1 Adding (4) and (5) cancels the terms in the sum with odd powers of h, and multiplying the sum by h gives ∞ 2h2k+1 h[f(x )+ f(x )]=2hf(x )+ f (2k)(x ). (6) 0 2 1 (2k)! 1 Xk=1 Substituting 2hf(x1) from (3) gives ∞ x2 2h2k+1 f(x) dx = h[f(x )+ f(x )] − f (2k)(x ) 0 2 (2k)! 1 Zx0 k=1 ∞ X 2h2k+1 + f (2k)(x ) (7) (2k + 1)! 1 k=1 ∞ X 4kh2k+1 = h[f(x )+ f(x )] − f (2k)(x ), 0 2 (2k + 1)! 1 Xk=1 using 1/(2k + 1)! − 1/(2k)! = −2k/(2k + 1)!. This is the trapezoidal rule on the interval [x0, x2], again with a nontraditional error term. The trapezoidal 3 ′′ rule is usually given on [x0, x1] with error term −h f (ξ)/12. Transforming 3 ′′ to the interval [x0, x2] of width 2h changes the error term to −2h f (ξ)/3. Note that this method of deriving the midpoint and trapezoidal rules can be found in Heath [2], but with less detail in stating the error terms. 3 Now if we add 4hf(x1) to both sides of (6) and divide by 3, then substitute for 2hf(x1) on the right hand side, we have ∞ h x2 2h2k+1 [f(x )+4f(x )+ f(x )]= f(x) dx − f (2k)(x ) 3 0 1 2 (2k + 1)! 1 Zx0 k=1 ∞ X 2h2k+1 + f (2k)(x ), 3(2k)! 1 Xk=1 or x2 h f(x) dx = [f(x0)+4f(x1)+ f(x2)] x0 3 Z ∞ 1 1 + 2h2k+1 − f (2k)(x ), (2k + 1)! 3(2k)! 1 Xk=1 so ∞ x2 − 2k+1 h 4(k 1)h (2k) f(x) dx = [f(x0)+4f(x1)+ f(x2)] − f (x1), (8) x0 3 3(2k + 1)! Z Xk=2 where the sum starts at k = 2 since the k = 1 term is zero. This is Simpson’s rule with a nontraditional error term, which I have not seen in either numer- ical integration or general numerical analysis texts. In fact, it was stated in 1926 by Scarborough [3], but does not appear to have been taken up by the numerical analysis community. In principle, there is no reason why this method could not be used to derive the complete family of Newton-Cotes integration formulas. Taylor se- ries around other xi can be combined with arbitrary multiplicative constants and the midpoint rule (3), and the constants can be chosen so that as many terms in the error expansion as possible are eliminated. Composite rules If we let h =(b − a)/n, x = a + ih, and require n to be n/2 b xn x2j even, then f(x) dx = f(x) dx = f(x) dx. Using (3), (7) and Za Zx0 j=1 Zx2j−2 (8) for the individual integrals lead to theX composite midpoint, trapezoidal 4 and Simpson’s rules with nontraditional error terms as ∞ b n/2 2k+1 n/2 2h (2k) f(x) dx =2h f(x − )+ f (x − ), (9) 2j 1 (2k + 1)! 2j 1 a j=1 j=1 Z X Xk=1 X − b n/2 1 f(x) dx = h f(x )+2 f(x )+ f(x ) 0 2j n a j=1 Z X ∞ 2k+1 n/2 4kh (2k) − f (x − ), and (10) (2k + 1)! 2j 1 j=1 Xk=1 X n/2−1 n/2 b h f(x) dx = f(x )+2 f(x )+4 f(x − )+ f(x ) 3 0 2j 2j 1 n a j=1 j=1 Z X X ∞ − 2k+1 n/2 4(k 1)h (2k) − f (x − ). (11) 3(2k + 1)! 2j 1 j=1 Xk=2 X Equation (11) can be found in Scarborough [3], in expanded form stating the first three terms of the error sum. At this point, we can explain the behavior of the composite Simpson’s 1 4 dx rule applied to 2 . The sum over j in the error term of (11) is 0 1+ x Z 4 in fact the midpoint rule applied to f (2k)(x). Since with f(x) = , 1+ x2 4 − 2 1 (4) 96(5x 10x + 1) (4) 4 f (x)= 2 5 and f (x) dx = 0, the order h error term (1 + x ) 0 in the composite Simpson’s rule goesZ to zero as n increases, and we are left with the error being order h6. 5 Going further In the process of explaining this result, we see that (9) can be rewritten (replacing f(x) by f (2i)(x)) as ∞ n/2 b 2k+1 n/2 (2i) (2i) 2h (2(k+i)) 2h f (x − )= f (x) dx − f (x − ) 2j 1 (2k + 1)! 2j 1 j=1 Za k=1 j=1 X − −X X = f (2i 1)(b) − f (2i 1)(a) ∞ 2k+1 n/2 2h (2(k+i)) − f (x − ). (2k + 1)! 2j 1 j=1 Xk=1 X n/2 (i) b (i) (i) (2i) ≡ − ≡ − Defining f a f (b) f (a) and Fi f (x2j 1), this says j=1 X ∞ 2k+1 b 2h 2hF = f (2i−1) − F . (12) i a (2k + 1)! i+k k=1 X Applying this result to each of the composite rules leads to error expansions in terms of the odd derivatives of the function. For the trapezoidal and midpoint rules we shall get the classic Euler-Maclaurin summation formulas, although this is a new derivation. An excellent summary of the classical derivation can be found in Steffensen [4]. Euler-Maclaurin summation formulas Trapezoidal rule The error term for the composite trapezoidal rule from (10) can be written as ∞ 2kh2k E = −2h F .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us