WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS

JOHANN S. BRAUCHART AND PETER J. GRABNER∗†

Abstract. We study integrals of the form Z 1 (λ) 2 α β (Cn (x)) (1 − x) (1 + x) d x, −1 (λ) where Cn denotes the Gegenbauer-polynomial of index λ > 0 and α, β > −1. We give exact formulas for the integrals and their generating functions, and obtain asymptotic formulas as n → ∞.

1. Introduction Integrals of the form Z 2 (1) pn(x) w(x) d x, I where (p ) is a sequence of with respect to some weight w n n∈N0 e on the interval I (see [25]), have occurred in different context. Of course, the case when w 6= we is the interesting one. Such integrals for Legendre, associated Legendre and Gegenbauer polynomials occur in explicit computations of angular momentum in classical as well as quantum mechanics (see [11]). Based on this interest in these computations there exists an extensive literature in a physics context (see for instance [16,21,23,26]). Determinantal point processes (see [14]) have been introduced also with a strong mo- tivation from physics; they are used to model Fermionic particles. Since then they have become the object of mathematical research from various perspectives. One aspect that makes these processes interesting is their built-in repulsion between different point, which amounts in better distribution properties of the sample points as compared to i. i. d. points. Also, as a special feature of these processes the computation of expectations of discrete energy expressions (for a comprehensive introduction and collection of recent results see [5]) X f(kxi − xjk) i6=j

Date: March 15, 2021. 1991 Mathematics Subject Classification. Primary 33C45; Secondary 33C20 41A60. Key words and phrases. Gegenbauer polynomials, hypergeometric functions, asymptotic analysis. ∗ Corresponding author. † The research of this author was supported by the Austrian Science Fund FWF project F5503 (part of the Special Research Program (SFB) “Quasi-Monte Carlo Methods: Theory and Applications”). 1 2 J. S. BRAUCHART AND P. J. GRABNER

is computationally feasible. Here f is some potential depending only on the distance of two points. In many cases these computations lead to integrals of the form (1) (see [1,3,4,6]). A further probabilistic model that yields to the study of integrals of the form (1) has been studied in [7]. Here the Gaussian random field on the sphere S2 given by r ` 4π X f (x) = a Y (x) ` 2` + 1 `m `m m=−` m is studied. Here (Y`m)`=−m is an orthonormal base of the space of of m degree ` (see [19]) and (a`m)`=−m are independent Gaussian random variables with mean 0 and variance 1. Then the asymptotic study of the distribution of the Euler-Poincar´e characteristic of the random field f` involves inter alia integrals of the form (1). We took this as a motivation to provide a general study of such integrals, where (pn)n are Gegenbauer polynomials, and w(x) are Gegenbauer or Jacobi weights. A special case has been studied in [12]. Outline of the paper. In Section 2, we provide notations and collect frequently used facts. In Section 3, we define the integral and present explicit formulas in the most general case of Jacobi weights and give the relation. Section 4 gives a brief introduction into the method of singularity analysis and Section 5 provides the Mellin- Barnes integral representations of the generating functions for Jacobi and Gegenbauer weights. Section 6 discusses the generic case for the Jacobi weight. Main results are the asymptotic series relation (10) with explicit coefficients and Theorem 4 concerning the asymptotic leading term. Section 7 discusses the generic case for Gegenbauer weights. Section 8 provides connection formulas for the integrals and selected non-generic cases.

2. Preliminaries Throughout this paper we use the Gegenbauer polynomials with their standard normal- isation (see [18]) given by ∞ X 1 C(λ)(x)zn = . n (1 − 2xz + z2)λ n=0 2 λ− 1 These polynomials are orthogonal with respect to the weight function (1 − x ) 2 on the interval [−1, 1] and normalised such that (see for instance [2]) (2λ) 1 Γ(n + 2λ) 1 (2) C(λ)(1) = n = ∼ n2λ−1 as n → ∞. n n! Γ(2λ) Γ(n + 1) Γ(2λ) Furthermore, the relation 1 √ 1 Z  2 1 π Γ(λ + ) λ (2λ) (λ) 2 λ− 2 2 n (3) Cn (x) (1 − x ) d x = −1 Γ(λ + 1) n + λ n! holds. We make frequent use of the Pochhammer symbol Γ(n + α) (α) = α(α + 1) ··· (α + n − 1) = . n Γ(α) WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 3

and the formulas   k   2ka a + 1 Γ(a − k) (−1) (−n)k k n (4) (a)2k = 2 , (a)−k = = , = (−1) . 2 k 2 k Γ(a) (1 − a)k k! k We also use the digamma function ∞ Γ0(x) X  1 1  ψ(x) = = −γ + − , Γ(x) n + 1 n + x n=0 where γ is the Euler-Mascheroni constant. The classical hypergeometric functions are given by   ∞ a1, . . . , ap X (a1)n ··· (ap)n n pFq z = z b , . . . , b (b ) ··· (b ) n! 1 q n=0 1 n q n

for a1, . . . , ap, b1, . . . , bq ∈ C and p ≤ q + 1. These power series allow for an analytic continuation to the slit complex plane C \ [1, ∞). For further properties of these functions we refer to [2,17]. We will state some of our results in terms of asymptotic series (see [10]). We write ∞ X f(x) ∼ φk(x) as x → ∞, k=0 if for all k ≥ 0 φ (x) lim k+1 = 0 x→∞ φk(x) and k X f(x) − φ`(x) = O(φk+1(x)). `=0 In the statements of our results we will have sums of two and three asymptotic series, which we understand in the following way ∞ ∞ X X f(x) ∼ φk(x) + ψk(x) k=0 k=0

= φ0(x) + ··· + φk1 (x) + ψ0(x) + ··· + ψ`1 (x) + φk1+1(x) + ···

+ φk2 (x) + ψ`1+1(x) + ··· , where φ (x) ψ (x) 0 = lim k1 = lim `1 = ··· ; x→∞ x→∞ ψ0(x) φk1+1(x) this means that we interlace the terms of the two series to obtain a new asymptotic series. In the situation where we use this notation the two constituting series will be so that this notation is well defined. 4 J. S. BRAUCHART AND P. J. GRABNER

3. Explicit formulas and generating functions Let λ > 0 and α, β > −1. We define for non-negative integers n,

Z 1 2 (λ;α,β)  (λ)  α β (5) In := Cn (x) (1 − x) (1 + x) d x. −1

(λ;α,β) Theorem 1. Let In be given by (5). Then we have Γ(α + 1) Γ(β + 1) I(λ;α,β) = 2α+β+1 n Γ(α + β + 2)  2   (2λ)n −n, n + 2λ, λ, α + 1, β + 1 × 5F4 1 α+β+2 α+β+3 1 . n! 2λ, λ + 2 , 2 , 2 1 Remark 1. For β = α = µ − 2 , the 1-balanced 5F4-hypergeometric polynomial reduces to a 1-balanced 4F3-hypergeometric polynomial  1  −n, n + 2λ, λ, µ + 2 4F3 1 1 . 2λ, λ + 2 , µ + 1 To simplify notation, we set

(λ;µ− 1 ,µ− 1 ) 1 J (λ;µ):=I 2 2 , λ > 0, µ > − . n n 2

For µ = λ, the 4F3 becomes   −n, n + 2λ, λ 3F2 1 , 2λ, λ + 1 hence can be computed by the Pfaff-Saalsch¨utztheorem as (λ) (−n) λ n! n n = , (2λ)n(−n − λ)n n + λ (2λ)n 2 (λ) which, of course, reproduces the well known formula (3) for the L -norm of Cn for weight 2 λ− 1 (1 − x ) 2 (see [2]). Proof of Theorem 1. The result follows from [24, Eq. (16)], i.e.

2  2    (λ)  (2λ)n −n, n + 2λ, λ 2 Cn (x) = 3F2 1 1 − x , n! 2λ, λ + 2 the relation Z 1 Γ(k + α + 1) Γ(k + β + 1) (1 − x2)k (1 − x)α (1 + x)β d x = 22k+α+β+1 , −1 Γ(2k + α + β + 2)

and the duplication formula in (4) in order to rewrite the Pochhammer symbol (α + β + 2)2k.  WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 5

(λ;α,β) Theorem 2. The integrals In satisfy the following generating function relation ∞ X n! I(λ;α,β)(z):= I(λ;α,β) zn (2λ) n n=0 n   α+β+1 Γ(α + 1) Γ(β + 1) 1 λ, λ, α + 1, β + 1 4z = 2 2λ 4F3 α+β+2 α+β+3 − 2 . Γ(α + β + 2) (1 − z) 2λ, 2 , 2 (1 − z) 1 Remark 2. For α = β = µ − 2 , we get with the help of Mathematica 12, √ ∞ π Γ(µ + 1 )  1  (λ;µ) X n! (λ;µ) n 2 1 λ, λ, µ + 2 4z J (z):= J z = 3F2 − . (2λ) n Γ(µ + 1) (1 − z)2λ 2λ, µ + 1 (1 − z)2 n=0 n 1 1 The same right-hand side is obtained for α = µ + 2 and β = µ − 2 . This is obvious by the fact that 1 1 Z  2 1 Z  2 1 (λ) 2 µ− 2 (λ) 2 µ− 2 Cn (x) (1 − x)(1 − x ) d x = Cn (x) (1 − x ) d x. −1 −1 Proof of Theorem 2. By Theorem 1, ∞ X n! (λ;α,β) n α+β+1 Γ(α + 1) Γ(β + 1) In z = 2 (2λ)n Γ(α + β + 2) n=0 | {z } A ∞ n X X (2λ) (λ) (α + 1) (β + 1) (−1)` × n+` ` ` ` zn. (n − `)! 1  α+β+2  α+β+3  `! n=0 `=0 (2λ)` λ + 2 ` 2 ` 2 ` | {z } c` Interchanging order of summation, ∞ ∞ ∞ X n! X X (2λ) I(λ;α,β) zn = A c n+` zn, (2λ) n ` (n − `)! n=0 n `=0 n=` and taking into account that with the help of Mathematica 12, ∞ ` X (2λ) 1  1  4z  n+` zn = (λ) λ + , (n − `)! (1 − z)2λ ` 2 (1 − z)2 n=` ` we arrive at the series expansion of the desired .  4. Singularity analysis (λ;α,β) In the last section we have found generating functions for the quantities In and (λ;µ) Jn . In order to retrieve asymptotic information about these quantities from analytic information about the generating function at its singularity, we briefly discuss the method of singularity analysis introduced in [13]. The main advantage of this method over the classical method of Darboux (see [8,9]) is that this method is also able to obtain asymptotic expressions for the coefficents of generating functions in the case that the coefficients tend 6 J. S. BRAUCHART AND P. J. GRABNER

to 0. This difference comes from the fact that Darboux’s method uses a local approximation of the generating function inside the circle of convergence and uses the Riemann-Lebesgue- lemma to obtain an error term. Singularity analysis needs information on the behaviour of the analytic continuation to a region of the form  ∆ε,φ = z ∈ C |z| < 1 + ε, | arg(1 − z)| < φ π for some π > φ > 2 (assuming that the radius of convergence is 1). Since in our case the generating functions have an analytic continuation the complex plane with a branch cut connecting 1 and ∞, the method is readily applicable. The main ingredient of the method is the following theorem. Theorem 3 (Big-O-theorem, see [13, Theorem 1]). Assume that, with the sole exception π of the singularity z = 1, f(z) is analytic in ∆ε,φ for some ε > 0 and φ > 2 . Assume further that as z tends to 1 in ∆ε,φ, f(z) = O(|1 − z|α) for some real number α. Then the n-th Taylor coefficient of f(z) satisfies n −α−1 fn = [z ]f(z) = O(n ). As a consequence of this theorem a local expansion around z = 1 of the generating function K X αk β f(z) = ak(1 − z) + O |1 − z| k=0

for α0 < α1 < ··· < αK < β translates into an asymptotic relation for the coefficients K   X n − αk − 1 f = a + O(n−β−1). n k n k=0 Each of the binomial coefficients has an asymptotic expansion in terms of powers of n: n − α − 1 1 Γ(n − α ) n−αk−1   1  (6) k = k = 1 + O as n → ∞. n Γ(−αk) Γ(n + 1) Γ(−αk) n The paper [13] also contains more general theorems of this type suitable for more com- plicated asymptotic behaviour of f(z) for z → 1, like logarithmic singularities.

5. Mellin-Barnes formulas In order to write the generating function I(λ;α,β)(z) in a more tractable form, we recall the Mellin-Barnes formula for hypergeometric functions (see [2,20]). This gives (7) i∞ 2α+β+1Γ(2λ) 1 Z Γ(s + λ)2Γ(s + α + 1)Γ(s + β + 1)Γ(−s)  16z s I(λ;α,β)(z) = d s, Γ(λ)2(1 − z)2λ 2πi Γ(s + 2λ)Γ(2s + α + β + 2) (1 − z)2 −i∞ WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 7

where the contour of integration is taken along the imaginary axis encircling s = 0 in the left half-plane such that the poles at s = −λ, s = −α − 1, and s = −β − 1 are to the left of the contour. Similarly, we obtain √ i∞ π Γ(2λ) 1 Z Γ(s + λ)2Γ(s + µ + 1 )Γ(−s)  4z s (8) J (λ;µ)(z) = 2 d s, Γ(λ)2(1 − z)2λ 2πi Γ(s + 2λ)Γ(s + µ + 1) (1 − z)2 −i∞ 1 where the contour is chosen as before, this time leaving s = −λ and s = −µ − 2 to the left of the contour.

6. Jacobi weights, generic case We use the formula (7) to derive an asymptotic expansion of I(λ;α,β)(z) around z = 1. (λ;α,β) This expansion is then translated into a full asymptotic expansion of In in the generic case. In this case the integrand in (7) has simple poles at −α − 1 − `, −β − 1 − ` and double poles at −λ − ` for ` ∈ N0. There is no pole cancellation or pole multiplication; i.e., α − λ, β − λ, α − β, α − 2λ, β − 2λ, α + β − 2λ, and λ are no integers. Moving the contour in (7) to the left and collecting the residues at the double poles at −λ − `, we have Γ(λ + 1 ) Γ(1 + α − λ) Γ(1 + β − λ) 2 √ 22λ−1−α−β π Γ(λ) Γ(2 + α + β − 2λ)  2λ−α−β−1 2λ−α−β 2  −λ 1 − λ, λ, 2 , 2 (1 − z) 1 × z 4F3 − log + power series in (1 − z); 1, λ − α, λ − β 4z 1 − z collecting the residues at the simple poles at −α − 1 − `, we get Γ(λ + 1 ) Γ(α + 1) Γ(λ − α − 1)2 2 √ 23α+4−β−2λ π Γ(λ) Γ(2λ − α − 1)  1+α−β 2+α−β 2  2+2α−2λ −1−α α + 1, α + 2 − 2λ, 2 , 2 (1 − z) × (1 − z) z 4F3 − ; 1 + α − β, 2 + α − λ, 2 + α − λ 4z and collecting the residues at the simple poles at −β − 1 − `, we obtain Γ(λ + 1 ) Γ(β + 1) Γ(λ − β − 1)2 2 √ 23β+4−α−2λ π Γ(λ) Γ(2λ − β − 1)  1+β−α 2+β−α 2  2+2β−2λ −1−β β + 1, β + 2 − 2λ, 2 , 2 (1 − z) × (1 − z) z 4F3 − ; 1 + β − α, 2 + β − λ, 2 + β − λ 4z Thus, we arrive at ∞ ∞ (λ;α,β) X m+2+2α−2λ X m+2+2β−2λ I (z) = Am (1 − z) + Bm (1 − z) m=0 m=0 (9) ∞ X m 1 + D (1 − z) log + power series in (1 − z), m 1 − z m=0 8 J. S. BRAUCHART AND P. J. GRABNER

where b m c Γ(λ + 1 ) Γ(α + 1) Γ(λ − α − 1)2 X2 (α + 2 − 2λ) (1 + α − β) (α + 1) (−1)` A := 2 √ ` 2` m−` , m 23α+4−β−2λ π Γ(λ) Γ(2λ − α − 1) 2 16` `=0 (1 + α − β)`(2 + α − λ)` `!(m − 2`)! b m c Γ(λ + 1 ) Γ(β + 1) Γ(λ − β − 1)2 X2 (β + 2 − 2λ) (1 + β − α) (β + 1) (−1)` B := 2 √ ` 2` m−` , m 23β+4−α−2λ π Γ(λ) Γ(2λ − β − 1) 2 16` `=0 (1 + β − α)`(2 + β − λ)` `!(m − 2`)! b m c Γ(λ + 1 ) Γ(α + 1 − λ) Γ(β + 1 − λ) X2 (1 − λ) (2λ − α − β − 1) (λ) (−1)` D := 2 √ ` 2` m−` . m 22λ−α−β−1 π Γ(λ) Γ(α + β + 2 − 2λ) (λ − α) (λ − β) `!`!(m − 2`)! 16` `=0 ` ` The relation (9) holds as an asymptotic relation at first. Since I(λ;α,β)(z) has an analytic continuation to C \ [1, ∞) and satisfies a fourth order differential equation with regular singular points 0, 1, ∞ (as a consequence of the representation in terms of hypergeometric functions), it has a power series representation of the form (9) with radius of convergence ≥ 1 by the Frobenius method. The asymptotic expansion has to coincide with this power series representation. The terms power series in (1 − z) correspond to a function holomorphic around z = 1. Since this function does not contribute to the asymptotic expansion we are aiming for, we do not work out these terms, which are slightly more elaborate than the remaining terms. By Theorem 3 the local expansion (9) around z = 1 translates into an asymptotic series for the coefficients ∞ (2λ)n X m! I(λ;α,β) ∼ D (−1)m n n! m n(n − 1) ··· (n − m) (10) m=0 ∞ ∞ ! X n + 2λ − 2α − 3 − m X n + 2λ − 2β − 3 − m + A + B . m n m n m=0 m=0 In order to make the results more transparent and applicable, we state the asymptotic main terms as a theorem. Theorem 4. Let −1 < α < β and λ > 0 be real numbers. Then (11) 2α+β+2−4λΓ(α + 1 − λ)Γ(β + 1 − λ)  n2λ−2 + O(nη) α > λ − 1,  2  Γ(λ) Γ(α + β + 2 − 2λ) 2β+2−3λ       I(λ;α,β) = n2λ−2 log n − A(λ, β) + O n2λ−3 log n + O n4λ−2β−5 α = λ − 1, n Γ(λ)2  2β−3α−3 Γ(α + 1) Γ(λ − α − 1)2  n4λ−2α−4 + O(nη) α < λ − 1,  Γ(λ)2 Γ(2λ − α − 1) where ( max(2λ − 3, 4λ − 2α − 4) α > λ − 1, η = max(2λ − 2, 4λ − 2α − 5, 4λ − 2β − 4) α < λ − 1, WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 9

and 1 A(λ, β) = (γ − 4 log 2 + ψ(β + 1 − λ) + 2 ψ(λ)) . 2 Proof. The asymptotic main term in (10) is given by the first term of the first series, if α > λ − 1; it is given by the first term of the second series, if α < λ − 1. Except when α = λ−1, this also holds in the non-generic case, since only higher order asymptotic terms would be affected. It remains to discuss the case α = λ − 1. In this case, when taking into account a triple pole of the integrand in (7) at −λ, the generating function has the local expansion ! Γ(λ + 1 )  1 2   1 I(λ;λ−1,β) = 2β−λ √ 2 log − 3γ − 4 log 2 + ψ(1 + β − λ) + 2 ψ(λ) log π Γ(λ) 1 − z 1 − z     + C + O (1 − z)(log(1 − z))2 + O (1 − z)2(β+1−λ) , where C is a constant that will play no role in the singularity analysis. This relation translates into the asymptotic expansion n−1 (2λ) Γ(λ + 1 ) 2 X 1   1 I(λ;λ−1,β) = n 2β−λ √ 2 − 3γ − 4 log 2 + ψ(1 + β − λ) + 2 ψ(λ) n n! π Γ(λ) n k n k=1 ! log n  1  + O + O . n2 n2(β+1−λ)+1 Using the asymptotic expansion n−1 X 1  1  = ψ(n) + γ = log n + γ + O , k n k=1 we obtain the stated expression. We remark that the leading asymptotic term in the case α = λ − 1 could be obtained by taking the limit as a → λ − 1 in (2λ) D n + 2λ − 2α − 3 n 0 + A n! n 0 n derived from the general asymptotics (10).  7. Gegenbauer weights, generic case The Gegenbauer weights are a special case of Jacobi weights in the non-generic setting. We present the asymptotic evaluation of the integrals 1 Z  2 1 (λ;µ− 1 ,µ− 1 ) (λ;µ) (λ) 2 µ− 2 2 2 (12) Jn := Cn (x) (1 − x ) d x = In −1 1 using the more appropriate specialisation α = β = µ − 2 , so that for µ = λ we get back the well-known result (3). 10 J. S. BRAUCHART AND P. J. GRABNER

Because of the symmetry in the Gegenbauer weight, there is a second obvious approach (λ;µ) (λ) (µ) to a formula for Jn based on connection formulas between Cn and Cn .

1 (λ;µ) Theorem 5. Let µ > − 2 and λ > 0. Let Jn be given by (12). Then we have √ 1  2  1  (λ;µ) π Γ(µ + 2 ) (2λ)n −n, n + 2λ, λ, µ + 2 Jn = 4F3 1 1 ; Γ(µ + 1) n! 2λ, λ + 2 , µ + 1 alternatively, we have

√ b n c 1 2 2 2 π Γ(µ + ) X (λ) (λ − µ) (2µ)n−2k (13) J (λ;µ) = 2 n−k k (n + µ − 2k) . n µ Γ(µ + 1) (µ + 1)2 (k!)2 (n − 2k)! k=0 n−k Proof. The first equation is an immediate consequence of Theorem 1 after specialising 1 α = β = µ − 2 . The second expression can be obtained using the connection formula n b 2 c (λ) X (λ)n−k(λ − µ)k n + µ − 2k (µ) Cn (x) = Cn−2k(x) (µ + 1)n−kk! µ k=0 (see [2, (7.1.11)]) and relation (3).  (λ;µ) Remark 3. The two formulas for Jn give the identity

b n c 2 2 2  2  1  X (λ)n−k(λ − µ)k(2µ)n−2k(n + µ − 2k) (2λ)n −n, n + 2λ, λ, µ + 2 = µ 4F3 1 . (µ + 1)2 (k!)2(n − 2k)! n! 2λ, λ + 1 , µ + 1 k=0 n−k 2 Notice that the sum on the left-hand side has only positive terms, whereas the (implicit) sum on the right-hand side is alternating. Alternatively, this identity could be proved using Zeilberger’s algorithm (see [15]). With the help of Mathematica and using the implementation [22] of Zeilberger’s algorithm we found that both expressions satisfy the linear 2 (λ;µ) 2 (λ;µ) 2 (λ;µ) (n+2λ) (n+2λ−µ)Jn −2(n+λ+1)(n +2(λ+1)n+3λ+1)Jn+1 +(n+2) (n+µ+2)Jn+2 = 0. This relation could be used to give an independent proof of above identity. The generating function ∞ X n! J (λ;µ)(z) = J (λ;µ)zn (2λ) n n=0 n satisfies the differential equation

z2(z − 1)2y000 + (z − 1) z ((4(λ + 1) − µ)z − 2(λ + 1) − µ) y00 + 2 ((λ + 1) (2(λ + 1) − µ) − 1) z2 − 2 (λ + 1)2 − 1 z + λ(µ + 1) y0 + 2λ((2λ − µ)z − λ)y = 0. WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 11

This is a third order differential equation with regular singular points at 0, 1, ∞. The indicial equation at z = 1 reads as x2(x + 2λ − 2µ − 1) = 0. Thus, the fundamental solutions about 1 will take the form of a power series in (1 − z), 1 1+2µ−2λ log 1−z times a power series in (1 − z), and (1 − z) times a power series in (1 − z). From Remark 2 we have that √ π Γ(µ + 1 )  1  (λ;µ) 2 1 λ, λ, µ + 2 4z (14) J (z) = 3F2 − . Γ(µ + 1) (1 − z)2λ 2λ, µ + 1 (1 − z)2

(λ;µ) (λ;µ) The asymptotic behaviour of Jn is encoded in the behaviour of the function J (z) around z = 1 (see [13]). To obtain this local expansion we proceed as before by using (8) and shifting the line of integration to the left. 1 1 We consider the generic case for λ∈ / Z, µ+1−λ∈ / Z, µ+ 2 −2λ∈ / Z, and µ+ 2 −λ∈ / Z. Collecting residues at the double poles −λ − `, ` ∈ N0, we get 1 1  2  Γ(λ + 2 ) Γ( 2 + µ − λ) −λ 1 − λ, λ, λ − µ (1 − z) 1 z 3F2 1 − log Γ(λ) Γ(1 + µ − λ) 1, 2 + λ − µ 4z 1 − z ! + power series in (1 − z) .

1 Collecting residues at the simple poles −µ − 2 − `, ` ∈ N0, we obtain 1 1 2 1 1+2µ−2λ  1 1 3 2  Γ(λ + 2 ) Γ(λ − µ − 2 ) Γ(µ + 2 ) (1 − z) 2 , µ + 2 , 2 + µ − 2λ (1 − z) √ 3F2 − . 1+µ−λ 1 µ+ 1 3 3 4 π Γ(λ) Γ(2λ − µ − 2 ) z 2 2 + µ − λ, 2 + µ − λ 4z Thus, we arrive at ∞ ∞ X m 1 X 1+2µ−2λ+m J (λ;µ)(z) = A (1 − z) log + B (1 − z) + power series in (1 − z), m 1 − z m m=0 m=0 where b m c Γ(λ + 1 ) Γ( 1 + µ − λ) X2 (1 − λ) (λ − µ) (λ) (−1)` A = 2 2 ` ` m−` , m Γ(λ) Γ(1 + µ − λ) 1 + λ − µ `!`!(m − 2`)! 4` `=0 2 ` b m c 1 1 2 1 2 1  3  1  ` Γ(λ + ) Γ(λ − µ − ) Γ(µ + ) X 2 2 + µ − 2λ µ + 2 (−1) B = 2 √ 2 2 ` ` m−` . m 41+µ−λ π Γ(λ) Γ(2λ − µ − 1 ) 3 + µ − λ 3 + µ − λ `!(m − 2`)! 4` 2 `=0 2 ` 2 ` Using singularity analysis, this translates into the following asymptotic series: (15) ∞ ∞   ! (2λ)n X m! X n + 2λ − 2µ − 2 − m J (λ;µ) = (−1)m A + B . n n! n(n − 1) ··· (n − m) m n m m=0 m=0 Regarding the leading term, we have the following result. 12 J. S. BRAUCHART AND P. J. GRABNER

1 Theorem 6. Let µ > − 2 and λ > 0. Then √  π Γ(µ + 1 − λ)  2 n2λ−2 + O(nη) µ > λ − 1 , 22λ−1Γ(λ)2Γ(µ + 1 − λ) 2  (λ;µ)  1 2λ−2 2λ−3  1 (16) Jn = 2λ−2 2 n (log n + 2 log 2 − ψ(λ)) + O n log n µ = λ − 2 , 2 √Γ(λ)  π Γ(λ − µ − 1 )Γ(µ + 1 )  2 2 n4λ−2µ−3 + O(nη) µ < λ − 1 ,  2λ−1 2 1 2 2 Γ(λ) Γ(λ − µ)Γ(2λ − µ − 2 ) where ( 1 max(2λ − 3, 4λ − 2µ − 3) µ > λ − 2 , η = 1 max(2λ − 2, 4λ − 2µ − 4) µ < λ − 2 . Proof. In the generic case, the asymptotic terms can be read off from the general asymp- totics (15) (setting m = 0) and using (2) and (6). The leading term (and the remainder 1 term) is still valid in the non-generic case, except for µ = λ − 2 , when the first two terms 1 1 need to be combined to allow for a cancellation of the poles of Γ(µ+ 2 −λ) and Γ(λ−µ− 2 ) 1 as µ → λ − 2 . 1 It only remains to study the case µ = λ − 2 . Then the generating function becomes √   1 π Γ(λ) 1 λ, λ, λ 4z (λ;λ− 2 ) J (z) = 1 2λ 3F2 1 − 2 . Γ(λ + 2 ) (1 − z) 2λ, λ + 2 (1 − z) In this case the Mellin-Barnes formula reads as √ i∞ 3  s 1 π Γ(2λ) 1 Z Γ(s + λ) Γ(−s) 4z (λ;λ− 2 ) (17) J (z) = 2 2λ 1 2 d s; Γ(λ) (1 − z) 2πi Γ(s + 2λ)Γ(s + λ + 2 ) (1 − z) −i∞

where the integrand has triple poles at s + λ ∈ −N0. Shifting the line of integration to <(s) = −λ − 1 gives 1  2 (λ;λ− 1 ) Γ(λ + 2 ) −λ 1 4z J 2 (z) = √ z γ − log 2 + ψ(λ) − log π Γ(λ) 2 (1 − z)2 (18) √ −λ−1+i∞ π Γ(2λ) 1 Z Γ(s + λ)3Γ(−s)  4z s + 2 2λ 1 2 d s. Γ(λ) (1 − z) 2πi Γ(s + 2λ)Γ(s + λ + 2 ) (1 − z) −λ−1−i∞ The contour of integration is chosen along the vertical line <(s) = −λ − 1 with a small circular arc encircling −λ − 1 to the right. The integral is O((1 − z)2(log(1 − z))2), thus the first term is the asymptotic main term. (λ;λ− 1 ) We note that in principle a full asymptotic expansion of J 2 (z) around z = 1 could be developed by shifting the line of integration further to the left. The terms originating from the residues of the triple poles at s = −λ − `, ` ∈ N0, become more complicated. Thus we confine ourselves to the first term. WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 13

This gives

1  2 ! (λ;λ− 1 ) Γ(λ + 2 ) 1 1 J 2 (z) = √ log − 2 (γ − 2 log 2 + ψ(λ)) log + C (19) π Γ(λ) 1 − z 1 − z + O (1 − z) (log(1 − z))2 , where C is an explicit constant that does not influence the later results. The method of singularity analysis (see [13]), explained in Section 4 and applied in the 1 (λ;λ− 2 ) proof of Theorem 4, allows to translate (19) into an asymptotic expressions for Jn as given in the result. 

8. Special cases In this section we consider connection formulas and relations between the parameters λ, α, β, and µ not covered by the generic case.

8.1. General connection formulas. A direct corollary of [24, Theorem 3] is the following (λ;α,β) (ρ;α,β) result connecting In and Ik . Proposition 7. Let α, β > −1 and λ, ρ > 0. Then

n   2 1  (2λ) X n (k!) (k + 2λ)n(λ)k ρ + I(λ;α,β) = n 2 k n (n!)2 k (2ρ) (ρ) λ + 1  k=0 2k k 2 k  1  k − n, k + n + 2λ, k + λ, k + 2ρ, k + ρ + 2 (ρ;α,β) × 5F4 1 1 Ik . 2k + 2ρ + 1, k + ρ, k + 2λ, k + λ + 2 For the case β − α ∈ N, we have the following connection formula.

Theorem 8. Let α > −1 and λ > 0. For k ∈ N with k = 2m + η and η ∈ {0, 1},

m 1 (λ;α,α+k) X ` (λ;`+α+ 2 ) In = (−1) b` Jn , `=0 where m ( X 2m + ηµ m(m + η) 1, η = 0 b = = m−` × ` 2µ ` ` 1 + η 2m + 1, η = 1. µ=` 2 m−`

(λ;α,β) Remark 4. By Theorem 8, the asymptotic expansion of In for β − α is a positive 1 (λ;`+α+ 2 ) β−α integer can be derived from the asymptotic expansions of Jn , ` = 0, 1,..., b 2 c. For β − α is a negative integer, the roles of α and β are interchanged. 14 J. S. BRAUCHART AND P. J. GRABNER

(λ;α,β) Proof of Theorem 8. Using the definition of In , we write

Z 1 2 (λ;α,α+k) k 2α  (λ)  In = (1 − x) 1 − x Cn (x) d x −1 k   Z 1 X k α  2 = x` 1 − x2 C(λ)(x) d x. ` n `=0 −1 The result follows by observing that for odd integers ` the integral vanishes and µ   µ µ X µ ` x2 = 1 − 1 − x2 = (−1)` 1 − x2 . ` `=0 

8.2. The case λ − µ ∈ N. Theorem 9. Let λ > 0 and k ∈ N with k ≤ λ. Then J (λ;λ−k)(z) is a rational function with denominator (1 − z)2k−1. As a consequence (2λ) J (λ;λ−k) = n q (n), n n! k

where qk is a polynomial of degree 2k −2. The generating function and the explicit formula for the coefficients are given in (24) and (25). The main term of the asymptotics is given in (26). Proof. We first show that for k ≥ 1 we obtain a rational generating function p (z) J (λ;λ−k)(z) = k , (1 − z)2k−1

where pk is a polynomial of degree 2k − 2. This can be seen by considering the differential equation satisfied by J (λ;λ−k)(z)(1−z)2k−1 z2(z − 1)2y000 + z(z − 1)((3λ − 5k + 7)z − 3λ + k − 2)y00    + 2 (1 + λ − k)(λ − 4k + 5)z2 − (1 + λ − k)(2λ − 4k + 5) − 2(k − 1)2 z (20)  + λ(1 + λ − k) y0 − 2(k − 1)(2λ − 2k + 1)((1 + λ − k)z − λ)y = 0.

It translates into the three-term recurrence relation

(2 − 2k + n)(1 + 2λ − 2k + n)(1 + λ − k + n)pn    (21) − (2 − 2k + n) (2 − 2k + n) (4 + 3λ − k + 2n) + λ + k + 4λk + 2λk pn+1 2 + (3 − 2k + n) (2 + n)pn+2 = 0 WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 15 for the coefficients of ∞ X n p(z) = pn(1 − z) . n=0 Specialising n = 2k − 2 and n = 2k − 3 gives

p2k = λ p2k−1,

(k − 1) p2k−2 = (λ + k − 2) p2k−3 which shows that p2k−1 can be chosen as 0, without influencing the coefficients p0, . . . , p2k−2. Then p` = 0 for ` ≥ 2k − 1. Thus (20) has a polynomial solution, which has to coincide with the only solution holomorphic around z = 0. In order to compute the coefficients in the partial fraction decomposition

2k−1 X c` J (λ;λ−k)(z) = (1 − z)` `=1 we use (8) and shift the line of integration to the left to line <(s) = −λ; this time we choose the contour to encircle s = −λ to the right. Collecting residues gives

(22) √ −λ+i∞ πΓ(2λ) 1 Z Γ(s + λ)2Γ(s + λ − k + 1 )Γ(−s)  4z s J λ;λ−k(z) = 2 d s Γ(λ)2(1 − z)2λ 2πi Γ(s + 2λ)Γ(s + λ − k + 1) (1 − z)2 −λ−i∞ √ k−1 1 1 −λ+k−`− 1 πΓ(2λ) X (−1)` Γ(k − ` − )2Γ(λ − k + ` + )  4z  2 + 2 2 . Γ(λ)2(1 − z)2λ `! Γ(λ + k − ` − 1 )Γ(−` + 1 ) (1 − z)2 `=0 2 2 The sum of residues simplifies to

k−1 1 1 2 1 Γ(2λ) X ( 2 )` Γ(k − ` − 2 ) Γ(λ − k + ` + 2 ) −λ+k−`− 1 2`−2k+1 (23) (4z) 2 (1 − z) . Γ(λ)2 `! Γ(λ + k − ` − 1 ) `=0 2

We already know that J (λ;λ−k)(z) is a rational function with denominator (1 − z)2k−1. Furthermore, the integral in (22) behaves like O(1) for z → 1. Thus, the rational function and the coefficients in its partial fraction decomposition can be obtained from the corre- sponding asymptotic terms of the sum (23) for z → 1. For this purpose we rewrite the powers of 4z in terms of the binomial series to obtain (24) b r c k−1√ 1 2k−2 2 1 2 1 4 π Γ(λ + ) X X ( ) ( )` J (λ;λ−k)(z) = 2 (1 − z)r 2 k−`−1 2 . Γ(λ)(1 − z)2k−1 4` (r − 2`)! `!(λ − k − ` + r + 1 ) r=0 `=0 2 2k−r−1 16 J. S. BRAUCHART AND P. J. GRABNER

From this we can read off an exact formula for the coefficients √ k−1 1 2k−2   (2λ)n 4 π Γ(λ + ) X n + 2k − 2 − r J (λ;λ−k) = 2 n n! Γ(λ) n r=0 (25) b r c 2 1 2 1 X ( ) ( )` × 2 k−`−1 2 . 4` (r − 2`)! `!(λ − k − ` + r + 1 ) `=0 2 2k−r−1 The asymptotic main term is given by √ π Γ(k − 1 ) Γ( 1 + λ − k) (26) J (λ;λ−k) = 2 2 n2λ+2k−3 + O(n2λ+2k−4). n 2λ−1 2 1 2 Γ(λ) (k − 1)! Γ(k + λ − 2 ) 

8.3. The case µ−λ ∈ N. In this case we observe that (13) has at most k:=µ−λ terms and there occur some extra cancellations in the Pochhammer-symbols. We get in particular √ (2λ) π Γ(λ + 1 ) 1 J (λ;λ) = n 2 n n! Γ(λ) n + λ

and for k ∈ N: n min(k,b 2 c) 2 2 2π X k  Γ(n − ` + λ)  J (λ;λ+k) = n 4λ+kΓ(λ)2 ` Γ(n + k − ` + 1 + λ) `=0 Γ(n + 2k − 2` + 2λ) × (n − 2` + k + λ) . Γ(n − 2` + 1) All terms in the sum have the same asymptotic order as n → ∞. We use

k 2 X k 2k 22k Γ(k + 1 ) = = √ 2 ` k π Γ(k + 1) `=0 to obtain the following asymptotic formula.

Theorem 10. Let λ > 0 and k ∈ N. Then 2π 2k J (λ;λ+k) = n2λ−2 + O(n2λ−3) as n → ∞. n 4λ+kΓ(λ)2 k Of course, a full asymptotic expansion could be given with more effort.

8.4. The case λ ∈ N and µ, 2µ∈ / Z. Let λ = k, k ∈ N. The case µ ∈ Z is covered above. The case of µ is a half-integer is more involved and not done here. The setting is a non-generic case for the Gegenbauer weight. To obtain the local expansion around z = 1, WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 17

we proceed as before by using (8) and shifting the line of integration to the left. Collecting the residues at the double poles in −k − `, 0 ≤ ` ≤ k − 1, we obtain √ 1 1   2  π Γ(µ + 2 ) 2 k(−µ)k −k 1 − k, k, k − µ (1 − z) 1 z 3F2 − log Γ(µ + 1) 1  1, k + 1 − µ 4z 1 − z Γ(k) 2 − µ k 2 + power series in (1 − z).

Due to cancellation, the integrand in (8) has simple poles in −k − ` for ` ≥ k. Collecting those residues, we obtain √ 1 1  2 2k  2  π Γ(µ + 2 ) 2 k (−µ)2k (1 − z) 1, 1, 2k, 2k − µ (1 − z) 4F3 − 4 Γ(µ + 1) 1  z2k k + 1, k + 1, 2k + 1 − µ 4z k!k! 2 − µ k 2 which is holomorphic about z = 1 and as a power series in (1−z) will, thus, not play a role 1 in the singularity analysis. Collecting residues at the simple poles in −µ − 2 − `, ` ∈ N0, we have

1  1  2 1 1 − − µ 22k−2µ−2 Γ(− − µ) Γ(µ + ) 2 k 2 k 2 2 1  Γ(k) − 2 − µ 2k  1 1 3 2  1+2µ−2k 1 , + µ, + µ − 2k (1 − z) − 2 −µ 2 2 2 × (1 − z) z 3F2 3 3 − . 2 + µ − k, 2 + µ − k 4z Thus, we arrive at

∞ ∞ X m 1 X 1+2µ−2k+m J (k;µ)(z) = A (1 − z) log + B (1 − z) + power series in (1 − z), m 1 − z m m=0 m=0 where

√ b m c 1 1  2 ` π Γ(µ + ) (−µ)k X (1 − k) (k − µ) (k) (−1) A = 2 2 k ` ` m−` , m Γ(µ + 1) Γ(k) 1 − µ k + 1 − µ (`!)2(m − 2`)! 4` 2 k `=0 2 ` 1  1  2 1 1 − − µ B = 22k−2µ−2 Γ(− − µ) Γ(µ + ) 2 k 2 k m 2 2 1  Γ(k) − 2 − µ 2k b m c 2 1  3  1  ` X 2 2 + µ − 2k µ + 2 (−1) × ` ` m−` . 3 + µ − k 3 + µ − k `!(m − 2`)! 4` `=0 2 ` 2 `

Observe, that the sum in the expression for Am has at most k − 1 terms. Using singularity analysis, this translates into the following asymptotic series: ∞ ∞   ! (2k)n X m! X n + 2k − 2µ − 2 − m J (k;µ) = (−1)m A + B . n n! n(n − 1) ··· (n − m) m n m m=0 m=0 18 J. S. BRAUCHART AND P. J. GRABNER

8.5. Other non-generic cases. In principle, our method can be used to get the full asymptotic expansion. Due to pole cancellation and pole multiplication in the integrands of (7) and (8) depending on assumptions on interrelations between the parameters λ, α, β, and µ, and the position of the line of integration as it is moved to the left, computations are rather involved. For example, in the case of λ ∈ N and µ a positive half-integer such 1 that 0 < m = µ + 2 < λ = k, the integrand in (8) has in −m − `: simple poles for 0 ≤ ` < k − m, triple poles for k − m ≤ ` < 2k − m, and double poles for ` ≥ 2k − m. Acknowledgement. The authors are grateful to Peter Paule for providing them with his Mathematica package, which implements Zeilberger’s algorithm and allows for transform- ing differential equations into holonomic linear recurrences for the coefficients. They are also indepted to Helmut Prodinger for pointing out to them that this method could be applied.

References [1] K. Alishahi and M. Zamani. The spherical ensemble and uniform distribution of points on the sphere. Electron. J. Probab., 20:no. 23, 27, 2015. [2] G. E. Andrews, R. Askey, and R. Roy. Special functions, volume 71 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, Cambridge, 1999. [3] C. Beltr´anand D. Ferizovi´c.Approximation to uniform distribution in SO(3). Constr. Approx., 52(2):283–311, 2020. [4] C. Beltr´an, J. Marzo, and J. Ortega-Cerd`a.Energy and discrepancy of rotationally invariant deter- minantal point processes in high dimensional spheres. J. Complexity, 37:76–109, 2016. [5] S. V. Borodachov, D. P. Hardin, and E. B. Saff. Discrete energy on rectifiable sets. Springer Mono- graphs in Mathematics. Springer, New York, 2019. [6] J. S. Brauchart, P. J. Grabner, W. B. Kusner, and J. Ziefle. Hyperuniform point sets on the sphere: probabilistic aspects. Monatsh. Math., 192:763–781, 2020. [7] V. Cammarota and D. Marinucci. A quantitative central limit theorem for the Euler-Poincar´echar- acteristic of random spherical eigenfunctions. Ann. Probab., 46(6):3188–3228, 2018. [8] G. Darboux. M´emoiresur l’approximation des fonctions de tres grands nombres, et sur une classe ´etenduede d´eveloppements en serie. J. Math. Pures. Appl., 4:5–56, 1878. [9] G. Darboux. M´emoiresur l’approximation des fonctions de tres grands nombres, et sur une classe ´etenduede d´eveloppements en serie. J. Math. Pures. Appl., 4:377–416, 1878. [10] N. G. de Bruijn. Asymptotic methods in analysis. Bibliotheca Mathematica. Vol. 4. North-Holland Publishing Co., Amsterdam; P. Noordhoff Ltd., Groningen; Interscience Publishers Inc., New York, 1958. [11] A. R. Edmonds. Angular momentum in quantum mechanics. Investigations in Physics, Vol. 4. Prince- ton University Press, Princeton, N.J., 1957. [12] D. Ferizovi´c.The L2-norm of Gegenbauer polynomials. manuscript, 2020. [13] P. Flajolet and A. Odlyzko. Singularity analysis of generating functions. SIAM J. Discrete Math., 3(2):216–240, 1990. [14] J. B. Hough, M. Krishnapur, Y. Peres, and B. Vir´ag. Zeros of Gaussian analytic functions and determinantal point processes, volume 51 of University Lecture Series. American Mathematical Society, Providence, RI, 2009. [15] M. Kauers and P. Paule. The Concrete Tetrahedron. Texts and Monographs in Symbolic Computation. SpringerWienNewYork, Vienna, 2011. Symbolic Sums, Recurrence Equations, Generating Functions, Asymptotic Estimates. WEIGHTED L2-NORMS OF GEGENBAUER POLYNOMIALS 19

[16] M. L. Laursen and K. Mita. Some integrals involving associated Legendre functions and Gegenbauer polynomials. J. Phys. A, 14(5):1065–1068, 1981. [17] Y. L. Luke. The special functions and their approximations, Vol. I. Mathematics in Science and Engineering, Vol. 53. Academic Press, New York-London, 1969. [18] W. Magnus, F. Oberhettinger, and R. Soni. Formulas and Theorems for the Special Functions of Mathematical Physics. Springer, Berlin, New York, 1966. [19] C. M¨uller. Spherical Harmonics, volume 17 of Lecture Notes in Mathematics. Springer, Berlin, New York, 1966. [20] R. B. Paris and D. Kaminski. Asymptotics and Mellin-Barnes integrals, volume 85 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, Cambridge, 2001. [21] M. A. Rashid. Evaluation of integrals involving powers of (1 − x2) and two associated Legendre functions or Gegenbauer polynomials. J. Phys. A, 19(13):2505–2512, 1986. [22] RISC. Computer Algebra for Combinatorics. https://risc.jku.at/software/. Research Institute for Symbolic Computation. [23] S. N. Samaddar. Some integrals involving associated Legendre functions. Math. Comp., 28:257–263, 1974. [24] J. Sanchez-Ruiz. Linearization and connection formulae involving squares of gegenbauer polynomials. Applied Mathematics Letters, 14(3):261–267, 2001. [25] G. Szeg˝o. Orthogonal Polynomials, volume 23 of Amer. Math. Soc. Colloq. Publ. American Mathe- matical Society, Providence RI, 1939. [26] N. Ullah. Evaluation of an integral involving associated and inverse powers of (1 − X2). J. Math. Phys., 25(4):872–873, 1984.

J. S. Brauchart, P. J. Grabner: Institute of Analysis and Number Theory, Graz Uni- versity of Technology, Kopernikusgasse 24/II, 8010 Graz, Austria Email address: [email protected], [email protected]