<<

ASYMPTOTIC EXPANSIONS FOR THE INCOMPLETE IN THE TRANSITION REGIONS

GERGO˝ NEMES AND ADRI B. OLDE DAALHUIS

Abstract. We construct asymptotic expansions for the normalised incom- plete gamma function Q(a, z) = Γ(a, z)/Γ(a) that are valid in the transition regions, including the case z ≈ a, and have simple polynomial coefficients. For Bessel functions, these type of expansions are well known, but for the nor- malised incomplete gamma function they were missing from the literature. A detailed historical overview is included. We also derive an asymptotic expan- sion for the corresponding inverse problem, which has importance in proba- bility theory and mathematical statistics. The coefficients in this expansion are again simple polynomials, and therefore its implementation is straightfor- ward. As a byproduct, we give the first complete asymptotic expansion as a → −∞ of the unique negative zero of the regularised incomplete gamma function γ∗(a, x).

1. Introduction and main results The normalised incomplete gamma function Q(a, z) = Γ(a, z)/Γ(a) is one of the most widely used of two variables. It is used in constructing gamma distributions [9, Ch. 17], which appear naturally in the theory associated with normally distributed random variables. In many applications, Poisson random variables are used in which the Poisson rate is not fixed, and the function Q(a, z) plays an important role in these cases (see, for example, [6]). Consequently, efficient and accurate approximations for the incomplete gamma function are essential. In many applications the inverse problem also arises naturally, that is, the problem of determining the solution x, real and positive, of the equation Q(a, x) = q for given 0 < q < 1 and a > 0. In the important papers [27, 31], Temme established asymptotic expansions for the normalised incomplete gamma function as a → ∞, that are valid uniformly for |z| ∈ [0, ∞). The asymptotic expansions of the corresponding inverse functions are discussed in [29]. The large region of validity is important in applications, and many papers in physics, applied statistics, network and control theory, and so on, refer to these uniform asymptotic expansions (see, e.g., [11, 14, 21, 22, 26, 33]). However, applying Temme’s expansions in the neighbourhood of the (most in- teresting) point z = a can be difficult because its coefficients possess a removable arXiv:1803.07841v2 [math.CA] 5 Jul 2018 singularity at this point. To overcome this difficulty, Temme [27] gave power expansions for these coefficients. Having to use local power series expansions for the coefficients in uniform asymptotic expansions, is not a very elegant solution. In this paper, we propose an alternative approach to the problem. We will construct what we call transition region expansions, and provide full details of the inversion of these new expansions. These are expansions that are valid in the regions in which Q(a, z) changes dramatically, and their coefficients are

2010 Subject Classification. 33B20, 41A60. Key words and phrases. incomplete gamma functions, asymptotic expansions, transition regions. The authors’ research was supported by a research grant (GRANT11863412/70NANB15H221) from the National Institute of Standards and Technology. 1 2 G. NEMES AND A. B. OLDE DAALHUIS polynomials satisfying simple recurrence relations. The region of validity overlaps with those of the non-uniform “outer” expansions. Furthermore, the coefficients of their inversions are simple polynomials, whose computation and implementation are straightforward. It is surprising to us that these transition region expansions for the normalised incomplete gamma function have not yet been discussed in the literature, given the fact that expansions of similar type for Bessel functions are well known (see [18, §10.19(iii)]). What our new expansions and the transition region expansions for the Bessel functions have in common is that both mimic the corresponding uniform expansions; compare the similarities between (1.1) and (2.6), and between [18, Eq. 10.19.8] and [18, Eq. 10.20.4]. The ideas in this paper should also be applicable to other cumulative distribution functions using the results of [28]. The proofs of our new results rely heavily on the uniform asymptotic expansions by Temme. Thus, we shall provide full details of his expansions, and even include new recurrence relations for the coefficients in the local power series expansions mentioned above (see AppendixB). For more information about existing results in the literature and their connection with those we prove in this paper, the reader is referred to the historical overview in Section2. The following theorem is the main result of the paper. Theorem 1.1. The normalised incomplete gamma function admits the asymptotic expansions  2  ∞  1  1  − 1  1 τ X Cn(τ) (1.1) Q a, a + τa 2 ∼ erfc 2 2 τ + √ exp − 2 2 an/2 2πa n=0 and ±πia e  1 ±πi 1  − 1  Q −a, (a + τa 2 )e ∼ ± erfc ±2 2 iτ 2i sin(πa) 2 (1.2)  2  ∞ n i τ X (−i) Cn(iτ) − √ exp , 2 an/2 2πa n=0 as a → ∞ in the sector | arg a| ≤ π − δ < π, uniformly with respect to bounded complex values of τ. Here, erfc denotes the complementary [18, Eq. 7.2.2]. The coefficients Cn(τ) are polynomials in τ of degree 3n + 2 and satisfy 1 1 C (τ) = τ 2 − , 0 3 3 0 00 2 2 0 00 Cn(τ) + τCn(τ) − Cn(τ) = τ(τ − 2)Cn−1(τ) − (2τ − 1)Cn−1(τ) + τCn−1(τ) for n ≥ 1. In addition, the even- and odd-order polynomials are even and odd functions, respectively. The explicit forms of the next two coefficients in (1.1) are as follows: 1 11 1 1 29 133 23 1 C (τ) = τ 5 − τ 3 + τ, C (τ) = τ 8 − τ 6 + τ 4 − τ 2 − . 1 18 36 12 2 162 324 540 540 540 For higher coefficients and for an algorithm to generate them, see the end of Section 3. The most common case in applications is when both variables of Q(a, z) are real and positive. It is possible to combine our transition region expansion (1.1), with the outer expansions that exist in the literature and cover the complete range τ > −a1/2 (or equivalently, the range z > 0). First we note that in Theorem 1.1 we assume that τ is bounded. We can weaken this restriction as follows. Since µ Cn(τ) is a polynomial of degree 3n + 2 it follows that we can allow τ = O (|a| ) as 1 a → ∞, as long as µ < 6 . See the proposition below. In Section2, we will give ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 3 the expansions (2.1) and (2.2). These are also asymptotic expansions with simple coefficients, and with the notation of this section, these two outer expansions are valid for |τ| ≥ aµ as a → +∞, with any µ > 0 (see AppendixA). Therefore, by combining these three expansions, we can cover the whole range τ > −a1/2. Proposition 1.2. The expansions (1.1) and (1.2) are still valid in the sense of gen- eralised asymptotic expansions (see, e.g., [18, §2.1(v)]) provided that τ = O (|a|µ) 1 as a → ∞ with some constant µ < 6 . In the inverse problem we are trying to find x = x(a, q) such that (1.3) Q(a, x) = q holds, where 0 < q < 1 and a > 0 are given. The inversion of the normalised incom- plete gamma function is an important topic in mathematical statistics and probabil- ity theory, in particular for computing percentage points of the χ2-distribution (see, for example, [8]). A suitable inversion of the expansion (1.1) yields the following result.

Theorem 1.3. For any 0 < q < 1, define τ0 to be the unique real root of the equation

 1  1 − 2 (1.4) q = 2 erfc 2 τ0 . Then the x = x(a, q) that satisfies the equation (1.3) has the as- ymptotic expansion ∞ 1 X dn(τ0) (1.5) x(a, q) ∼ a + τ a 2 + , 0 an/2 n=0 as a → +∞, provided that q is bounded away from 0 and 1. The coefficients dn(τ0) are polynomials in τ0 of degree n + 2. In addition, the even- and odd-order polynomials are even and odd functions, respectively. The first few coefficients in (1.5) are as follows: 1 1 1 7 1 7 8 d (τ ) = τ 2 − , d (τ ) = τ 3 − τ , d (τ ) = − τ 4 − τ 2 + . 0 0 3 0 3 1 0 36 0 36 0 2 0 270 0 810 0 405 For higher coefficients and for an algorithm to generate them, see Section5. In Theorem 1.3, we assume that q is bounded away from 0 and 1. In practice, these bounds can be very small. It follows from (1.4) that τ0 → +∞ as q → 0 and τ0 → −∞ as q → 1. Since  2   1  1 τ 1 − 2 0 2 erfc 2 τ0 ∼ √ exp − 2πτ0 2 as τ0 → +∞, and  2   1  1 τ 1 − 2 0 2 erfc 2 τ0 ∼ 1 + √ exp − 2πτ0 2 p as τ0 → −∞, we can infer that |τ0| ∼ −2 log(q(1 − q)) as q → 0 or 1. Since the dn(τ0)’s are polynomials in τ0 of degree n + 2, for (1.5) to be an asymptotic  1/2 expansion we need τ0 = o |a| as a → ∞. Hence, we need log(q(1−q)) = o(|a|), i.e., q can be sub-exponentially close in |a| to 0 or 1. The other expansion (1.2) is particularly well suited for the study of the large-a behaviour of the x-zeros of the regularised incomplete gamma function γ∗(a, x) = x−aP (a, x) = x−a(1 − Q(a, x)). The function γ∗(a, x) is entire in a and x and has a unique negative zero x−(a) when a is negative and a 6= 0, −1, −2,.... An asymptotic approximation for x−(a) as a → −∞ was given by Tricomi [35], which 4 G. NEMES AND A. B. OLDE DAALHUIS was corrected later by K¨olbig[10]. A more accurate asymptotic approximation was proved recently by Thompson [32], which reads

1  1  2 1 2 1 − 2 (1.6) x−(a) = a − τ1 (−a) − 3 τ1 − 3 + O (−a) , as a → −∞, provided that a is bounded away from the non-positive integers. Here τ1 is the unique solution of the equation

r Z τ1  2   2  2 t 2  − 1  τ1 (1.7) cot(−πa) = exp dt = √ F 2 2 τ1 exp , π 0 2 π 2 where F (w) denotes Dawson’s integral [18, §7.2(ii)]. In the present paper, we extend the result (1.6) by deriving a complete asymptotic expansion for x−(a).

Theorem 1.4. The unique negative zero x−(a) of the regularised incomplete gamma function γ∗(a, x) has the asymptotic expansion

∞ n 1 X (−i) dn(iτ1) (1.8) x (a) ∼ a − τ (−a) 2 + , − 1 n/2 n=0 (−a) as a → −∞, provided that a is bounded away from the non-positive integers. Here τ1 is the unique solution of the equation (1.7). The coefficients dn(iτ1) are identical to those appearing in Theorem 1.3 with τ0 replaced by iτ1. In Theorem 1.4, we require that a is bounded away from the non-positive integers. In practice, these bounds can be very small. Indeed, let k be a negative integer. It follows from (1.7) that τ1 → ±∞ as a → k. Since 1 cot(−πa) ∼ − , π(a − k) as a → k, and  2  r  2  2  − 1  τ1 2 1 τ1 √ F 2 2 τ1 exp ∼ exp , π 2 π τ1 2 p as τ1 → ±∞, we can infer from (1.7) that |τ1| ∼ −2 log |a − k| as a → k. Since the dn(iτ1)’s are polynomials in τ1 of degree n + 2, for (1.8) to be an asymptotic  1/2 expansion we need τ1 = o |a| as a → −∞. Thus, we need log |a − k| = o(|a|), i.e., a can be sub-exponentially close in |a| to a negative integer. A different asymptotic expansion for x−(a) can be derived using the known uni- form asymptotic expansion of the function γ∗(a, x)[31] and the method described in [29]. The resulting expansion would also hold when a is arbitrarily close to a non- positive integer. However, the coefficients in this expansion would be complicated functions possessing removable singularities, whereas the expansion (1.8) does not suffer from this inconvenience, because its coefficients are polynomials. The remaining part of the paper is structured as follows. Section2 provides a historical overview on the existing asymptotic expansions of the (normalised) in- complete gamma functions and the relation between those expansions and ours. In Section3, we prove the asymptotic expansions given in Theorem 1.1. In Section4, we show that Proposition 1.2 holds. In Section5, we prove the asymptotic expan- sions for the inverse and for the unique negative zero of the regularised incomplete gamma function stated in Theorems 1.3 and 1.4. Finally, in Section6, we compare numerically our new transition region expansion (1.1) with one of Temme’s uniform asymptotic expansions. We focus especially on the case that τ is unbounded, but will make the surprising observation that even in the case that τ is comparable with a1/6, we still obtain reasonable approximations from (1.1). ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 5

2. Historical overview The incomplete gamma functions of the complex variables a and z are defined by the integrals Z z Z ∞ γ(a, z) = ta−1e−t dt, Γ(a, z) = ta−1e−t dt, 0 z where the paths of integration do not cross the negative real axis, and in the case of Γ(a, z) exclude the origin. The definition of γ(a, z) requires the condition <(a) > 0 while in that for Γ(a, z) it is assumed that | arg z| < π. When z 6= 0, Γ(a, z) is an entire function of a, and γ(a, z) extends to a with simple poles at a = −n, n ∈ N, with residue (−1)n/n!. For fixed values of a, both γ(a, z) and Γ(a, z) are multivalued functions of z and are holomorphic on the of the complex . The asymptotic behaviour of γ(a, z) and Γ(a, z) when either a or z is large is well understood (see, for instance, [18, §8.11(i) and §8.11(ii)]). The treatment when both a and z become large is significantly more complicated since the resulting ex- pansions have to take into account the presence of the transition point at z = a, about which the asymptotic structures of γ(a, z) and Γ(a, z) go through an abrupt change. For example, in the case of large positive variables, the normalised in- complete gamma function Q(a, z) = Γ(a, z)/Γ(a) exhibits a sharp decay near the transition point z = a, since it is approximately unity when z < a and decreases algebraically to zero when z > a. The behaviour of the complementary normalised incomplete gamma function P (a, z) = γ(a, z)/Γ(a) follows from the functional re- lation P (a, z) + Q(a, z) = 1. The earliest asymptotic expansions of γ(a, z) and Γ(a, z) for large a and z were given by Mahler [12] and Tricomi [35]. In modern notation, taking λ = z/a, Mahler’s expansion for γ(a, z) may be written ∞ n a −z X (−a) bn(λ) (2.1) γ(a, z) ∼ −z e 2n+1 , n=0 (z − a) π π as a → ∞ in the sector | arg a| ≤ 2 − δ < 2 , provided 0 < λ < 1. With the same notation, Tricomi’s result for Γ(a, z) reads ∞ n a −z X (−a) bn(λ) (2.2) Γ(a, z) ∼ z e 2n+1 , n=0 (z − a) 3π 3π as a → ∞ in the sector | arg a| ≤ 2 − δ < 2 , provided λ > 1. The coefficients bn(λ) are polynomials in λ of degree n, the first few being 2 b0(λ) = 1, b1(λ) = λ, b2(λ) = 2λ + λ, 3 2 4 3 2 b3(λ) = 6λ + 8λ + λ, b4(λ) = 24λ + 58λ + 22λ + λ. Higher coefficients can be computed using the recurrence relation [18, Eq. 8.11.9] 0 bk(λ) = λ(1 − λ)bk−1(λ) + (2k − 1)λbk−1(λ), for k ≥ 1. For other representations of bk(λ), including an explicit expression involving the Stirling numbers of the second kind, the reader is referred to [17]. An analogous expansion for Γ(−a, z) was subsequently provided by Gautschi [5] (which was extended later to complex a by Temme [30]) in the form ∞ n −a −z X a bn(−λ) (2.3) Γ(−a, z) ∼ z e 2n+1 , n=0 (z + a) π π as a → ∞ in the sector | arg a| ≤ 2 − δ < 2 , provided z/a = λ > −1. If we restrict λ to positive values, the expansion (2.3) remains valid in the wider range 6 G. NEMES AND A. B. OLDE DAALHUIS

3π 3π | arg a| ≤ 2 − ω − δ < 2 − ω with ω = arg(λ + log λ + πi), 0 < ω < π. For large positive values of a and complex values of λ, the asymptotic behaviour of Γ(−a, z) was discussed by Dunster [3]. The asymptotic expansions (2.1)–(2.2) break down as λ → 1 (i.e., as the tran- sition point z = a is approached) since their terms become singular in this limit. Similarly, (2.3) fails to hold as λ → −1. An expansion which is useful near the transition point is as follows: r ∞ ∞ π X a2n(ε) X a2n+1(ε) (2.4) Γ(a, z) ∼ zae−z − za−1e−z , 2z zn zn n=0 n=0 as z → ∞ in the sector | arg z| ≤ 2π − δ < 2π with ε = z − a being bounded. The coefficients an(ε) are polynomials in ε of degree n, the first few of which are 1 1 1 1 a (ε) = 1, a (ε) = ε + , a (ε) = ε2 + ε + , 0 1 3 2 2 2 12 1 2 1 4 1 5 5 1 1 a (ε) = ε3 + ε2 + ε + , a (ε) = ε4 + ε3 + ε2 + ε + . 3 3 3 3 135 4 8 12 12 8 288 In the special case that ε = 0, the expansion (2.4) is well known. Its remarkably large region of validity was proved recently by the first author [17]. For the case of general complex ε,(2.4) can be proved by employing the method of steepest descents to the integral representation [18, Eq. 8.6.7] Z +∞ Γ(a, z) = zae−z exp −z(et − t − 1) e−εt dt, <(z) > 0. 0 The region of validity of the resulting asymptotic expansion (2.4) depends only on the singularity structure of the inverse function of et − t − 1 and hence, it is independent of ε. Dingle [2, Ch. VIII, Sec. 3 and Ch. XXIII, Sec. 8] gave several interesting (formal) results about the expansions (2.1)–(2.3) and (2.4) with ε = 0, including re-expansions for the remainder terms and asymptotic approximations for the high- order coefficients. Many of his results have been rigorously justified recently by the first author [16, 17]. These papers also contain sharp bounds for the error terms of the asymptotic expansions (2.2), (2.3) and (2.4) with ε = 0. The expansions (2.1)–(2.3) are suitable for numerical computation when |z − a| is large compared with |a|1/2, for otherwise the early terms of these expansions do not decrease in magnitude. Similarly, the expansion (2.4) is useful only when   z = a + o |a|1/2 . Thus, corresponding to values of |z − a| that are comparable with |a|1/2, there are gaps within which neither of these expansions is suitable. We call these gaps the transition regions. The first attempt to obtain an asymptotic estimate which is valid in the transition regions was made by Tricomi [35], who showed that  2  2  1  1  − 1  1 τ τ + 2  − 1  Q a + 1, a + τa 2 = erfc 2 2 τ + √ exp − + O |a| 2 , 2 2πa 2 3 π π 1/2 as a → ∞ in the sector | arg a| ≤ −δ < , with any fixed τ satisfying arg τa ≤ 2 2   π − δ < π. He also gave, in place of the error term O |a|−1/2 , a complicated ex- pansion in terms of incomplete gamma functions. A similar asymptotic approximation for Q a, a + τa1/2 was subsequently given by Pagurova [20] with an error term of O a−3. Pagurova’s approximation is limited to positive real values of a and real values of τ, but is considerably simpler than that obtained by Tricomi. ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 7

Expansions of a different type were provided by Paris [24, 25] in the form (2.5)  r  2  ∞ ∞ ! γ(a, z) a− 1 −z π χ  − 1  X An(χ) X Bn(χ) ∼ z 2 e exp erfc ∓2 2 χ ± Γ(a, z) 2 2 zn/2 zn/2 n=0 n=1 π π as z → ∞ in the sector | arg z| ≤ 2 − δ < 2 , and <(z − a) ≤ 0 for γ(a, z) and <(z − a) ≥ 0 for Γ(a, z). Here χ is defined by the equality a = z − χz1/2 and the coefficients An(χ) and Bn(χ) are polynomials in χ of degree 3n and 3n − 1, respectively. The first few of these coefficients are as follows: 1 1 1 1 3 1 A (χ) = 1,A (χ) = χ3 + χ, A (χ) = χ6 + χ4 + χ2 + , 0 1 6 2 2 72 6 8 12 1 1 1 11 1 B (χ) = χ2 + ,B (χ) = χ5 + χ3 + χ. 1 6 3 2 72 72 4 The asymptotic expansions (2.5) together cover the transition regions and are also valid away from those regions, i.e., when χ is large. However, as it was noted by Paris [25], even for moderately large values of χ, the practical use of the expansions is problematic because of severe numerical cancellations. Therefore, the use of these asymptotic expansions should be confined to bounded values of χ. Other asymptotic expansions for γ(a, z) and Γ(a, z), similar to those of (2.5), were derived by Dingle [2, p. 249] and L´opez et al. [7]. Asymptotic expansions for the normalised incomplete gamma function Q(a, z) which are uniformly valid in the variables a and z were first established by Temme [27, 31]. His results may be stated as follows. Define

1 λ = z/a and η = η(λ) = (2(λ − 1 − log λ)) 2 , where the branch of the is continuous and satisfies η(λ) ∼ λ − 1 as λ → 1. Then as a → ∞ in the sector | arg a| ≤ π − δ < π, ∞ 1  − 1 1  1 1 2  X cn(η) (2.6) Q(a, z) ∼ erfc 2 2 ηa 2 + √ exp − η a 2 2 an 2πa n=0 and (2.7) ±πia ∞ e ±πi 1  − 1 1  i 1 2  X n cn(η) Q −a, ze ∼ ± erfc ±2 2 iηa 2 −√ exp η a (−1) , 2i sin(πa) 2 2 an 2πa n=0 uniformly with respect to λ in the sector | arg λ| ≤ 2π − δ < 2π. The coefficients cn(η) are holomorphic functions of η and are defined recursively by 1 1 γ 1 dc (η) (2.8) c (η) = − , c (η) = n + n−1 (n ≥ 1), 0 λ − 1 η n λ − 1 η dη where the γn’s are the Stirling coefficients appearing in the well-known asymptotic expansion of the gamma function (see, for example, [15]). Temme’s expansions feature the characteristic error function behaviour near the transition point z = a (where η = 0) and also describe the large-a asymptotics uniformly in z. However, they suffer from the inconvenience of the coefficients cn(η) having a removable singularity at η = 0, which makes their evaluation in the neighbourhood of the transition point difficult. To overcome this difficulty, Temme [27] gave power series expansions in η for these coefficients which do not have a removable singularity. The asymptotic properties of the cn(η)’s for large n were studied by Dunster et al. [4] and the second author [19]. Explicit expressions for these coefficients can be found in the paper [15]. Computable error bounds for the asymptotic expansion (2.6) were established by Temme [27] for real variables, and by Paris [23] for complex variables. 8 G. NEMES AND A. B. OLDE DAALHUIS

Although our expansions (1.1) and (1.2) are not valid in as large a domain of a and z as those in (2.6) and (2.7), the coefficients have the advantage of not possessing a removable singularity at the transition point z = a and so are more straightforward to compute. Pagurova’s result is a special case of the expansion (1.1) truncated after the first six terms and restricted to large positive real values of a and real values of τ. The expansions (2.5) are similar in character to the expansion (1.1), but they are for the non-normalised functions γ(a, z) and Γ(a, z) and have more complicated forms and smaller regions of validity compared to (1.1). Also, the coefficients of these asymptotic expansions seem not to satisfy simple recurrence relations like those of the expansion (1.1). Asymptotic expansions analogous to (1.1) and (1.2) for the complementary normalised incomplete gamma function P (a, z) follow from the functional relation P (a, z) + Q(a, z) = 1.

3. Proof of Theorem 1.1 From (2.6), we can assert that for any non-negative integer N,

N−1  ! 1  − 1 1  1 1 2  X cn(η) 1 Q(a, z) = erfc 2 2 ηa 2 + √ exp − η a + O , 2 2 an N,δ |a|N 2πa n=0 as a → ∞ in the sector | arg a| ≤ π − δ < π, uniformly with respect to λ in the sector | arg λ| ≤ 2π − δ < 2π. (Throughout this paper, we use subscripts in the O notations to indicate the dependence of the implied constant on certain parameters.) We employ this result with the choice of λ = 1 + τa−1/2 and assume −1/2 1 π that τa < 2 , in particular, | arg λ| < 2 . Consequently, we have

2 Z 1 t 1 |η|2 = τa−1/2 − log(1 + τa−1/2) = τa−1/2 dt 2 −1/2 0 1 + τa t 2 Z 1 t 2 < τa−1/2 dt < τa−1/2 < τa−1/2 , −1/2 0 1 − τa t that is, |η| < 1. We have the convergent expansions

∞ k   X k τ 1 1 η2 = τa−1/2 − log 1 + τa−1/2 = (−1) 2 k ak/2 k=2 2 ∞ k ! τ 1 X k 2τ 1 = 1 + (−1) 2 a k + 2 ak/2 k=1 and ∞ τ X mk(τ) η = + , a1/2 ak/2 k=2 where mk(τ) is a monomial in τ of degree k. Let h denote a whose value will be specified later. Employing the known expression for the higher of the complementary error function [18, Eq. 7.10.1] and the Taylor formula with integral remainder, we find

 1   1  1 − 2 1 − 2 2 erfc 2 τ + h = 2 erfc 2 τ

 2  N−1 n ! 1 τ X (−1)  − 1  n + √ exp − H 2 2 τ h + R (h, τ) , π 2 n! n−1 N n=1 ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 9 where √  2  Z h π τ (N)  − 1  N−1 RN (h, τ) = exp erfc 2 2 τ + t (h − t) dt 2(N − 1)! 2 0 N Z h (−1)  − 1   1 2 N−1 = HN−1 2 2 τ + t exp −2 2 τt − t (h − t) dt (N − 1)! 0  N−1 N  = ON (|τ| + 1) |h| exp (O(|τh|)) as h → 0 and Hn(w) denotes the nth Hermite polynomial [18, §18.3]. Assuming that τ = o |a|1/4 for large a and using this expansion with

∞  2  X − 1 mk+1(τ) |τ| h = 2 2 = O = o(1) ak/2 |a|1/2 k=1 and with N + 1 in place of N, we obtain ∞ ! 1  − 1 1  1 − 1 X − 1 mk+1(τ) 1  − 1  erfc 2 2 ηa 2 = erfc 2 2 τ + 2 2 = erfc 2 2 τ 2 2 ak/2 2 k=1  2  N−1 3N+2   3 !! 1 τ X pn(τ) (|τ| + 1) |τ| + √ exp − + O exp O . 2 an/2 N N/2 |a|1/2 2πa n=0 |a|

Here pn(τ) is a polynomial in τ of degree at most 3n + 2. We have N−1 !  τ 2   τ 2  X hn exp − + h = exp − + O |h|N exp(|h|) 2 2 n! N n=0 for any complex h. Applying this expansion with

∞ k+2 3 ! X k+1 τ 1 |τ| h = (−1) = O , k + 2 ak/2 1/2 k=1 |a| we deduce 2 ∞ k+2 ! τ X k+1 τ 1 exp − 1 η2a = exp − + (−1) 2 2 k + 2 ak/2 k=1  2  N−1 3N 3 !!!! τ X qn(τ) (|τ| + 1) |τ| = exp − + O exp O , 2 an/2 N N/2 1/2 n=0 |a| |a| where qn(τ) is a polynomial in τ of degree at most 3n. We have the power series expansion ∞ X k cn(h) = cn(0) + fn,kh , k=1 √ which converges if |h| < 2 π (cf. [18, Eq. 8.12.11] or AppendixB). Applying this expansion with h = η (|η| < 1), we find ∞ ! ∞ τ X mk(τ) X rk(τ) c (η) = c + = , n n a1/2 ak/2 ak/2 k=2 k=0 where rk(τ) is a monomial in τ of degree k. Consequently, N−1   N−1 N ! X cn(η) 1 X sn(τ) (|τ| + 1) + O = + O an N,δ |a|N an/2 N,δ N/2 n=0 n=0 |a| 10 G. NEMES AND A. B. OLDE DAALHUIS where sn(τ) is a polynomial in τ of degree at most n. Collecting all the partial results, we finally have (3.1)  1   1  2 1 − 2 Q(a, z) = Q a, a + τa = 2 erfc 2 τ

 2  N−1 3N+2 3 !!!! 1 τ X Cn(τ) (|τ| + 1) |τ| + √ exp − + O exp O 2 an/2 N,δ N/2 1/2 2πa n=0 |a| |a| for any non-negative integer N as a → ∞ in the sector | arg a| ≤ π−δ < π, provided  1/4 that τ = o |a| . Here Cn(τ) is a polynomial in τ of degree at most 3n + 2. If τ is bounded, then the error term in (3.1) is of the same order of magnitude as the first neglected term and hence, the asymptotic expansion (1.1) holds. In a similar manner, starting with the asymptotic expansion (2.7), it can be shown that (3.2) ±πia e  1 ±πi 1  − 1  Q −a, (a + τa 2 )e = ± erfc ±2 2 iτ 2i sin(πa) 2  2  N−1 3N+2 3 !!!! i τ X Cen(τ) (|τ| + 1) |τ| − √ exp + O exp O 2 an/2 N,δ N/2 1/2 2πa n=0 |a| |a| for any non-negative integer N as a → ∞ in the sector | arg a| ≤ π − δ < π,  1/4 provided that τ = o |a| . The coefficients Cen(τ) are polynomials in τ of degree at most 3n + 2. If τ is bounded, then the error term in (3.2) is of the same order of magnitude as the first neglected term and hence, the asymptotic expansion (1.2) n holds. To show that Cen(τ) = (−i) Cn(iτ), we can proceed as follows. Assuming that τ is bounded and applying (3.2) with ae∓πi/2 in place of a, a → +∞, we find

π π π π 1 1  ± i ± i ± i ± i 2  Q ae 2 , ae 2 + τe 2 ae 2 1 − e−2πa  2  ∞ n 1  − 1 ± π i 1 τ X (±i) Cen(τ) ∼ erfc 2 2 τe 2 + √ exp . 2 ± π i 2 ± π in/2 2πae 2 n=0 ae 2 Since, for any non-negative integer N, 1/(1−e−2πa) = 1+O(a−N ) as a → +∞, the ± π i right hand side must agree with that of (2.6) when applied with τe 2 in place of τ ± π i n and ae 2 in place of a, a → +∞. Therefore, we find that (±i) Cen(τ) = Cn(±iτ), n that is Cen(τ) = (∓i) Cn(±iτ). By the parity properties of the polynomials Cn(τ) n (see below), this latter equality simplifies to Cen(τ) = (−i) Cn(iτ). We proceed by proving the claimed properties of the polynomials Cn(τ). The differential equation [18, §8.2(iii)] ∂2Q(a, z)  1 − a ∂Q(a, z) + 1 + = 0 ∂z2 z ∂z implies that

2  1   1  ∂ Q a, a + τa 2 ∂Q a, a + τa 2  − 1   − 1  1 + τa 2 + τ + a 2 = 0. ∂τ 2 ∂τ Substituting (1.1) into the left-hand side of this equation and equating the coeffi- −n/2 1 2 1 cients of a on both sides yield C0(τ) = 3 τ − 3 and 0 00 2 2 0 00 (3.3) Cn(τ) + τCn(τ) − Cn(τ) = τ(τ − 2)Cn−1(τ) − (2τ − 1)Cn−1(τ) + τCn−1(τ) ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 11 for n ≥ 1. Using induction on n and the fact that the corresponding homogeneous equation w(τ) + τw0(τ) − w00(τ) = 0 has no non-zero polynomial solution, it follows that (3.3) determines the polynomials Cn(τ) uniquely. An induction on n and (3.3) imply that the degree of the polynomial Cn(τ) is exactly 3n + 2. n Lastly, we prove that Cn(−τ) = (−1) Cn(τ), i.e., the even- and odd-order polynomials are even and odd functions, respectively. We substitute the polynomial expansion

3n+2 X k (3.4) Cn(τ) = cn,kτ , k=0 into (3.3) and obtain for the coefficients the recurrence relation 2k 1 (3.5) c = (k + 2)c + (k + 1)c − c + c . n,k n,k+2 n−1,k+1 k + 1 n−1,k−1 k + 1 n−1,k−3 1 2 1 Since C0(τ) = 3 τ − 3 , it follows that 1 (3.6) c = , c = 0, n,3n+2 3n+1(n + 1)! n,3n+1 holds for n = 0, and by the recurrence relation (3.5) we can show that (3.6) holds for n ≥ 1. Starting with the first equation in (3.6) and then taking k = 3n, 3n−2, 3n− 4,..., we can compute the non-zero coefficients in the expansion (3.4). Similarly, it follows that cn,k = 0 for k = 3n + 1, 3n − 1, 3n − 3,.... Accordingly, Cn(−τ) = n (−1) Cn(τ). The first several polynomials Cn(τ) are given in Table1.

n Cn(τ)

1 2 1 0 3 τ − 3 1 5 11 3 1 1 18 τ − 36 τ + 12 τ 1 8 29 6 133 4 23 2 1 2 162 τ − 324 τ + 540 τ − 540 τ − 540 1 11 7 9 463 7 883 5 23 3 1 3 1944 τ − 486 τ + 4320 τ − 4320 τ + 864 τ − 288 τ 1 14 23 12 881 10 1507 8 7901 6 61 4 23 2 25 4 29160 τ − 14580 τ + 38880 τ − 12960 τ + 45360 τ − 3024 τ + 6048 τ + 6048 1 17 137 15 2149 13 42331 11 5910101 9 413177 7 5 524880 τ − 1049760 τ + 699840 τ − 1399680 τ + 48988800 τ − 2721600 τ 3239 5 319 3 139 + 194400 τ − 155520 τ − 51840 τ 1 20 191 18 1483 16 47639 14 1810717 12 6 11022480 τ − 22044960 τ + 4898880 τ − 9797760 τ + 48988800 τ 1996859 10 146611 8 2203 6 11 4 259 2 101 − 16329600 τ + 1088640 τ − 155520 τ + 10368 τ + 155520 τ + 155520 1 23 127 21 2939 19 2911 17 3217793 15 7 264539520 τ − 264539520 τ + 125971200 τ − 5248800 τ + 470292480 τ 33561391 13 13697119 11 3797293 9 213841 7 4069 5 − 783820800 τ + 111974400 τ − 31352832 τ + 17418240 τ − 7464960 τ 6101 3 571 − 7464960 τ + 2488320 τ 1 26 163 24 35047 22 41279 20 168240799 18 8 7142567040 τ − 7142567040 τ + 23808556800 τ − 850305600 τ + 190468454400 τ 26988481 16 1266722761 14 3211451701 12 21361155917 10 − 3023308800 τ + 26453952000 τ − 26453952000 τ + 193995648000 τ 419199161 8 889093 6 510887 4 2016373 2 3184811 − 38799129600 τ + 2771366400 τ + 923788800 τ − 3695155200 τ − 3695155200

Table 1. The coefficients Cn(τ) for 0 ≤ n ≤ 8. 12 G. NEMES AND A. B. OLDE DAALHUIS

4. Proof of Proposition 1.2 The new asymptotic expansions (1.1) and (1.2) were proved under the assump- tions that a is large and τ is bounded. Here we show that the restriction on τ can be relaxed and the expansions (1.1) and (1.2) are still valid in the sense of generalised asymptotic expansions. µ 1 Suppose that |τ| = O (|a| ) as a → ∞ with some constant µ < 6 . With these −n/2 provisos, since Cn(τ) is a polynomial in τ of degree 3n+2, the sequences Cn(τ)a n −n/2 and (−i) Cn(iτ)a (n = 0, 1, 2,...) are asymptotic sequences as a → ∞. Fur- thermore, the remainder terms in (3.1) and (3.2) have the same order of magnitude −N/2 N −N/2 as the corresponding first neglected terms CN (τ)a and (−i) CN (iτ)a , respectively. This proves that, with the above assumptions on τ, the expansions (1.1) and (1.2) are indeed generalised asymptotic expansions.

5. Proof of Theorems 1.3 and 1.4 We begin with the proof of Theorem 1.3. The equations (1.1), (1.3) and (1.4) imply that

r  2  ∞ π τ   − 1   − 1  X Cn(τ) (5.1) E(τ) := exp erfc 2 2 τ − erfc 2 2 τ ∼ , 2 2 0 a(n+1)/2 n=0 as a → +∞. The function E(τ) satisfies the second order linear homogeneous differential equation (5.2) E00(τ) − τE0(τ) − E(τ) = 0.

Expanding E(τ) into a power series around τ = τ0, and substituting it into (5.2), we find that ∞ X k (5.3) E(τ) = Pk(τ0)(τ − τ0) k=1 1 where P1(τ0) = 1, P2(τ0) = 2 τ0 and

kPk(τ0) = τ0Pk−1(τ0) + Pk−2(τ0), for k ≥ 3. We seek for a solution of the asymptotic equality (5.1) in the form

∞ X dk(τ0) (5.4) τ ∼ τ + , a → +∞. 0 a(k+1)/2 k=0 Substituting (5.4) into (5.3) and expanding in powers of a−1/2, we deduce

∞ k+1 ! X X 1 E(τ) ∼ P (τ )B (d (τ ), . . . , d (τ )) , m 0 k+1,m 0 0 k−m+1 0 a(k+1)/2 k=0 m=1 as a → +∞, where Bk,m are the partial ordinary Bell polynomials (see, e.g., [15, Appendix]). Similarly, employing (3.4), we obtain

∞ ∞ 3n+2 m X Cn(τ) X X cn,m  τ  ∼ a(n+1)/2 a(n−m+1)/2 a1/2 n=0 n=0 m=0 ∞ k 3n+2 ! X X X 1 ∼ c B (τ , d (τ ), . . . , d (τ )) , n,m k−n+m,m 0 0 0 k−n−1 0 a(k+1)/2 k=0 n=0 m=0 ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 13 as a → +∞. By equating to zero the coefficients of powers of a−1/2, and using 1 2 1 P1(τ0) = 1, we derive the recurrence relation d0(τ0) = 3 τ0 − 3 and

k+1 X dk(τ0) = − Pm(τ0)Bk+1,m(d0(τ0), . . . , dk−m+1(τ0)) (5.5) m=2 k 3n+2 X X + cn,mBk−n+m,m(τ0, d0(τ0), . . . , dk−n−1(τ0)), n=0 m=0 for k ≥ 1. We can use this recurrence and induction on k to prove that dk(−τ0) = k (−1) dk(τ0), i.e., that the even and odd-order polynomials are even and odd func- tions, respectively. The identity clearly holds for k = 0. Suppose that k ≥ 1. Using m+1 induction, it is easy to see that Pm(−τ0) = (−1) Pm(τ0). From the properties of the partial ordinary Bell polynomials, we can infer that

k−m+1 Bk+1,m(d0(−τ0), . . . , dk−m+1(−τ0)) = Bk+1,m(d0(τ0),..., (−1) dk−m+1(τ0)) k−m+1 = (−1) Bk+1,m(d0(τ0), . . . , dk−m+1(τ0)) and

Bk−n+m,m(−τ0, d0(−τ0), . . . , dk−n−1(−τ0)) k−n−1 = Bk−n+m,m(−τ0, d0(τ0),..., (−1) dk−n−1(τ0)) k−n+m = (−1) Bk−n+m,m(τ0, d0(τ0), . . . , dk−n−1(τ0)).

n −n+m Finally, Cn(−τ) = (−1) Cn(τ) implies cn,m = (−1) cn,m. Employing all k these relations in (5.5), it follows readily that dk(−τ0) = (−1) dk(τ0). A similar argument would show that the degree of dk(τ0) as a polynomial in τ0 is at most 3k + 2. To prove that the degree is actually k + 2, we need another recurrence for these polynomials. In order to obtain this recurrence, we proceed as follows. If we differentiate both sides of the asymptotic equality

∞ ! 1  − 1  1 X dk(τ0) erfc 2 2 τ ∼ Q a, a + τ a 2 + , a → +∞, 2 0 0 ak/2 k=0 with respect to τ0, we find a−1  2  ∞ ! ! 1 τ0 1 1 X dk(τ0) − 1 −√ exp − ∼ −√ 1 + τ + a 2 2 Γ∗(a) 0 a(k+1)/2 2π 2π k=0 ∞ ! ∞ 0 ! 1 X dk(τ0) X dk(τ0) × exp −τ a 2 − 1 + 0 ak/2 a(k+1)/2 k=0 k=0 as a → +∞, where Γ∗(a) := Γ(a)eaa1/2−a(2π)−1/2 is the so-called scaled gamma function. Taking , we can assert that

2 ∞ ! ! τ0 ∗ X dk(τ0) − 1 − ∼ − log Γ (a) + (a − 1) log 1 + τ + a 2 2 0 a(k+1)/2 k=0 ∞ ∞ 0 ! 1 X dk(τ0) X dk(τ0) − τ a 2 − + log 1 + . 0 ak/2 a(k+1)/2 k=0 k=0 Expanding the right-hand side in powers of a−1/2, applying the known asymptotic expansion of log Γ∗(a)[18, Eq. 5.11.1], and comparing the coefficients of powers of 14 G. NEMES AND A. B. OLDE DAALHUIS a−1/2 on each side, we deduce (5.6) k+2 m X (−1) B (τ , d (τ ), . . . , d (τ )) m k+2,m 0 0 0 k−m+1 0 m=2 k m X (−1) + B (d0 (τ ), . . . , d0 (τ )) − B (τ , d (τ ), . . . , d (τ )) m k,m 0 0 k−m 0 k,m 0 0 0 k−m−1 0 m=1

 B2n − if k = 4n − 2, = 2n(2n − 1) 0 otherwise.

Here B2n denotes the even-order Bernoulli numbers [18, §24.2(i)]. We can extract out the highest coefficient dk−1(τ0) and write the above expression as

k−1 0 1 X τ0dk−1(τ0) − dk−1(τ0) + 2 dm−1(τ0)dk−m−1(τ0) m=1 k+2 m X (−1) + B (τ , d (τ ), . . . , d (τ )) m k+2,m 0 0 0 k−m+1 0 m=3 k m k m X (−1) X (−1) + B (d0 (τ ), . . . , d0 (τ )) − B (τ , d (τ ), . . . , d (τ )) m k,m 0 0 k−m 0 m k,m 0 0 0 k−m−1 0 m=2 m=1

 B2n − if k = 4n − 2, = 2n(2n − 1) 0 otherwise. Now a simple induction argument using the properties of the partial ordinary Bell polynomials shows that the degree of dk−1(τ0) as a polynomial in τ0 is at most k + 1. It remains to prove that the leading coefficients of these polynomials are non-zero. Let us denote δ1 = 1 and k+2 dk(τ0) = δk+2τ0 + ··· , for k ≥ 0. From (5.6), we can infer that

k m X (−1) B (δ , . . . , δ ) = 0, k ≥ 3, m k,m 1 k−m+1 m=2 or, equivalently,

k m+1 X (−1) B (δ , . . . , δ ) = δ , k ≥ 3. m k,m 1 k−m+1 k m=1 By the definition of the partial ordinary Bell polynomials, this equality translates to the following relation between

∞ ! ∞ X x2 X log 1 + δ xk = − + δ xk. k 2 k k=1 k=1 By the results of the paper [1], we have the explicit expression " # 1 dk−1  x2/2 k/2 δ = k k! dxk−1 ex − x − 1 x=0 ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 15 provided k ≥ 3. Combining this expression with the results of the paper [17], we find that the sequence δk is related to the coefficients of the large-a asymptotic expansion of Γ(a, a) as follows: r r ∞ ! π 1 2 X (k + 1)!δk+1 1 Γ(a, a) ∼ aa−1/2e−a 1 − + , a → +∞. 2 3 πa 2k/2Γ k + 1 ak/2 k=2 2 The coefficients in this asymptotic expansion are known to be non-zero as a conse- quence of their integral representations given in [17]. Thus, δk 6= 0 if k ≥ 3. The 1 case k = 2 is trivial since δ2 = 3 . We continue with the proof of Theorem 1.4. A simple manipulation of (1.2) shows that (5.7) r ∞ n !  2  a ∗ sin(πa) √  − 1  2π X (−i) Cn(iτ) τ (−x) γ (a, x) ∼ cos(πa)+ 2 πF 2 2 τ + exp , π −a n/2 2 n=0 (−a) as a → −∞, uniformly with respect to bounded real values of τ (compare [18, 1 2 Eq. 8.11.11]). Here x = a − τ (−a) . Now, let x−(a) be the unique negative zero of 1 ∗ 2 γ (a, x) and write x−(a) = a − τ (−a) . Employing the definition (1.7) of τ1,(5.7) may be rewritten in the form √  2    2   2  ∞ n τ  − 1  τ1  − 1  τ X (−i) Cn(iτ) 2 exp − F 2 2 τ exp − F 2 2 τ exp ∼ , 2 1 2 2 (n+1)/2 n=0 (−a) as a → −∞. This asymptotic equality is further equivalent to r  2  ∞ n+1 π τ  − 1 − 1  X (−i) Cn(iτ) (5.8) exp − erfc(2 2 iτ ) − erfc(2 2 iτ) ∼ , 2 2 1 (−a)(n+1)/2 n=0 as a → −∞. Thus, the inversion problem is formally equivalent to that of (5.1), πi with iτ, iτ1 and −ae in place of τ, τ0 and a. Therefore, if we seek for a solution of the asymptotic equality (5.8) in the form ∞ X dek(τ1) τ ∼ τ + , a → −∞, 1 (−a)(k+1)/2 k=0 k using the above procedure, we find that dek(τ1) = −(−i) dk(iτ1). We close this section by commenting on the implementation of the recurrence relation (5.5). To evaluate the partial ordinary Bell polynomials, we use the formal generating function [15, Appendix] ∞ ! ∞ ∞ X X X Bk,m (α1, α2, . . . , αk−m+1) (5.9) exp y α xn = xkym. n m! n=1 k=0 m=0 The Taylor coefficients of this generating function can be easily obtained with any computer algebra package. We combine (5.9) with (5.5) to compute the dk(τ0)’s. The explicit forms of the first several coefficients are presented in Table2 below. ∞ X Note that when evaluating Bk,m (m = 0, 1, . . . , k) via (5.9), the sum can be n=1 k+1 X replaced by the finite sum . n=1 6. Numerical comparisons In this section, we compare the global uniform asymptotic expansion (2.6) with our new transition region expansion (1.1). We denote λ = z/a as usual. 16 G. NEMES AND A. B. OLDE DAALHUIS

n dn(τ0)

1 2 1 0 3 τ0 − 3 1 3 7 1 36 τ0 − 36 τ0 1 4 7 2 8 2 − 270 τ0 − 810 τ0 + 405 1 5 8 3 433 3 4320 τ0 + 1215 τ0 − 38880 τ0 1 6 1 4 923 2 184 4 17010 τ0 − 840 τ0 − 204120 τ0 + 25515 139 7 1451 5 289517 3 289717 5 − 5443200 τ0 − 48988800 τ0 + 146966400 τ0 + 146966400 τ0 1 8 769 6 151 4 104989 2 2248 6 204120 τ0 + 9185400 τ0 − 874800 τ0 − 55112400 τ0 + 3444525 571 9 1087 7 30469 5 219257 3 1500053 7 − 2351462400 τ0 − 41990400 τ0 − 235146240 τ0 + 661348800 τ0 + 846526464 τ0 281 10 49271 8 997903 6 101251277 4 8 − 1515591000 τ0 + 15588936000 τ0 + 15588936000 τ0 + 654735312000 τ0 96026707 2 19006408 − 280600848000 τ0 − 15345358875 163879 11 209488529 9 252836779 7 15974596457 5 9 2172751257600 τ0 + 293321419776000 τ0 − 20951529984000 τ0 − 146660709888000 τ0 556030221167 3 487855454729 − 2639892777984000 τ0 + 2639892777984000 τ0 5221 12 1316963 10 329677 8 1386098437 6 10 − 354648294000 τ0 − 2708223336000 τ0 − 255346771680 τ0 + 53622822052800 τ0 11414859619 4 1069525622411 2 5667959576 + 71497096070400 τ0 + 3217369323168000 τ0 − 12567848918625

Table 2. The coefficients dn(τ0) for 0 ≤ n ≤ 10.

6.1. The transition region expansion. According to Proposition 1.2, the tran- µ 1 sition region expansion (1.1) holds for τ = O (|a| ), as a → ∞, with µ < 6 , that is ν 1 for λ − 1 = O (|a| ), with ν < − 3 . The main reason for this is that the coefficients 1/6 Cn(τ) are polynomials of degree 3n + 2, and if τ ∼ Ka held, all the terms in the divergent asymptotic expansion (1.1) would be of the same order. It follows from (3.4) and (3.6) that if we replaced the Cn(τ)’s in (1.1) by their leading terms, then the resulting infinite series would actually converge. Numerical experiments illustrate that even in the case that τ ∼ Ka1/6, the expansion (1.1) still provides reasonable approximations. Accordingly, the expansion (1.1) has an asymptotic µ 1 1 property when τ = O (|a| ), with µ < 6 , and we can allow µ to be close to 6 .

6.2. The global uniform asymptotic expansion. The global uniform asymp- totic expansion (2.6) has the advantage that it is valid as a → ∞, uniformly with respect to λ in the sector | arg λ| ≤ 2π − δ < 2π. The main drawback of the ex- pansion is that the coefficients are significantly more complicated than the bn(λ)’s and Cn(τ)’s above, which are polynomials satisfying simple recurrence relations. The evaluation of the coefficients cn(η) near the point η = 0 (λ = 1) is especially difficult because they possess a removable singularity at this point. In Appendix B, we give several methods to compute the cn(η)’s in a stable manner. In Figure1, we compare the terms of the asymptotic series (1.1) and (2.6) in the case that a = 3 and τ = 0.1. Since τ it small, it is illustrated that C2n(τ) ≈ cn(η), which follows from the identity C2n(0) = cn(0). The terms first decrease in magnitude, reach a minimum, and then increase. This is the typical behaviour of Gevrey-1 divergent series (see, e.g., [13]). The grey asterisks in Figure1 are the absolute values of the remainders in (1.1) after n terms. As expected, they are approximately of the same size as the corresponding first neglected terms. This will also be the case for the uniform asymptotic expansion (2.6). It is suggested by ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 17

a = 3 τ = 0.1

n

Figure 1. The of the nth term in (1.1) (crosses), 1 the absolute value of the 2 nth term (for even n) in (2.6) (circles), and the absolute value of the remainder in (1.1) after n terms (grey asterisks).

Figure1 that in the case of n = 34, our approximation produces 11 correct digits whereas the uniform asymptotic approximation (2.6) gives us only 9 correct digits.

a = 3 τ = 1.1

n

Figure 2. The absolute value of the nth term in (1.1) (crosses), 1 the absolute value of the 2 nth term (for even n) in (2.6) (circles), and the absolute value of the remainder in (1.1) after n terms (grey asterisks).

Similarly, in Figure2, we consider the case that a = 3 and τ = 1.1. No significant difference is seen between Figures1 and2. Finally, in Figure3, we consider the case when a = 3 and τ = 1.321, that is, when τ ≈ 1.1a1/6. Thus, the divergent series (1.1) does not have an asymptotic property anymore. Although the behaviour of the terms in (1.1) has clearly changed, it seems that the magnitudes of the smallest terms in (1.1) and (2.6) remained approximately equal.

Acknowledgement The authors thank the anonymous referee for his/her helpful comments and suggestions on the manuscript.

Appendix A. Asymptotic expansions away from the transition points The outer expansions (2.1) and (2.2) break down near the transition point, that is, when λ approaches 1, since their terms become singular in this limit. Note 18 G. NEMES AND A. B. OLDE DAALHUIS

a = 3 τ = 1.321

n

Figure 3. The absolute value of the nth term in (1.1) (crosses), 1 the absolute value of the 2 nth term (for even n) in (2.6) (circles), and the absolute value of the remainder in (1.1) after n terms (grey asterisks). that in Theorem 1.1 we take z = a + τa1/2, thus λ = z/a = 1 + τa−1/2. In the forthcoming we examine the τ-region of validity of these outer expansions. For (2.1) and (2.2) to have an asymptotic property we need (z − a)2 /a = a (λ − 1)2 to be large as a → ∞. Hence, we require that λ−1 = O (|a|ν ), as a → ∞, 1 1/2 µ with ν > − 2 . Therefore, since τ = (λ − 1)a , we require that τ = O (|a| ), as a → ∞, with µ > 0. We can also consider the optimal number of terms of the divergent series (2.1) 1 and (2.2) to illustrate the necessity of the condition ν > − 2 . For this, we need the asymptotic behaviour of the coefficients bn(λ) as n → +∞. We take λ > 0, λ 6= 1. Then, according to [2, Eq. 23, p. 161], [17], we have 1 Γ n + 1  (λ − 1)2n+1   1  (A.1) b (λ) = √ 2 sgn(λ − 1) 1 + O n n+ 1 λ 2π (λ − log λ − 1) 2 n as n → +∞. Now let n be the optimal number of terms of the divergent series (2.1) and (2.2), i.e., the index of the numerically least term. Then, by (A.1), approximately n+1 (−a) bn+1(λ) (z−a)2n+3 bn+1(λ) n 1 ≈ n = ∼ , (−a) bn(λ) a (λ − 1)2 b (λ) a(λ − 1 − log λ) (z−a)2n+1 n ν 1 as n → +∞. In the case that λ − 1 = O (|a| ), with − 2 < ν < 0, we have 1+2ν 1 2n ≈ |a| , and the optimal number of terms shrinks to zero as ν approaches − 2 .

Appendix B. The coefficients in the uniform asymptotic expansions As mentioned above, in Temme [27] power series expansions in η are given for the coefficients cn(η). Here we consider the same expansion, but also one in powers of λ − 1; the latter seems more natural, and the details are simpler. In both cases, we give (new) recurrence relations for the coefficients. We introduce the expansions ∞ ∞ X k X k (B.1) cn(η) = ek,n (λ − 1) = fk,nη . k=0 k=0

Observe that c0(η) satisfies the equation 2 2 2 (λ − log λ − 1) ((λ − 1)c0(η) − 1) = (λ − 1) , ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 19

dη and since λη dλ = λ − 1, the recurrence relation in (2.8) can be written as γ λ dc (η) c (η) = n + n−1 , n ≥ 1. n λ − 1 λ − 1 dλ

Therefore, we obtain for the coefficient ek,n the recurrence relations

k+1 k l k l m (−1) X (−1) X X (−1) (B.2) e = − 2 e − e e , k,0 k + 3 l + 2 k−l,0 m + 1 k−l,0 l−m,0 l=1 l=1 m=1 1 thus e0,0 = − 3 , and

(B.3) ek,n+1 = (k + 1)ek+1,n + (k + 2)ek+2,n. Hence, it is straightforward to compute the first several coefficients. Note that if we know the first K Taylor coefficients of cn(η), then we can use (B.3) to compute the first K − 2 Taylor coefficients of cn+1(η). In each step we lose two Taylor coefficients. Fortunately, this is not a serious problem, since it is easy to compute many of the coefficients for c0(η) via (B.2). Regarding the coefficients fk,n in (B.1), we observe that c0(η) satisfies the dif- ferential equation dc (η) η 0 + η2c3(η) + η2 + 3η c2(η) + (2η + 3)c (η) + 1 = 0, dη 0 0 0 and that we can rewrite (2.8) as 1 dc (η)  (B.4) c (η) = γ c (η) + n−1 + γ . n n 0 η dη n

Therefore, we obtain for the coefficient fk,n the recurrence relations (B.5) k k k k−l X X X X −(k+3)fk,0 = 2fk−1,0+3 fl−1,0fk−l,0+ fl−2,0fk−l,0+ fl−2,0fm,0fk−l−m,0, l=1 l=2 l=2 m=0 1 with f0,0 = − 3 , and

(B.6) fk,n+1 = (k + 2)fk+2,n − f1,nfk,0.

Note that from (B.4) it follows that γn+1 + f1,n = 0, and we have used this to express the final term in (B.6) in terms of f1,n. √ In (B.1), the first series converges for |λ − 1| < 1 and the second for |η| < 2 π. Hence, although the λ-sum has the advantage that it is in terms of the original parameter, the η-sum has the advantage that it converges in a larger region. Another way to compute the cn(η)’s in a stable manner is to use the integral representation [4] i (−1)n Γ(n + 1 ) I dt c (η) = 2 , n 3 n+ 1 (2π) 2 {1,λ} (t − λ)(t − 1 − log t) 2 where the contour of integration is a simple loop surrounding the points 1 and λ in the positive sense. Taking λ close to 1, we can choose for the contour a circle with centre 1 and radius r < 1. According to the paper [34], the trapezoidal rule converges exponentially fast for this type of integral and we obtain a simple method to compute the coefficients via (B.7) s 2 ωm 1 M ω − log(ω + 1) Γ(n + 2 ) X m m πim/M cn(η) ≈ √ n , where ωm = re . (λ − ωm − 1) (log(ωm + 1) − ωm) 2M 2π m=1−M 20 G. NEMES AND A. B. OLDE DAALHUIS

2 The introduction of the factor ωm inside the square root makes it single-valued, and therefore computer algebra packages can work with (B.7) without any problems.

References [1] S. Brassesco, M. A. M´endez,The asymptotic expansion for n! and the Lagrange inversion formula, Ramanujan J. 24 (2011), no. 2, pp. 219–234. [2] R. B. Dingle, Asymptotic Expansions: Their Derivation and Interpretation, Academic Press, London, 1973. [3] T. M. Dunster, Asymptotics of the generalized , and error bounds in the uniform asymptotic smoothing of its Stokes discontinuities, Proc. Roy. Soc. London Ser. A 452 (1996), no. 1949, pp. 1351–1367. [4] T. M. Dunster, R. B. Paris, S. Cang, On the high-order coefficients in the uniform asymptotic expansion for the incomplete gamma function, Methods Appl. Anal. 5 (1998), no. 3, pp. 223– 247. R ∞ −xt −n [5] W. Gautschi, Exponential integral 1 e t dt for large values of n, J. Res. Nat. Bur. Standards 62 (1959), pp. 123–125. [6] M. B. Giles, Algorithm 955: Approximation of the inverse Poisson cumulative distribution function, ACM Trans. Math. Softw. 42 (2016), no. 1, Article 7, 22 pp. [7] C. Ferreira, J. L. L´opez, E. P´erez-Sinus´ıa,Incomplete gamma functions for large values of their variables, Adv. in Appl. Math. 34 (2005), no. 3, pp. 467–485. [8] H. E. Fettis, An asymptotic expansion for the upper percentage points of the χ2-distribution, Math. Comp. 33 (1979), no. 147, pp. 1059–1064. [9] N. L. Johnson, S. Kotz, N. Balakrishnan, Continuous Univariate Distributions. Vol. 1, sec- ond ed., Wiley Series in Probability and Mathematical Statistics: Applied Probability and Statistics, John Wiley & Sons, Inc., New York, 1994. [10] K. S. K¨olbig,On the zeros of the incomplete gamma function, Math. Comp. 26 (1972), no. 119, pp. 751–755. [11] M. A. Lukas, Performance criteria and discrimination of extreme undersmoothing in non- parametric regression, J. Stat. Plan. Inference 153 (2014), pp. 56–74. [12] K. Mahler, Uber¨ die Nullstellen der unvollst¨andigenGammafunktionen, Rend. del Circ. Matem. Palermo 54 (1930), pp. 1–41. [13] C. Mitschi, D. Sauzin, Divergent series, summability and resurgence. I, Lect. Notes Math. 2153, Springer, 2016. [14] A. Navarra, C. M. Pinotti, V. Ravelomanana, F. Betti Sorbelli, R. Ciotti, Cooperative training for high density sensor and actor networks, J. Sel. Areas Commun. 28 (2010), no. 5, pp. 753– 763. [15] G. Nemes, An explicit formula for the coefficients in Laplace’s method, Constr. Approx. 38 (2013), no. 3, pp. 471–487. [16] G. Nemes, The resurgence properties of the incomplete gamma function II, Stud. Appl. Math. 135 (2015), no. 1, pp. 86–116. [17] G. Nemes, The resurgence properties of the incomplete gamma function, I, Anal. Appl. (Sin- gap.) 14 (2016), no. 5, pp. 631–677. [18] NIST Digital Library of Mathematical Functions. http://dlmf.nist.gov/, Release 1.0.19 of 2018-06-22. F. W. J. Olver, A. B. Olde Daalhuis, D. W. Lozier, B. I. Schneider, R. F. Boisvert, C. W. Clark, B. R. Miller, and B. V. Saunders, eds. [19] A. B. Olde Daalhuis, On the resurgence properties of the uniform asymptotic expansion of the incomplete gamma function, Methods Appl. Anal. 5 (1998), no. 4, pp. 425–438. [20] V. I. Pagurova, An asymptotic formula for the incomplete gamma function, U.S.S.R. Comput. Math. and Math. Phys. 5 (1965), no. 1, pp. 162–166. [21] G. Paillard, V. Ravelomanana, Limit theorems for degree of coverage and lifetime in large sen- sor networks, IEEE INFOCOM 2008 - The 27th Conference on Computer Communications, Phoenix, Arizona, USA, 2008, pp. 106–110. [22] P. Palffy-Muhoray, E. G. Virga, X. Zheng, Onsager’s missing steps retraced, J. Phys.: Con- dens. Matter 29 (2017), no. 47, Article 475102, 13 pp. [23] R. B. Paris, Error bounds for the uniform asymptotic expansion of the incomplete gamma function, J. Comput. Appl. Math. 147 (2002), no. 1, pp. 215–231. [24] R. B. Paris, A uniform asymptotic expansion for the incomplete gamma function, J. Comput. Appl. Math. 148 (2002), no. 2, pp. 323–339. [25] R. B. Paris, A uniform asymptotic expansion for the incomplete gamma functions revisited, preprint, arXiv:1611.00548 [26] V. Ravelomanana, Extremal properties of three-dimensional sensor networks with applica- tions, IEEE Trans. Mobile Comput. 3 (2004), no. 3, pp. 246–257. ASYMPTOTICS FOR THE INCOMPLETE GAMMA FUNCTION 21

[27] N. M. Temme, The asymptotic expansion of the incomplete gamma functions, SIAM J. Math. Anal. 10 (1979), no. 4, pp. 757–766. [28] N. M. Temme, The uniform asymptotic expansion of a class of integrals related to cumulative distribution functions, SIAM J. Math. Anal. 13 (1982), no. 2, pp. 239–253. [29] N. M. Temme, Asymptotic inversion of incomplete gamma functions, Math. Comp. 58 (1992), no. 198, pp. 755–764. [30] N. M. Temme, Computational aspects of incomplete gamma functions with large complex parameters, Approximation and Computation: A Festschrift in Honor of Walter Gautschi (R. V. M. Zahar, ed.), Internat. Ser. of Numer. Math., Vol. 119, 1994, pp. 551–562. [31] N. M. Temme, Uniform asymptotics for the incomplete gamma functions starting from neg- ative values of the parameters, Methods Appl. Anal. 3 (1996), no. 3, pp. 335–344. [32] I. Thompson, A note on the real zeros of the incomplete gamma function, Integral Transforms Spec. Funct. 23 (2012), no. 6, pp. 445–453. [33] L. Trailovi´c,L.Y. Pao, Computing budget allocation for efficient ranking and selection of variances with application to target tracking algorithms, IEEE Trans. Automat. Contr. 49 (2004), no. 1, pp. 59–67. [34] L. N. Trefethen, J. A. C. Weideman, The exponentially convergent trapezoidal rule, SIAM Rev. 56 (2014), pp. 385–458. [35] F. G. Tricomi, Asymptotische Eigenschaften der unvollst¨andigenGammafunktion, Math. Z. 53 (1950), pp. 136–148. E-mail address: [email protected]

E-mail address: [email protected]

School of Mathematics, The University of Edinburgh, James Clerk Maxwell Build- ing, The King’s Buildings, Peter Guthrie Tait Road, Edinburgh EH9 3FD, UK