[Math.CA] 3 Nov 2005 Ua Ntecs Fteohrsre Osdrd–Tegaussia the – Considered Corresponding Series the Other the 2 Reproducing of Form, Case the Closed in Funct in Mula
Total Page:16
File Type:pdf, Size:1020Kb
Asymptotic Approximations to Truncation Errors of Series Representations for Special Functions Ernst Joachim Weniger Institut f¨ur Physikalische und Theoretische Chemie Universit¨at Regensburg, D-93040 Regensburg, Germany [email protected] Summary. Asymptotic approximations (n → ∞) to the truncation errors rn = − ∞ ∞ ν=0 aν of infinite series ν=0 aν for special functions are constructed by solving a system of linear equations. The linear equations follow from an approximative P P solution of the inhomogeneous difference equation ∆rn = an+1. In the case of the remainder of the Dirichlet series for the Riemann zeta function, the linear equations can be solved in closed form, reproducing the corresponding Euler-Maclaurin for- mula. In the case of the other series considered – the Gaussian hypergeometric series 2F1(a,b; c; z) and the divergent asymptotic inverse power series for the exponential integral E1(z) – the corresponding linear equations are solved symbolically with the help of Maple. The practical usefulness of the new formalism is demonstrated by some numerical examples. 1 Introduction A large part of special function theory had been developed already in the 19th century. Thus, it is tempting to believe that our knowledge about special functions is essentially complete and that no significant new developments are to be expected. However, up to the middle of the 20th century, research on special functions had emphasized analytical results, whereas the efficient and reliable evaluation of most special functions had been – and to some extend still is – a more or less unsolved problem. Due to the impact of computers on mathematics, the situation has changed arXiv:math/0511074v1 [math.CA] 3 Nov 2005 substantially. We witness a revival of interest in special functions. The general availability of electronic computers in combination with the development of powerful computer algebra systems like Maple or Mathematica opened up many new applications, and it also created a great demand for efficient and reliable computational schemes (see for example [7, 11, 21] or [19, Section 13] and references therein). 2 Ernst Joachim Weniger Most special functions are defined via infinite series. Examples are the Dirichlet series for the Riemann zeta function, ∞ − ζ(s) = (ν + 1) s . (1) ν=0 X which converges for Re(s) > 1, or the Gaussian hypergeometric series ∞ (a)ν (b)ν ν 2F1(a,b; c; z) = z , (2) (c)ν ν! ν=0 X which converges for |z| < 1. The definition of special functions via infinite series is to some extent highly advantageous since it greatly facilitates analytical manipulations. However, from a purely numerical point of view, infinite series representations are at best a mixed blessing. For example, the Dirichlet series (1) converges for Re(s) > 1, but is notorious for extremely slow convergence if Re(s) is only slightly larger than one. Similarly, the Gaussian hypergeometric series (2) converges only for |z| < 1, but the corresponding Gaussian hypergeometric function is a multivalued function defined in the whole complex plane with branch points at z = 1 and ∞. A different computational problem occurs in the case of the asymptotic series for the exponential integral: ∞ z m z e E1(z) ∼ (−1/z) m! = 2F0(1, 1; −1/z) , z → ∞ . (3) m=0 X This series is probably the most simple example of a large class of series that diverge for every finite argument z and that are only asymptotic in the sense of Poincar´eas z → ∞. In contrast, the exponential integral E1(z), which has a cut along the negative real axis, is defined in the whole complex plane. Problems with slow convergence or divergence were encountered already in the early days of calculus. Thus, numerical techniques for the acceleration of convergence or the summation of divergent series are almost as old as calculus. According to Knopp [9, p. 249], the first systematic work in this direction can be found in Stirling’s book [17], which was published already in 1730 (recently, Tweddle [20] published a new annotated translation), and in 1755 Euler [6] published the series transformation which now bears his name. The convergence and divergence problems mentioned above can be for- n malized as follows: Let us assume that the partial sums sn = ν=0 aν of a ∞ convergent or divergent but summable series form a sequence {sn}n=0 whose elements can be partitioned into a (generalized) limit s and aP remainder or truncation error rn according to sn = s + rn , n ∈ N0 . (4) This implies Asymptotic Approximations to Truncation Errors 3 ∞ rn = − aν , n ∈ N0 . (5) ν=n+1 X At least in principle, a convergent infinite series can be evaluated by adding up the terms successively until the remainders become negligible. This ap- proach has two obvious shortcomings. Firstly, convergence can be so slow that it is uneconomical or practically impossible to achieve sufficient accuracy. Sec- ondly, this approach does not work in the case of a divergent but summable series because increasing the index n normally only aggravates divergence. As a principal alternative, we can try to compute a sufficiently accurate approximationr ¯n to the truncation error rn. If this is possible,r ¯n can be eliminated from sn, yielding a (much) better approximation sn − r¯n to the (generalized) limit s than sn itself. This approach looks very appealing since it is in principle remarkably powerful. In addition, it can avoid the troublesome asymptotic regime of large indices n, and it also works in the case of divergent but summable sequences and series. Unfortunately, it is by no means easy to obtain sufficiently accurate approximationsr ¯n to truncation errors rn. The straightforward computation of rn by adding up the terms does not gain anything. The Euler-Maclaurin formula, which is discussed in Section 2, is a prin- cipal analytical tool that produces asymptotic approximations to truncation errors of monotone series in terms of integrals plus correction terms. Unfortu- nately, it is not always possible to apply the Euler-Maclaurin formula. Given a reasonably well behaved integrand, it is straightforward to compute a sum of integrand values plus derivatives of the integrand. But for a given series term an, it may be prohibitively difficult to differentiate and integrate it with respect to the index n. In Section 3, an alternative approach for the construction of asymptotic approximations (n → ∞) to the truncation errors rn of infinite series is pro- posed that is based on the solution of a system of linear equations. The linear equations exist under very mild conditions: It is only necessary that the ratio an+2/an+1 or similar ratios of series terms possesses an asymptotic expansion in terms of inverse powers 1/(n + α) with α> 0. Moreover, it is also fairly to solve these linear equations since they have a triangular structure. The asymptotic nature of the approximants makes it difficult to use them also for small indices n, although this would be highly desirable. In Section 4, it is mentioned briefly that factorial series and Pad´eapproximants can be helpful in this respect since they can accomplish a numerical analytic continuation. In Section 5, the formalism proposed in this article is applied to the trun- cation error of the Dirichlet series for the Riemann zeta function. It is shown that the linear equations can in this case be reduced to a well known recurrence formula of the Bernoulli numbers. Accordingly, the terms of the corresponding Euler-Maclaurin formula are exactly reproduced. In Section 6, the Gaussian hypergeometric series 2F1(a,b; c; z) is treated. Since the terms of this series depend on three parameters and one argument, a 4 Ernst Joachim Weniger closed form solution of the linear equations seems to be out of reach. Instead, approximations are computed symbolically with the help of the computer algebra system Maple. The practical usefulness of these approximations is demonstrated by some numerical examples. In Section 7, the divergent asymptotic inverse power series for the expo- nential integral E1(z) is treated. Again, the linear equations are solved sym- bolically with the help of Maple, and the practical usefulness of these solutions is demonstrated by some numerical examples. 2 The Euler-Maclaurin Formula The derivation of the Euler-Maclaurin formula is based on the assumption N that g(x) is a smooth and slowly varying function. Then, M g(x)dx with Z 1 M,N ∈ can be approximated by the finite sum 2 g(M)+ g(M +1)+ ··· + 1 R g(N − 1) + 2 g(N). This finite sum can also be interpreted as a trapezoidal quadrature rule. In the years between 1730 and 1740, Euler and Maclaurin de- rived independently correction terms to this quadrature rule, which ultimately yielded what we now call the Euler-Maclaurin formula (see for example [19, Eq. (1.20)]): N N 1 g(ν) = g(x) dx + g(M)+ g(N) 2 ν M M X= Z k B − − + 2j g(2j 1)(N) − g(2j 1)(M) + R (g) , (6a) (2j)! k j=1 X h i 1 N R (g) = − B x −⌊x⌋ g(2k)(x) dx . (6b) k (2k)! 2k ZM (m) Here, g (x) is the m-th derivative, ⌊x⌋ is the integral part of x, Bm(x) is a Bernoulli polynomial defined by the generating function text/(et − 1) = ∞ n n=0 Bn(x)t /n!, and Bm = Bm(0) is a Bernoulli number. It is not a priori clear whether the integral Rk(g) in (6) vanishes as k → ∞ forP a given function g(x). Thus, the Euler-Maclaurin formula may lead to an asymptotic expansion that ultimately diverges. In this article, it is always assumed that the Euler-Maclaurin formula and related expansions are only asymptotic in the sense of Poincar´e.