1 Introduction

Let

$$ \rho_{\nu}(x)=2 x^{\nu/2}K_{\nu}(2\sqrt{x}), \quad x>0, ~~ \nu\in{\mathbb{R}}, $$

where Kν is the second-kind modified Bessel function of order ν ([6, §10.25]). Prudnikov polynomials [11, §3] are polynomials orthogonal with respect to the weight function

$$ w_{\nu}(x)=\rho_{\nu}(x), \quad 0<x<\infty, ~~\nu\geq 0. $$
(1.1)

A. P. Prudnikov (1927–1999) advocated their study in [7, Problem 2] and dealt with the case ν = 0 in [ibid., Problem 1]. S. Yakubovich, in [11], considered also generalized Prudnikov polynomials orthogonal with respect to the weight function

$$ w_{\nu}^{\alpha}(x)=x^{\alpha}\rho_{\nu}(x), \quad 0<x<\infty, ~~ \alpha>-1, $$
(1.2)

as well as Prudnikov-type polynomials, in [10, §2] of type 1, orthogonal with respect to

$$ w_{\nu}^{+}(x)={\mathrm{e}}^{-x}\rho_{\nu}(x), \quad 0<x<\infty, ~~\nu>-1, $$
(1.3)

and in [10, §3] of type 2, orthogonal with respect to

$$ w_{\nu}^{-}(x)=x^{-1}{\mathrm{e}}^{-1/x}\rho_{\nu}(x), \quad 0<x<\infty, ~~\nu\in{\mathbb{R}}. $$
(1.4)

Symmetric extensions of all these polynomials will also be considered, where x in the weight function is replaced by |x|, and the support interval is extended to the whole real line.

Multiple orthogonal polynomials relative to the pair xαρν(x), xαρν+ 1(x) of weight functions are studied in [8]; see also [2] and [12, §IIA].

Weight functions involving modified Bessel functions Kν(x) (rather than \(K_{\nu }(2\sqrt {x})\)) have been used previously in connection with wave functions for nonlocal potentials [5]; see also [3, Exercise 2.32], [4, §2.1.3], [9, §2.1.3].

The object of this note is to develop the respective orthogonal polynomials and their symmetric extensions, in particular, to obtain the three-term recurrence relations they satisfy and to provide related MATLAB software. The approach used in all cases is the classical Chebyshev algorithm, computing the recurrence coefficients from the moments of the weight function. Because of the underlying ill-conditioning, high-precision computation is required.

2 Moments

The n th-order moment of the generalized Prudnikov weight function is

$$ \mu_{n}^{\nu,\alpha}={\int}_{0}^{\infty} x^{n} w_{\nu}^{\alpha}(x){\mathrm{d}} x={\Gamma}(n+\alpha+\nu+1) {\Gamma}(n+\alpha+1), ~~ \nu\geq 0, ~~ \alpha>-1, $$
(2.1)

as follows from [11, Eq. (2.4)] where μ is replaced by n + α. For the first Prudnikov-type weight function, the moment of order n is

$$ \begin{array}{@{}rcl@{}} \mu_n^{+}={\int}_{0}^{\infty} x^{n} w_{\nu}^{+}(x) {\mathrm{d}} x={\int}_{0}^{\infty} x^{n} {\mathrm{e}}^{-x}\rho_{\nu}(x) {\mathrm{d}} x &=&2 {\int}_{0}^{\infty} x^{n+\nu/2}{\mathrm{e}}^{-x}K_{\nu}(2\sqrt{x}) {\mathrm{d}} x, \\ && \nu>-1. \end{array} $$

Using Mathematica 12.3, one finds (cf. also [10, Eq. (1.8)])

$$ \mu_n^{+}=n!{\Gamma}(n+\nu+1)U(n+\nu+1,\nu+1,1), $$

where U(a,b,x) is the confluent hypergeometric function (also known as Tricomi’s function) or, in terms of generalized hypergeometric functions, \(U(a,b,x)={x}^{-a} {~}_{2}{F}_{0}(a,a-b+1;-;-{x}^{-1})\) [6, §13.6(vi)]. Thus,

$$ \mu_{n}^{+}=n!{\Gamma}(n+\nu+1) {}_{2}F_{0}(n+\nu+1,n+1;-;-1). $$
(2.2)

For the second Prudnikov-type weight function, the moments have been given in [10, Eq. (1.9)], though involving (in the last line of the equation) the gamma function at a nonpositive integer, that is, plus or minus infinity depending from which side that integer is approached. We have, however,

$$ \mu_{n}^{-}={\int}_{0}^{\infty} x^{n} w_{\nu}^{-}(x){\mathrm{d}} x=2 {\int}_{0}^{\infty} x^{n+\nu/2-1}{\mathrm{e}}^{-1/x} K_{\nu}(2\sqrt{x}){\mathrm{d}} x, \quad \nu\in{\mathbb{R}}. $$
(2.3)

Here, the second integral can be expressed in terms of the Meijer G-function, see [6, §16.17], for which we use here the MATLAB notation on the right of

$$ \begin{array}{@{}rcl@{}} &G_{p,q}^{m,n}&\left( z; \begin{array}{c}a_1,a_2,\ldots,a_p\\b_1,b_2,\ldots,b_q \end{array} \right) \\ &=&\texttt{meijerG} ([a_1,\ldots,a_n],[a_{n+1},\ldots,a_p],[b_1,\ldots, b_m], [b_{m+1},\ldots,b_q],z) \\ &&0\leq n\leq p, ~ 0\leq m\leq q. \end{array} $$

(The content between brackets may be empty. For example, if p = 0, the first two arguments of meijerG are empty, or only the second one if p = n.)

To begin with, the term on the far right of (2.3) can be written as a Mellin transform of the function \(f(x)=2 {\mathrm {e}}^{-1/x}K_{\nu }(2\sqrt {x})\),

$$ \mu_{n}^{-}=(\mathcal{M} f)(s)={\int}_{0}^{\infty} x^{s-1} f(x){\mathrm{d}} x, \quad s=n+\nu/2. $$
(2.4)

Using the Mathematica 12.3 command

MellinTransform[2 BesselK[v,2Sqrt[x]]Exp[-1/x],x,s]

yields

$$ \begin{array}{@{}rcl@{}} (\mathcal{M} f)(s)&=&\frac{2^{2s-2}}{\pi^{3/2}}~\texttt{meijerG}~(~[1/2,1,(2-2s-\nu)/4, (4-2s-\nu)/4, \\ &&(2-2s+\nu)/4,(4-2s+\nu)/4],[~~],[~~],[~~],64). \end{array} $$
(2.5)

Letting

$$ a_1=1, ~~ a_2=1-s-\nu/2, ~~ a_3=1-s+\nu/2 \quad \text{and} \quad p=n=3, ~ q=m=0, $$

the right-hand side of (2.5) is

$$ \begin{array}{@{}rcl@{}} \frac{2^{p+1-n-a_1-a_2-a_3}}{\pi^{n-p/2}}&~&\texttt{meijerG}~(~[~a_1/2,(a_1+1)/2,a_2/2,(a_2+1)/2, a_3/2,(a_3+1)/2], \\ && [~~],[~~],[~~],4^p), \end{array} $$

which, by [6, Eq. 16.19.4] and s = n + ν/2, equals

$$ \texttt{meijerG}~(~[a_1,a_2,a_3],[~~],[~~],[~~],1)=\texttt{meijerG} ~ (~[1,1-(n+\nu),1-n], [~~],[~~],[~~],1). $$

Thus, simplifying by employing [6, Eq. 16.19.1], we get

$$ \mu_{n}^{-} =\texttt{meijerG} ([~~],[~~],[0,n+\nu,n],[~~],1). $$
(2.6)

The moments of the symmetric extension of all the weight functions above are twice the moments stated, if n is even, and zero if n is odd.

If, in the integral of (2.4), we make the change of variable xx2, we can write equivalently

$$ \mu_{n}^{-}=2 (\mathcal{M} g)(2n+\nu), $$
(2.7)

where \(g(x)=f(x^{2})=2{\mathrm {e}}^{-1/x^{2}} K_{\nu }(2x)\). As observed by one of the referees, the Mellin transform \({\mathscr{M}} g\) can be found in formula 3.14.3.13 on p. 211 of [1], where a = 1 and b = 2, giving

$$ \mu_{n}^{-}= \left\{ \begin{array}{l} \frac{1}{2} {\Gamma}(n){\Gamma}(n+\nu) {}_{0}F_{2}(1-n-\nu,1-n;-1) \\ +\frac{1}{2} {\Gamma}(-\nu){\Gamma}(-n-\nu) {}_{0}F_{2}(1+\nu,n+1+\nu;-1) \\ +\frac{1}{2} {\Gamma}(\nu){\Gamma}(-n) {}_{0}F_{2}(1-\nu,n+1;-1). \end{array} \right. $$
(2.8)

This formula not only is rather more complicated than (2.6), but, more importantly, also suffers from serious numerical problems when n = 0,1,2,…, as is the case here. Indeed, as each of these n is approached, either from above or from below, the first and third term become infinitely large, but with opposite signs. For n = 0, this is so because of the appearance of Γ(n) and Γ(−n) in the respective terms, and for n > 0 because of the appearance of 0F2(1 − nν,1 − n;− 1) and of Γ(−n). For these reasons, we prefer (2.6).

3 Orthogonal polynomials and recurrence coefficients

It is well known that (monic) orthogonal polynomials πk relative to a positive weight function w(x) on some finite or infinite interval [a,b] satisfy a three-term recurrence relation

$$ \begin{array}{@{}rcl@{}} \pi_{k+1}(x)&=&(x-\alpha_{k})\pi_{k}(x)-\beta_{k}\pi_{k-1}(x), \quad k=0,1,2,\ldots, \\ &&\pi_{-1}=0, ~~ \pi_{0}=1, \end{array} $$
(3.1)

where the coefficients αk are real and βk > 0. Conventionally, β0 is taken to be \(\beta _{0}={{\int \limits }_{a}^{b}} w(x){\mathrm {d}} x\). For any computational work with orthogonal polynomials, knowledge of this recurrence relation, that is, of its recurrence coefficients, is indispensable.

There is MATLAB software available that generates to any given accuracy the first N recurrence coefficients αk, βk, k = 0,1,2,…,N − 1, and places them into the first, respectively second, column of an N × 2 array ab; see, e.g., [3, §1]. The procedure used here is the Chebyshev algorithm, generating the first N recurrence coefficients from the first 2N moments of the weight function. Given the ill-conditioned nature of this proposition, it is important to know how many working digits are required to obtain all N coefficients βk (and thus, presumably, also all αk≠ 0) to a given relative accuracy. For the three weight functions of Prudnikov type, this is answered by the MATLAB routines dig_gprudnikov.m, dig_prudnikov_type.m, and for the respective symmetric extensions by dig_gprudnikov_symm.m, dig_prudnikov_type_symm.m. These routines not only provide the desired number dig of working digits, but also the respective array ab of recurrence coefficients to the accuracy requested. Once this number dig of required working digits is known, the array ab can be generated directly by the routines sr_gprudnikov.m, sr_prudnikov_type.m, sr_gprudnikov_symm.m, sr_prudnikov_type_symm.m.

For all MATLAB routines needed, visit

https://www.cs.purdue.edu/archives/2002/wxg/codes/PRUD.html.

3.1 Generalized Prudnikov polynomials

Our target precision for the recurrence coefficients, in this and the next two subsections, is 15-digit accuracy. For generalized Prudnikov polynomials with parameter α, the results of the routine dig gprudnikov.m are shown in Table 1 for selected values of ν and for α = ± 1/2. (Other values of α > − 1, including α = 0, in the range from − .9 to 10.6, have led to basically the same results, except, occasionally, somewhat larger ones, but never by more than 3 units.)

Table 1 The number dig of digits required in the Chebyshev algorithm to obtain the first N recurrence coefficients of the generalized Prudnikov polynomials to an accuracy of 15 decimal digits

It can be seen that, for each N shown, the results are more or less the same, which means that the underlying conditioning is essentially independent of the parameters ν and α. The results, in fact, suggest condition numbers of the order 1010 − 1012 when N = 25, 1028 − 1030 when N = 50, and 1063 − 1067 when N = 100.

We used our routine sr_gprudnikov(dig,nofdig,N,nu,alpha) with dig = 30, nofdig= 18, N= 11, nu=alpha= 0, to check Table 9.1 in [7] containing the values of \(a_{n}=\sqrt {\beta _{n}}\) for n = 1,2,…,10. Agreement to all digits was observed except for the last digit, which occasionally is off by one unit.

3.2 Prudnikov-type polynomials of the first type

Here the results of the routine dig_prudnikov_type.m with type= 1 (for the weight function \(w_{\nu }^{+}\)) are shown in Table 2 for selected values of ν > − 1. As before in the case of generalized Prudnikov polynomials, the results are practically independent of ν.

Table 2 The number dig of digits required in the Chebyshev algorithm to obtain the first N recurrence coefficients of the Prudnikov-type polynomials of type 1 to an accuracy of 15 decimal digits

The condition numbers for N = 25,50,100 are now about 1020, 1040, and 1085, that is, substantially larger than in the case of generalized Prudnikov weight functions.

3.3 Prudnikov-type polynomials of the second type

Here, the results of the routine dig_prudnikov_type.m with type= 2 (for the weight function \(w_{\nu }^{-}\)) are shown in Table 3 for selected values of \( \nu \in {\mathbb {R}}\). They are quite similar to the ones in Section 3.1 where applicable, and so is the degree of ill-contitioning.

Table 3 The number dig of digits required in the Chebyshev algorithm to obtain the first N recurrence coefficients of the Prudnikov polynomials of type 2 to an accuracy of 15 decimal digits

Knowing the degree of ill-conditioning, it is easy to estimate the number of digits needed to get any desired accuracy. Thus, for example, when N = 100, to get 32-digit accuracy will require something like 32 + 67 = 99 digits in the case of generalized Prudnikov weight functions and Prudnikov weight functions of type 2, and 32 + 87 = 119 digits for Prudnikov weight functions of type 1. Both these numbers have been corroborated numerically.

3.4 Polynomials orthogonal relative to the symmetric extension of weight functions of Prudnikov type

Symmetry usually lowers condition numbers. This is the case here, where, compared with the case of generalized Prudnikov polynomials in Section 3.1, the number dig of required digits is now about one half of those in Table 1 when N is 25 and 50, and even somewhat smaller when N = 100. More specifically, dig is never greater than 16, 22, 35 for, respectively, N = 25,50,100 and parameters ν and α as in Table 1. Similarly, for symmetric Prudnikov-type polynomials of type 1, the largest numbers dig are 20, 27, 45 for, respectively N = 25,50,100 and for ν as in Table 2, and for symmetric Prudnikov-type polynomials of type 2 they are 15, 21, 34 for ν as in Table 3.