arXiv:math/0511074v1 [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. zeta solved Riemann the be for can series Dirichlet the of remainder ytmo iereutos h iereutosflo fr follow equations equation difference linear inhomogeneous The the equations. of linear solution of system a eibecmuainlshms(e o xml 7 1 1 r[9 S [19, efficien or for 21] demand 11, therein). [7, great references example a open for and created (see Mathematica also schemes or computational it reliable and Maple applications, like developmen new the systems many with algebra combination computer in powerful computers functions. special electronic in of interest availability of revival e a some witness problem. We to substantially. unsolved and less – or been more a had re century, – functions is 20th special still the the most whereas of of results, evaluation middle analytical reliable the emphasized to had up functions developm However, special already new expected. significant developed abo no be knowledge that been to our and that complete had believe essentially theory to is tempting functions function is it special Thus, century. of 19th part large A Introduction 1 formalism new the of usefulness examples. practical numerical The some Maple. of help integral − Summary. [email protected] Germany Regensburg, D-93040 Universit¨at Chemie Regensburg, Theoretische und f¨ur Physikalische Institut Weniger Joachim Ernst Special for Functions Representations Series of Errors Truncation to Approximations Asymptotic F P 1 ( u oteipc fcmueso ahmtc,testainhsc has situation the mathematics, on computers of impact the to Due ,b a, ν ∞ =0 ; E a c ν ; 1 z ( fifiieseries infinite of n h iegn smttcivrepwrsre o h e the for series power inverse asymptotic divergent the and ) z smttcapoiain ( approximations Asymptotic h orsodn iereutosaesle symbolica solved are equations linear corresponding the – ) P ν ∞ =0 a ν o pca ucin r osrce ysolving by constructed are functions special for n ∞ → otetucto errors truncation the to ) ∆r n = a o,telna equations linear the ion, yegoercseries hypergeometric n n ma approximative an om +1 ue-alui for- Euler-Maclaurin sdmntae by demonstrated is ntecs fthe of case the In . ffiin and efficient h general The l ihthe with lly xponential cin13] ection tspecial ut erhon search nsare ents hanged nthe in dup ed xtend and t r n of t = 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. Although originally used to express the in the early 18th century still unfa- miliar integral in terms more elementary quantities, the Euler-Maclaurin for- ∞ mula is now often used to approximate the truncation error rn = − ν=n+1 aν of a slowly convergent monotone series by an integral plus correction terms. The power and the usefulness of this approach can be demonstratedP convinc- ingly via the Dirichlet series (1) for the Riemann zeta function. Asymptotic Approximations to Truncation Errors 5
The terms (ν + 1)−s of the Dirichlet series (1) are obviously smooth and slowly varying functions of the index ν, and they can be differentiated and integrated easily. Thus, the application of the Euler-Maclaurin formula (6) with M = n + 1 and N = ∞ to the truncation error of the Dirichlet series yields: ∞ 1−s − (n + 2) 1 − − (ν + 1) s = − − (n + 2) s s − 1 2 ν=n+1 X k (s) − B − − − 2j 1 2j (n + 2) s 2j+1 + R (n,s) , (7a) (2j)! k j=1 X ∞ (s) B2k x −⌊x⌋ R (n,s) = 2k dx . (7b) k (2k)! (x + 1)s+2k Zn+1
Here, (s)m = s(s + 1) ··· (s + m − 1) = Γ (s + m)/Γ (s) with s ∈ C and m ∈ N0 is a Pochhammer symbol. In [3, Tables 8.7 and 8.8, p. 380] and in [25, Section 2] it was shown thata few terms of the sum in (7a) suffice for a convenient and reliable computation of ζ(s) with s = 1.1 and s = 1.01, respectively. For these arguments, the Dirichlet series for ζ(s) converges so slowly that it is practically impossible to evaluate it by adding up its terms. In order to understand better its nature, the Euler-Maclaurin formula (6) is rewritten in a more suggestive form. Let us set M = n+1 and N = ∞, and let ′ ′′ us also assume limN→∞ g(N) = limN→∞ g (N) = limN→∞ g (N) = ··· = 0. With the help of B0 = 1. B1 = −1/2, and B2n+1 = 0 with n ∈ N (see for example [19, p. 3]), we obtain: ∞ ∞ m µ−1 (−1) B − − g(ν) = −B g(x) dx + µ g(µ 1)(ν) + R (g) , 0 µ! m ν=n+1 n+1 µ=1 X Z X (8a) ∞ (−1)m R (g) = B x −⌊x⌋ g(m)(x) dx, m ∈ N . (8b) m (m)! m Zn+1 In the same way, we obtain for the Euler-Maclaurin approximation (7) to the truncation error of the Dirichlet series: ∞ m µ−1 − (−1) (s) − B − − − (ν + 1) s = µ 1 µ (n + 2)1 s µ + R (n,s) , µ! m ν=n+1 µ=0 X X (9a) m ∞ (−1) (s) Bm x −⌊x⌋ R (n,s) = m dx, m ∈ N . (9b) m (m)! (1 + x)s+m Zn+1 The reformulated Euler-Maclaurin approximation (9) looks suspiciously like a truncated expansion of the truncation error in terms of the asymptotic 6 Ernst Joachim Weniger
−µ ∞ sequence {(n + 2) }µ=0 of inverse powers. An analogous interpretation of the reformulated Euler-Maclaurin formula (8) is possible if we assume that ∞ the quantities g(x)dx, g(n),g′(n),g′′(n),... form an asymptotic sequence ∞ n+1 G (n) as n → ∞ according to µ µ=0 R ∞ G0(n) = g(x) dx , (10a) Zn+1 (µ−1) Gµ(n) = g (n) , µ ∈ N . (10b)
∞ The expansion of the truncation error − g(ν) in terms of the ∞ ν=n+1 asymptotic sequence G (n) according to (8) has the undeniable ad- µ µ=0 P vantage that the expansion coefficients do not depend on the terms g(ν) and are explicitly known. The only remaining computational problem is the∞ de- termination of the leading elements of the asymptotic sequence Gµ(n) µ=0. In the case of the Dirichlet series (1), this is trivially simple. Unfortunately, the terms of most series expansions for special functions are (much) more complicated than the terms of the Dirichlet series (1). In those less fortunate cases, it can be extremely difficult to do the necessary differentiations and ∞ integrations. Thus, the construction of the asymptotic sequence Gµ(n) µ=0 may turn out to be an unsurmountable problem.
3 Asymptotic Approximations To Truncation Errors
Let us assume that we want to construct an asymptotic expansion of a special function f(z) as z → ∞. First, we have to find a suitable asymptotic sequence ∞ ∞ {ϕj (z)}j=0. Obviously, {ϕj (z)}j=0 must be able to model the essential features ∞ of f(z) as z → ∞. On the other hand, {ϕj (z)}j=0 should also be sufficiently simple in order to facilitate the necessary analytical manipulations. In that −j ∞ respect, the most convenient asymptotic sequence is the sequence {z }j=0 of inverse powers, and it is also the one which is used almost exclusively in special function theory. An obvious example is the asymptotic series (3). The behavior of most special functions as z → ∞ is incompatible with an expansion in terms of inverse powers. Therefore, an indirect approach has to be pursued: For a given f(z), one has to find some g(z) such that the ratio f(z)/g(z) admits an asymptotic expansion in terms of inverse powers:
∞ j f(z)/g(z) ∼ cj /z , z → ∞ . (11) j=0 X −j ∞ Although f(z) cannot be expanded in terms of inverse powers {z }j=0, it can j ∞ be expanded in terms of the asymptotic sequence {g(z)/z }j=0. The asymp- totic series (3) is of the form of (11) with f(z)= E1(z) and g(z) = exp(−z)/z. Asymptotic Approximations to Truncation Errors 7
It is the central hypothesis of this article that such an indirect approach is useful for the construction of asymptotic approximations to remainders ∞ rn = − ν=n+1 aν of infinite series as n → ∞. Thus, instead of trying to use the technically difficult Euler-Maclaurin formula (6), we should try to find P some ρn such that the ratio rn/ρn admits an asymptotic expansion as n → ∞ −j ∞ in terms of inverse powers {(n + α) }j=0 with α> 0. A natural candidate for ρn is the first term an+1 neglected in the partial n sum sn = ν=0 aν , but in some cases it is better to choose instead ρn = an or ρn = (n+α)an+1 with α> 0. Moreover, the terms an+1 and the remainders rn of an infiniteP series are connected by the inhomogeneous difference equation
∆rn = rn+1 − rn = an+1 , n ∈ N0 . (12) In Jagerman’s book [8, Chapter 3 and 4], solutions to difference equations of that kind are called N¨orlund sums. If we knew how to solve (12) efficiently and reliably for essentially arbitrary inhomogeneities an+1, all problems related to the evaluation of infinite series would in principle be solved. Unfortunately, this is not the case. Nevertheless, we can use (12) to construct the leading terms of an asymptotic expansion of rn/an+1 or of related expressions in terms of inverse powers. For that purpose, we make the following ansatz: m γm r(m) = − a µ , n ∈ N , m ∈ N , α> 0 . (13) n n+1 (n + α)µ 0 µ=0 X This ansatz, which is inspired by the theory of converging factors [1, 13] and by a truncation error estimate for Levin’s sequence transformation [10] proposed by Smith and Ford [16, Eq. (2.5)] (see also [22, Section 7.3] or [24, Section IV]), is not completely general and has to be modified slightly both in the case of the Dirichlet series (1) for the Riemann zeta function, which is discussed in Section 5, and in the case of the divergent asymptotic series (3) for the exponential integral, which is discussed in Section 7. Moreover, the ansatz (13) does not cover the series expansions of all special functions of interest. For example, in [23] a power series expansion for the digamma function ψ(z) was analyzed whose truncation errors cannot be approximated by a truncated power series of the type of (13). Nevertheless, the examples considered in this article should suffice to convince even a sceptical reader that the ansatz (13) is indeed computationally useful. We cannot expect that the ansatz (13) satisfies the the inhomogeneous difference equation (12) exactly. However, we can choose the unspecified co- (m) efficients γµ in (13) in such a way that only a higher order error remains:
(m) (m) m m m m rn+1 − rn γµ an+2 γµ = µ − µ (14) an (n + α) an (n + α + 1) +1 µ=0 +1 µ=0 X − − X = 1+O(n m 1) , n → ∞ . (15) 8 Ernst Joachim Weniger
The approach of this article depends crucially on the assumption that the ratio an+2/an+1 can be expressed as an (asymptotic) power series in 1/(n + α). If this is the case, then the right-hand side of (14) can be expanded in powers of 1/(n + α) and we obtain:
(m) (m) m (m) rn+1 − rn Cµ −m−1 = µ + O n , n → ∞ . (16) an (n + α) +1 µ=0 X Now, (15) implies that we have solve the following system of linear equations:
(m) Cµ = δµ0 , 0 ≤ µ ≤ m . (17) (m) (m) Since Cµ with 0 ≤ µ ≤ m contains only the unspecified coefficients γ0 , ... , (m) (m) (m) γµ but not γµ+1 ... , γm , the linear system (17) has a triangular structure (m) (m) and the unspecified coefficients γ0 ,...,γµ can be determined by solving (m) (m) (m) successively the equations C0 = 1, C1 = 0, ... , Cm = 0. Another important aspect is that the linear equations (17) do not depend (m) explicitly on m, which implies that the coefficients γµ in (13) also do not (m) (m) depend explicitly on m. Accordingly, the superscript m of both Cµ and γµ is superfluous and will be dropped in the following Sections.
4 Numerical Analytic Continuation
Divergent asymptotic series of the type of (11) can be extremely useful com- putationally: For sufficiently large arguments z, truncated expansions of that kind are able to provide (very) accurate approximations to the corresponding special functions, in particular if the series is truncated in the vicinity of the minimal term. If, however, the argument z is small, truncated expansions of that kind produce only relatively poor or even completely nonsensical results. We can expect that our asymptotic expansions in powers of 1/(n+α) have similar properties. Thus, we can be confident that they produce (very) good re- sults for sufficiently large indices n, but it would be overly optimistic to assume that these expressions necessarily produce good results in the nonasymptotic regime of moderately large or even small indices n. Asymptotic approximants can often be constructed (much) more easily than other approximants that are valid in a wider domain. Thus, it is desirable to use asymptotic approximants also outside the asymptotic domain. This means that we would like to use our asymptotic approximants also for small indices n in order to avoid the computationally problematic asymptotic regime of large indices. Obviously, this is intrinsically contradictory. We also must find a way of extracting additional information from the terms of a truncated divergent inverse power series expansion. Asymptotic Approximations to Truncation Errors 9
Often, this can be accomplished at low computational costa by converting ∞ n ∞ an inverse power series n=0 cn/z to a factorial series n=0 c˜n/(z)n. Fac- torial series, which had already been known to Stirling [20, p. 6], frequently have superior convergenceP properties. An example is theP incomplete gamma function Γ (a,z), which possesses a divergent asymptotic series of the type of (11) [5, Eq. (6) on p. 135] and also a convergent factorial series [5, Eq. (1) on p. 139]. Accordingly, the otherwise so convenient inverse powers are not necessarily the computationally most effective asymptotic sequence. The transformation of an inverse power series to a factorial series can be accomplished with the help of the Stirling numbers of the first kind which n S(1) ν are normally defined via the expansion (z − n + 1)n = ν=0 (n,ν)z of a Pochhammer symbol in terms of powers. As already known to Stirling (see for example [20, p. 29] or [14, Eq. (6) on p. 78]), the StirlingP numbers of the first kind occur also in the factorial series expansion of an inverse power:
∞ κ S(1) 1 (−1) (k + κ, k) N k+1 = , k ∈ 0 . (18) z (z)k κ κ=0 + +1 X This infinite generating function can also be derived by exploiting the well known recurrence relationships of the Stirling numbers. With the help of (18), the following transformation formula can be derived easily:
∞ ∞ k k cn c1 (−1) κ S(1) n = c0 + + (−1) (k − 1,κ − 1) cκ . (19) z (z) (z)k n=0 1 k κ=1 X X=2 X Let us now assume that the coefficients γµ with 0 ≤ µ ≤ m of a truncated expansion of rn/an+1 in powers of 1/(n + α) according to (13) are known. Then, (19) implies that we can use the transformation scheme
γµ , µ =0, 1 , µ γ˜µ = (20) µ+ν (1) (−1) S (µ − 1,ν − 1) γν , µ ≥ 2 , ν=1 X to obtain instead of (13) the truncated factorial series
m (m) γ˜µ −m−1 r˜n = −an+1 + O n , n → ∞ . (21) (n + α)µ "µ=0 # X Pad´eapproximants, which convert the partial sums of a formal power series to a doubly indexed sequence of rational functions, can also be quite helpful. They are now used almost routinely in applied mathematics and theoretical physics to overcome convergence problems with power series (see for example the monograph by Baker and Graves-Morris [2] and references therein). The 10 Ernst Joachim Weniger ansatz (13) produces a truncated series expansion of rn/an+1 in powers of 1/(n + α), which can be converted to a Pad´eapproximant, i.e., to a rational function in 1/(n + α). The numerical results presented in Sections 6 and 7 that the conversion to factorial series and Pad´eapproximants improves the accuracy of our approx- imants, in particular for small indices n.
5 The Dirichlet Series for the Riemann Zeta Function
In this Section, an asymptotic approximation to the truncation error of the Dirichlet series for the Riemann zeta function is constructed by suitably adapt- ing the approach described in Section 3. In the case of the Dirichlet series (1), we have: n −s sn = (ν + 1) , (22) ν=0 X ∞ ∞ −s − − ν r = − (ν + 1) s = −(n + 2) s 1+ , (23) n n +2 ν=n+1 ν=0 X −s X ∆rn = (n + 2) . (24)
It is an obvious idea to express the infinite series on the right-hand side of (23) as a power series in 1/(n + 2). If ν