1 Introduction

Spectral methods have been used extensively in numerical approximation of differential (integral) equations [1, 2]. These methods use formulae relating the expansion coefficients of derivatives (integrals) appearing in the differential (integral) equation to those of the function itself. In fact, the coefficients of successive derivatives (integrals) of a function are related by a recurrence relation which greatly facilitates the setting up of an algebraic system to determine these unknown coefficients. The advantage of these recurrence formulae is that they possess good stability in the numerical treatment.

The traditional way to introduce a spectral method starts by approximating a solution f(x) by a finite sum

$$\begin{aligned} \begin{aligned} f(x)\approx f_n(x)=\sum \limits _{k=0}^{n}a_k\phi _k(x), \end{aligned} \end{aligned}$$
(1)

where \(\left\{ {\phi _k } \right\} _{k = 0}^\infty \) is the set of basis functions. The main question which arises is how to choose the basis functions? Once the choice of the basis functions is made, the second question appears: how to determine the expansion coefficients \(a_k\)? A successful expansion basis meets the following requirements:

  1. (1)

    The approximations \(f_n(x)\) should converge rapidly to f(x) as \(n\rightarrow \infty \).

  2. (2)

    Given coefficients \(\left\{ {a_k } \right\} _{k = 0}^n\), it should be easy to determine another set of coefficientsFootnote 1\(\left\{ {a^{(p)}_k } \right\} _{k = 0}^n\), \(\left\{ {b^{p,m}_k } \right\} _{k = 0}^n\) and \(\left\{ {b^{(p)}_k } \right\} _{k = 0}^n\) such that

    $$\begin{aligned} \begin{aligned} \bullet \qquad&\frac{{\mathrm{d}^p f(x)}}{{{\text {d}}x^p }}=f^{(p)}(x)=\sum \limits _{k=0}^{n}a_k \frac{{\mathrm{d}^p \phi _k(x)}}{{{\text {d}}x^p }} \rightsquigarrow \sum \limits _{k=0}^{n}a^{(p)}_k \phi _k(x),\\ \bullet \qquad&x^m \frac{{\mathrm{d}^p f(x)}}{{{\text {d}}x^p }}=\sum \limits _{k=0}^{n}a^{(p)}_k x^m \phi _k(x) \rightsquigarrow \sum \limits _{k=0}^{n}b^{p,m}_k \phi _k(x),\ m \ge 0,\\ \bullet \qquad&\mathcal {I}^{p}f(x)=f^{(-p)}(x)=\sum \limits _{k=0}^{n}a_k \mathcal {I}^{p} \phi _k(x) \rightsquigarrow \sum \limits _{k=0}^{n}b^{(p)}_k \phi _k(x), \end{aligned} \end{aligned}$$
    (2)

    where \(\mathcal {I}^{p}\) is the pth integral operator.

  3. (3)

    The computation of expansion coefficients \(\left\{ {a_k } \right\} _{k = 0}^n\) from function values \(\left\{ {f(x_i) } \right\} _{i = 0}^n\) and the reconstruction of solution values in nodes from the set of coefficients \(\left\{ {a_k } \right\} _{k = 0}^n\) should be easy, i.e., the conversion between two data sets is algorithmically efficient

    $$\begin{aligned} \left\{ {f(x_i) } \right\} _{i = 0}^n\ \leftrightarrows \ \left\{ {a_k } \right\} _{k = 0}^n. \end{aligned}$$

The common denominator of spectral methods is to rely on high-order polynomial expansions, notably trigonometric polynomials for periodic problems, and orthogonal polynomials for nonperiodic boundary value problems. The computation of the expansion coefficients in (2) is the dominant part of the spectral methods. It is also the most time-consuming part of spectral tau and Galerkin methods.

The key computational task in constructing these polynomial approximations and solving differential (integral) equations with polynomial coefficients in spectral methods is the evaluation of the expansion coefficients of the derivatives (integrals) and moments of high-order derivatives of infinitely differentiable functions. This is the main issue that we address in this study, where we restrict our attention to the orthogonal polynomial expansions of the Hermite, generalized Laguerre, Bessel, and Jacobi (including Legendre, Chebyshev, and ultraspherical) families. Formulae for the expansion coefficients of a general-order derivative of an infinitely differentiable function in terms of those of the function itself are constructed for expansions in Chebyshev [3, 5], Legendre [6], ultraspherical [7, 8], Jacobi [9, 10], generalized Laguerre [11], Hermite [12], Bessel [13] and Bernstein [14, 15] polynomials. Many different algorithms for finding the recurrence relations for connection and linearization coefficients for these families are discussed and developed by many authors, see, for instance, [16,17,18,19,20]. It was found that the use of integral operations for constructing spectral approximations improves their rate of convergence, and allows the multiple-boundary conditions to be incorporated more efficiently [21, 22]. The application of integral operators for the treatment of differential equations by orthogonal polynomials dates back to Clenshaw [23] in the late 1950’s. The spectral approximation of the integration form of differential equations was put forward later in the 1960’s in [24] in the spectral space and in [25] in the physical space. The reason for the success of the spectral integration approaches is basically because differentiation is inherently sensitive, as small perturbations in data can cause large changes in result, while integration is inherently stable. Phillips and Karageorghis [26] proved formulae relating the expansion coefficients of an infinitely differentiable function that has been integrated an arbitrary number of times in terms of the expansion coefficients of the function when the expansion functions are the ultraspherical polynomials. They also described how they can be used to solve two-point boundary value problems. Doha [27] proved the same formula but in a simpler way than the formula suggested by Phillips and Karageorghis. Doha proved more general formulae for Jacobi [28], Laguerre [29], Hermite [29] and Bessel [13] polynomials.

Our principal aims in this paper are:

  1. (i)

    To derive explicit formula for classical orthogonal polynomial expansion coefficients of the derivatives of an arbitrary differentiable function in terms of its original expansion coefficients.

  2. (ii)

    To present explicit expression for the derivatives of classical orthogonal polynomials of any degree and for any order in terms of the classical orthogonal polynomials themselves.

  3. (iii)

    To derive explicit formulae for classical orthogonal polynomials coefficients of the moments of a general-order derivative of an infinitely differentiable function in terms of its classical orthogonal polynomials coefficients.

  4. (iv)

    To obtain explicit expression for classical orthogonal polynomials of any degree that has been integrated an arbitrary number of times in terms of the classical orthogonal polynomials themselves.

  5. (v)

    To describe a simple algorithmic procedure to compute recursively the expansion coefficients in the connection problem and the expansion coefficients of associated classical orthogonal polynomials.

  6. (vi)

    To show how to use these formulae for solving ordinary differential equations with polynomial coefficients by reducing them to recurrence relations in the expansion coefficients of their solutions.

It should be mentioned that one of our aims here is to emphasize the systematic character and simplicity of our algorithm, which allows one to implement it in any computer algebra (here the Mathematica symbolic language has been used).

2 Properties of Classical Orthogonal Polynomials

A family \( y(x)=\phi _n (x) = k_n x^n + \ldots \left( n \in \left\{ {0,1, \ldots } \right\} ,\ k_n \ne 0\right) \) of polynomials of degree exactly n is a family of classical orthogonal polynomials if it is the solution of a differential equation of the type (see, [30,31,32,33])

$$\begin{aligned} \begin{aligned} \sigma (x)y''(x)+\tau (x)y'(x)+\lambda _n(x)y(x)=0, \end{aligned} \end{aligned}$$
(3)

where \(\sigma (x)=a x^2+b x+c\) is a polynomial of at most second degree and \(\tau (x)=d x+e\) is a polynomial of first degree. Since one demands that \(\phi _n(x)\) has exact degree n, then by equating the highest coefficients of \(x^n\) in (3) one gets

$$\begin{aligned} \begin{aligned} \lambda _n=-n [a(n-1)+d ]. \end{aligned} \end{aligned}$$

The solutions, \(\phi _n(x)\), of Eq. (3) usually called hypergeometric-type polynomials. These polynomials satisfy the orthogonality relation

$$\begin{aligned} \begin{aligned} \int _{a'}^{b'} {\phi _n (x)\phi _m (x) \rho (x) {\text {d}}x} = \delta _{nm} h_n, \ h_n > 0\quad (n,\ m = 0,1, \ldots ), \end{aligned} \end{aligned}$$
(4)

where \(\rho (x)\) is a function satisfying the so-called Pearson equation,

$$\begin{aligned} \begin{aligned} \frac{{\text {d}}}{{\text {d}}x }[\sigma (x)\rho (x)]=\tau (x)\rho (x), \end{aligned} \end{aligned}$$

provided that the following condition

$$\begin{aligned} \begin{aligned} \left. {\sigma (x)\rho (x)x^k } \right| _{x = a',b'} = 0,\quad \forall k \ \ge 0, \end{aligned} \end{aligned}$$
(5)

is satisfied. The constant \(h_n\) can be computed from the relation

$$\begin{aligned} h_n = ( - 1)^n n!k_n B_n \int _{a'}^{b'} {\sigma ^n (x)\rho (x){\text {d}}x}, \end{aligned}$$

where \(B_n\) is the normalization constant appearing in the Rodrigues formula

$$\begin{aligned} \begin{aligned} \phi _n (x) = \frac{{B_n }}{{\rho (x)}}D^{(n)} [\rho _n (x)],\quad D\equiv \frac{{\text {d}}}{{\text {d}}x} \end{aligned} \end{aligned}$$
(6)

and \(\rho _n(x) = \sigma ^n(x)\rho (x)\). The constants \(k_n\) and \(B_n\) are related by

$$\begin{aligned} k_n = B_n \prod \limits _{p = 0}^{n - 1} {[d + (n + p - 1)a]} . \end{aligned}$$

An important property of classical orthogonal polynomials is that their derivatives, \(\phi ^{(m)}_n(x)\), form orthogonal systems. These systems are orthogonal in the interval \([a', b']\) with respect to the weight function \(\rho _m(x)\), i.e.,

$$\begin{aligned} \begin{aligned} \int _{a'}^{b'} {\phi _n^{(m)} (x)\phi _k^{(m)} (x)\rho _m (x){\text {d}}x} = \delta _{nk} h_n^{(m)},\ h_n^{(m)} > 0\ (n,k = 0,1, \ldots ), \end{aligned} \end{aligned}$$
(7)

where \(h^{(m)}_n\) can be expressed in terms of \(h_n\) as

$$\begin{aligned} h^{(m)}_n=(-1)^m A_{mn}h_n, \end{aligned}$$

and the constant \(A_{mn}\) appearing in the generalization of Rodrigues’ formula (6),

$$\begin{aligned} \begin{aligned} D^m \phi _n (x) = \frac{{A_{mn} B_n }}{{\sigma ^m (x)\rho (x)}}D^{n - m} [\sigma ^n (x)\rho (x)], \end{aligned} \end{aligned}$$
(8)

has the form

$$\begin{aligned} \left\{ \begin{array}{l} A_{mn}=\frac{{n!}}{{(n - m)!}}\prod \limits _{i = 0}^{m - 1} {[d + (n + i - 1)a]},\quad 1 \le m \le n , \\ A_{0n}=1. \end{array}\right. \end{aligned}$$

Koepf and Schmersau [34] showed that any solution \(\phi _n(x)\) of (3) satisfies a recurrence relation of the type

$$\begin{aligned} \begin{aligned} x \phi _n (x)=\alpha _n\phi _{n+1} (x)+\beta _n\phi _n (x)+\gamma _n\phi _{n-1} (x),\quad n=0,1,\ldots ,\ \phi _{-1}=0,\ \phi _0=1, \end{aligned} \end{aligned}$$
(9)

where the coefficients \(\alpha _n\), \(\beta _n\) and \(\gamma _n\) are given by the explicit formulae

$$\begin{aligned} \left\{ \begin{array}{l} \alpha _n = \frac{{k_n }}{{k_{n + 1} }}, \\ \beta _n = \frac{{2bn(an + d - a) - e( - d + 2a)}}{{(d + 2an)(d - 2a + 2an)}},\\ \gamma _n = - \left( (an + d - 2a)n(4ca - b^2 ) \right. \\ \qquad \quad \left. + 4a^2 c - ab^2 + ae^2 - 4acd + db^2 - bed + d^2 c \right) \\ \qquad \quad \times \frac{{(an + d - 2a)n}}{{(d - 2a + 2an)^2 (2an - 3a + d)(2an - a + d)}}\frac{{k_n }}{{k_{n - 1} }}, \\ \end{array}\right. \end{aligned}$$
(10)

and also satisfies a structure relation of the type

$$\begin{aligned} \begin{aligned} \phi _n (x) = {{\bar{\alpha }}} _n\ D\phi _{n + 1} (x) + {{\bar{\beta }}} _n\ D\phi _n (x) + {{\bar{\gamma }}} _n\ D\phi _{n - 1} (x), \end{aligned} \end{aligned}$$
(11)

where the coefficients \({{\bar{\alpha }}} _n, \ {\bar{\beta }} _n\) and \(\bar{\gamma }_n\) are given by the explicit formulae

$$\begin{aligned} \left\{ \begin{array}{l} {\bar{\alpha }} _n = \frac{1}{{n + 1}}\frac{{k_n }}{{k_{n + 1} }}, \\ {\bar{\beta }} _n = \frac{{2ea - db}}{{(d + 2an)(d - 2a + 2an)}}, \\ {\bar{\gamma }} _n = \frac{{((n - 1)(an + d - a)(4ac - b) + ae + dc - bed)an}}{{(d - 2a + 2an)^2 (2an - 3a + d)(2an - a + d)}}\frac{{k_n }}{{k_{n - 1} }}, \end{array}\right. \end{aligned}$$
(12)

moreover, they proved that the power series coefficients \(C_m(n)\) given by

$$\begin{aligned} \phi _n (x) = \sum \limits _{m = 0}^n {C_m (n)x^m ,} \end{aligned}$$

satisfy the recurrence relation

$$\begin{aligned}&(m-n)(an+d-a+am)C_m(n)+(m+1)(bm+e)C_{m+1}(n)\\&\quad +c(m+1)(m+2)C_{m+2}(n)=0, \end{aligned}$$

which carries the complete information about the hypergeometric representation of \(\phi _n (x)\).

For the sake of completeness, an appendix A has been included at the end of this paper giving the expressions of \(\sigma (x),\ \tau (x),\ \rho (x),\ \lambda _n, \ h_n,\ \alpha _n,\ \beta _n,\ \gamma _n,\ {\bar{\alpha }}_n,\ {\bar{\beta }}_n, and \ {\bar{\gamma }}_n\) and the hypergeometric series representation for each one of the referred classical orthogonal families (see, Tables 5, 6 in “Appendix”).

3 Expansion Coefficients of the Derivatives/Integrals of \(\phi _n (x)\)

The main objective of this section is to give explicit formulae for the derivatives and integrals of \(\phi _n (x)\), based on the method of Sánchez-Ruiz and Dehesa [35].

Theorem 1

In the expansion

$$\begin{aligned} \frac{\mathrm{{d}}^p}{\mathrm{{d}}x^p}\phi _n(x)=\sum _{i=0}^{n-p}C^+_{p,i}(n)\phi _i(x),\quad n\ge p \ge 0, \end{aligned}$$
(13)

the coefficients \(C^+_{p,i}(n)\) are given by

$$\begin{aligned} C^+_{p,i}=\frac{(-1)^{n-p}B_iB_nA_{i+p,n}}{h_i}\int _{a'}^{b'}\rho (x) \sigma ^n(x)D^{(n-p-i)}[\sigma ^{-p}(x)]\mathrm{{d}}x, \end{aligned}$$
(14)

and satisfy the recurrence relation

$$\begin{aligned}&\bar{\alpha }_{i-1}\ C^+_{p+1,i-1}(n)+\bar{\beta }_i\ C^+_{p+1,i}(n)+\bar{\gamma }_{i+1}\ C^+_{p+1,i+1}(n)=C^+_{p,i}(n),\nonumber \\&\quad i=1,2,\ldots , n-p,\ n \ge p\ge 0. \end{aligned}$$
(15)

Proof

Multiplying both sides of Eq. (13) by \(\rho (x)\phi _k(x)\), and integrating between \(a'\) and \(b'\), orthogonality relation (4) immediately gives

$$\begin{aligned} C^+_{p,k}(n)=\frac{1}{h_k}\int _{a'}^{b'}\rho (x)\phi _k(x)\phi _n^{(p)}(x)v. \end{aligned}$$

Using the Rodrigues representation (6) for \(\phi _n(x)\), this integral can be written

$$\begin{aligned} C^+_{p,k}(n)=\frac{B_k}{h_k}\int _{a'}^{b'}\phi ^{(p)}_n(x)\frac{d^k}{{\text {d}}x^k}[\sigma ^k(x)\rho (x)]{\text {d}}x. \end{aligned}$$

Integrating by parts k times, and taking into account the orthogonality condition (5), we get

$$\begin{aligned} C^+_{p,k}(n)=\frac{(-1)^kB_k}{h_k}\int _{a'}^{b'}\rho (x)\sigma ^k(x)\phi _n^{(p+k)}(x){\text {d}}x. \end{aligned}$$

Using the Rodrigues representation (8) for \(\phi _n^{(p+k)}(x)\), this integral can be written

$$\begin{aligned} C^+_{p,k}(n)=(-1)^k\frac{B_kB_nA_{p+k,n}}{h_k}\int _{a'}^{b'}\sigma ^{-p}(x)\frac{d^{n-p-k}}{{\text {d}}x^{n-p-k}}[\sigma ^n(x)\rho (x)]{\text {d}}x. \end{aligned}$$

Integrating by parts \((n-p-k)\) times, and taking into account the orthogonality condition (5), we get

$$\begin{aligned} C^+_{p,k}(n)=\frac{(-1)^{n-p} B_k B_n A_{k+p,n}}{h_k}\int _{a'}^{b'}\rho (x)\sigma ^n(x)\frac{d^{n-p-k}}{{\text {d}}x^{n-p-k}}[\sigma ^{-p}(x)]{\text {d}}x, \end{aligned}$$

which proves (14). Let us write

$$\begin{aligned} \sum \limits _{i = 0}^{n - p - 1} {C_{p + 1,i}^ + (n)\phi _i (x)} = \frac{{\text {d}}}{{{\text {d}}x}}\left[ {\sum \limits _{i = 0}^{n - p} {C_{p,i}^ + (n)\phi _i (x)} } \right] , \end{aligned}$$

then using identity (11) leads to the recurrence relation (15), which completes the proof of the theorem. \(\square \)

Note 1

The integral (14) for the case of Bessel polynomials is evaluated by means of the residual theorem.

The following theorem can be proved in a similar way like that of Theorem 1.

Theorem 2

In the expansion

$$\begin{aligned} \phi _n(x)=\sum _{i=p}^{n+p}C^-_{p,i}(n)\phi _i^{(p)}(x),\quad p \ge 0, \end{aligned}$$
(16)

the coefficients \(C^-_{p,i}(n)\) are given by

$$\begin{aligned} C^-_{p,i}=\frac{(-1)^{n+p}B_iB_nA_{i-p,n}}{h_i}\int _{a'}^{b'}\rho (x)\sigma ^n(x)\frac{\mathrm{{d}}^{n-p-i}}{{\text {d}}x^{n-p-i}}[\sigma ^p(x)] \mathrm{{d}}x, \end{aligned}$$
(17)

and satisfy the recurrence relation

$$\begin{aligned}&\bar{\alpha }_{i-1}\ C^-_{p-1,i-1}(n)+\bar{\beta }_i\ C^-_{p-1,i}(n)+\bar{\gamma }_{i+1}\ C^-_{p-1,i+1}(n)=C^-_{p,i}(n),\nonumber \\&\quad i=p,\ p+1,\ \ldots , n+p. \end{aligned}$$
(18)

Corollary 1

It is easy to show that

$$\begin{aligned} \mathcal {I}^{p}\phi _n(x)= & {} \sum _{i=p}^{n+p}C^-_{p,i}(n)\phi _i(x)+\pi _{p-1,n}(x),\quad p\ge 0, \end{aligned}$$
(19)
$$\begin{aligned}= & {} \sum _{i=0}^{2p}b_{p,i}(n)\phi _{n+p-i}(x)+{\tilde{\pi }}_{p-1,n}(x),\quad p\ge 0, \end{aligned}$$
(20)

where \(\pi _{p-1,n}(x)\) and \({\tilde{\pi }}_{p-1,n}(x)\) are polynomials of degree at most \((p -1)\) and the coefficients \(b_{p,i}(n)\) and \(C^-_{p,i}(n)\) are related by

$$\begin{aligned} \begin{aligned} b_{p,i}(n) =C^-_{p,n+p-i}(n), \end{aligned} \end{aligned}$$
(21)

and moreover, the coefficients \(b_{p,i}(n)\) satisfy a recurrence relation of the type

$$\begin{aligned} \begin{aligned} b_{p,i}(n)&= \bar{\alpha }_{n+p-i-1}b_{p-1,i}(n) +\bar{\beta }_{n+p-i}b_{p-1,i-1}(n)\\&\quad + \bar{\gamma }_{n+p-i+1}b_{p-1,i-2}(n), \ i = 0,\ 1,\ \ldots , 2p, \end{aligned} \end{aligned}$$
(22)

with \(b_{p-1,-\ell }(j)=0,\qquad \forall \ell >0,\qquad b_{0,0}=1,\qquad b_{p-1,r}(j)=0, \quad r=2p-1,\ 2p.\)

Proof

Integration of (16) p times with respect to x gives immediately (19), which in turn may be written in the form

$$\begin{aligned} \begin{aligned} \mathcal {I}^{p}\phi _n(x)=\sum _{i=0}^{n}C^-_{p,n+p-i}(n)\phi _{n+p-i}(x)+\pi _{p-1,n}(x),\quad p\ge 0. \end{aligned} \end{aligned}$$

Making use of relation (17) and knowing that deg \(\sigma ^p(x)\le 2p,\) enables one to show that

$$\begin{aligned}\begin{aligned} b_{p,i}(n)=C^-_{p,n+p-i}(n)=0,\ i=2p+1, \ \ldots ,n;\ n>2p, \end{aligned} \end{aligned}$$

and accordingly, formula (19) may be written as formula (20). The recurrence relation (22) is a direct consequence of (18), and this completes the proof of the corollary. \(\square \)

Remark 1

It is to be noted here that the expansion coefficients \(C^+_{p,i}(n)\) and \(C^-_{p,i}(n)\) are related by

$$\begin{aligned} \begin{aligned} C^+_{p,i}(n)= C^-_{-p,i}(n). \end{aligned} \end{aligned}$$
(23)

Corollary 2

If the classical orthogonal polynomials \(\phi _n(x)\) satisfy a recurrence relation of the type

$$\begin{aligned} \begin{aligned} \phi _n(x)=\bar{\alpha }_nD\phi _{n+1}(x)+\bar{\gamma }_nD\phi _{n-1}(x), \end{aligned} \end{aligned}$$
(24)

then

$$\begin{aligned} \begin{aligned} \mathcal {I}^{p}\phi _n(x)=\sum _{i=0}^{p}b_{p,2i}(n)\phi _{n+p-2i}(x)+{\tilde{\pi }}_{p-1,n}(x). \end{aligned} \end{aligned}$$
(25)

Proof

Making use of (22), noting that \(b_{11}(n) = 0\), enables one to show that

$$\begin{aligned} b_{p,i}(n)=0,\ i\ \text {odd}, \end{aligned}$$

and accordingly formula (20) takes the form (25). \(\square \)

Theorem 3

  1. (i)

    For Hermite polynomials [12, 29]

    $$\begin{aligned} \begin{aligned} D^p H_n (x) = 2^p \frac{{n!}}{{(n - p)!}}H_{n - p} (x),\quad n,\ p \ge 0, \end{aligned} \end{aligned}$$
    (26)

    and

    $$\begin{aligned} \begin{aligned} \mathcal {I}^{p}H_n (x) = 2^{-p} \frac{{n!}}{{(n + p)!}}H_{n + p} (x),\quad n,\ p \ge 0, \end{aligned} \end{aligned}$$
    (27)
  2. (ii)

    For generalized Laguerre polynomials [11, 29]

    $$\begin{aligned} \begin{aligned} D^p L_n^\alpha (x) = ( - 1)^p \sum \limits _{i = 0}^{n - p} {\left( {\begin{array}{*{20}c} {n - i - 1} \\ {p - 1} \\ \end{array}} \right) } L_i^\alpha (x),\quad n,\ p \ge 1, \end{aligned} \end{aligned}$$
    (28)

    and

    $$\begin{aligned} \begin{aligned} \mathcal {I}^{p} L_n^\alpha (x) = \sum \limits _{i = 0}^p {( - 1)^{i + p} \left( {\begin{array}{*{20}c} p \\ i \\ \end{array}} \right) } L_{n + p - i}^\alpha (x),\quad n,\ p \ge 1. \end{aligned} \end{aligned}$$
    (29)
  3. (iii)

    For Jacobi polynomials [9, 28]

    $$\begin{aligned} \begin{aligned} D^p P_n^{(\alpha ,\beta )} (x)&= 2^{ - p} (n + \lambda )_p\\&\quad \times \sum \limits _{i = 0}^{n - p} {C_{n - p,i} (\alpha + p,\beta + p,\alpha ,\beta )} P_i^{(\alpha ,\beta )} (x),\quad \lambda = \alpha + \beta + 1, \end{aligned} \end{aligned}$$
    (30)

    and

    $$\begin{aligned} \mathcal {I}^{p} P_n^{(\alpha ,\beta )} (x) = \frac{{2^p }}{{(n - p + \lambda )_p }}\sum \limits _{i = 0}^{2p} {C_{n + p,n + p - i} (\alpha - p,\beta - p,\alpha ,\beta )} P_{n + p - i}^{(\alpha ,\beta )} (x), \end{aligned}$$
    (31)

    where

    $$\begin{aligned}\begin{aligned} C_{n,i} (\gamma ,\delta ,\alpha ,\beta )&= \frac{{(n + \eta )_i (i + \gamma + 1)_{n - i} }}{{(n - i)!(\lambda + i)_i }}\\&\quad \times {}_3F_2 \left[ {\begin{array}{*{20}c} \begin{array}{l} - (n - i),n + i + \eta ,i + \alpha + 1 \\ i+\gamma + 1,2i + \lambda + 1 \\ \end{array} &{} {;1} \\ \end{array}} \right] , \\&\qquad \eta = \gamma + \delta + 1. \end{aligned} \end{aligned}$$
  4. (iv)

    For Bessel polynomials [13]

    $$\begin{aligned} \begin{aligned} D^p Y_n^{(\alpha )} (x)&= 2^{ - p} (n - p + 1)_p (n + \alpha + 1)_p \\&\sum \limits _{k = 0}^{n - p} {M_k (\alpha + 2p,\alpha ,n - p)Y_k^{(\alpha )} (x)}, \end{aligned} \end{aligned}$$
    (32)

    and

    $$\begin{aligned} \begin{aligned} \mathcal {I}^{p} Y_n^{(\alpha )} (x) = \sum \limits _{i = 0}^{2p} {b_{p,i} (n)Y_{n + p - i}^{(\alpha )} (x)},\ n,\ p \ge 0, \end{aligned} \end{aligned}$$
    (33)

    with \(Y_{-r}^{(\alpha )}(x)=0,\ r\ge 1,\) where

    $$\begin{aligned} M_i (\alpha ,\beta ,n) = ( - 1)^n (2i + \beta + 1)\frac{{(\alpha - \beta )_{n - i} ( - n)_i (\alpha + n + 1)_i }}{{i!(\beta + i + 1)_{n + 1} }}, \end{aligned}$$

    and

    $$\begin{aligned} b_{p,i} =\left( {\begin{array}{*{20}c} {n + p} \\ i \\ \end{array}} \right) \frac{{2^p (2n + 2p - 2i + \alpha + 1)(n + \alpha - p + 1)_ {n + p - i} (2p - i + 1)_i }}{{(n + 1)_p (n + \alpha - p + 1)_p (n + p + \alpha - i + 1)_{n + p + 1} }}. \end{aligned}$$

Remark 2

For Bernstein polynomials [15]

$$\begin{aligned} D^p\,B_{i,n}(x)= & {} \frac{n!}{(n-p)!}\displaystyle \sum _{k=\max (0,i+p-n)}^{\min (i,p)}(-1)^{k+p}\left( {\begin{array}{c}p\\ k\end{array}}\right) B_{i-k,n-p}(x). \end{aligned}$$
(34)
$$\begin{aligned} \mathcal {I}^q\,B_{i,n}(x)= & {} \frac{n!}{(n+p)!}\displaystyle \sum _{k=i+q}^{n+q}\left( {\begin{array}{c}j-i-1\\ q-1\end{array}}\right) B_{j,n+q}(x). \end{aligned}$$
(35)

4 The Coefficients of Differentiated/Integrated Expansions of \(\phi _n(x)\)

The main results of this section are two explicit formulae which express the expansion coefficients of a general-order derivative (integral) of an infinitely differentiable function in terms of its original expansion coefficients.

Theorem 4

Suppose we are given a regular function f(x) which is formally expanded in the infinite series

$$\begin{aligned} \begin{aligned} f(x)=\sum \limits _{n=0}^{\infty }a_n\phi _n(x), \end{aligned} \end{aligned}$$
(36)

and for the pth derivatives of f(x),

$$\begin{aligned} \begin{aligned} f^{(p)}(x)=\sum \limits _{n=0}^{\infty }a_n^{(p)}\phi _n(x),\quad a_n^{(0)}=a_n, \end{aligned} \end{aligned}$$
(37)

then

$$\begin{aligned} \begin{aligned} a_n^{(p)}=\sum \limits _{i=0}^{\infty }C^+_{p,n}(n+p+i)a_{n+p+i},\quad n\ge 0, \end{aligned} \end{aligned}$$
(38)

where the coefficients \(C^+_{p,i}(n)\) are given by (14). Moreover, the coefficients \(a^{(p)}_n\) satisfy the recurrence relation

$$\begin{aligned} \begin{aligned} \bar{\alpha }_{n-1}a^{(p+1)}_{n-1} + \bar{\beta }_n a^{(p+1)}_n + \bar{\gamma }_{n+1}a^{(p+1)}_{n+1} = a^{(p)}_n,\quad p\ge 0,\ n \ge 1. \end{aligned} \end{aligned}$$
(39)

Proof

By differentiating Eq. (36) p times and using (13), we obtain

$$\begin{aligned} \begin{aligned} f^{(p)}(x)=\sum \limits _{n=p}^{\infty }a_n\sum \limits _{i=0}^{n-p}C^+_{p,i}(n)\phi _i(x). \end{aligned} \end{aligned}$$
(40)

Expanding (40) and collecting similar terms, we obtain

$$\begin{aligned} \begin{aligned} f^{(p)}(x)=\sum \limits _{n=0}^{\infty }\left[ \sum \limits _{i=0}^{\infty }C^+_{p,n}(n+p+i)a_{n+p+i}\right] \phi _n(x). \end{aligned} \end{aligned}$$
(41)

Identifying (37) with (41) gives immediately

$$\begin{aligned} \begin{aligned} a^{(p)}_n=\sum \limits _{i=0}^{\infty }C^+_{p,n}(n+p+i)a_{n+p+i}. \end{aligned} \end{aligned}$$

Now, let us write

$$\begin{aligned}\begin{aligned} \frac{{\text {d}}}{{\text {d}}x}\left[ \sum \limits _{i=0}^{\infty }a^{(p-1)}_n\phi _n(x)\right] =\sum \limits _{n=0}^{\infty }a^{(p)}_n\phi _n(x), \end{aligned} \end{aligned}$$

then use of identity (11) leads to the recurrence relation (39), which completes the proof of the theorem \(\square \)

Theorem 5

Suppose that \(f^{(-m)}(x) = D^{-m}f(x)\) for some \(m \ge 1\) is an infinitely differentiable function, and f(x) is formally expanded as in (36). Let \(b^{(p)}_n,\ m \ge p \ge 1,\) denote the expansion coefficients of \(f^{(-p)}(x)\) in the expansion

$$\begin{aligned} \begin{aligned} f^{(-p)}(x)=\sum \limits _{n=0}^{\infty }b^{(p)}_n\phi _n(x)+\pi _{p-1}(x),\quad b^{(0)}_n=a_n, \end{aligned} \end{aligned}$$
(42)

where \(\pi _{p-1}(x)\) is a polynomial of degree at most \((p - 1)\), then the coefficients \(b^{(p)}_n\) are related to \(a_n\) by

$$\begin{aligned} \begin{aligned} b^{(p)}_n=\sum \limits _{i=0}^{2p}b_{pi}(n-p+i)a_{n-p+i},\quad n\ge p, \end{aligned} \end{aligned}$$
(43)

and they satisfy a recurrence relation of the type

$$\begin{aligned} \begin{aligned} b^{(p)}_n=\bar{\alpha }_{n-1}b^{(p-1)}_{n-1} + \bar{\beta }_n b^{(p-1)}_n + \bar{\gamma }_{n+1}b^{(p-1)}_{n+1},\quad n\ge p. \end{aligned} \end{aligned}$$
(44)

Proof

By integrating Eq.(36) p times and using (20), we obtain

$$\begin{aligned} \begin{aligned} \mathcal {I}^{p}f(x)=\sum \limits _{n=0}^{\infty }a_n\sum \limits _{i=0}^{2p}b_{pi}\phi _{n+p-i}(x)+\bar{\pi }_{p-1}(x). \end{aligned} \end{aligned}$$
(45)

Expanding (45), collecting similar terms and noting that \(\phi _{-r}(x) = 0\) for \(r > 0\), we obtain

$$\begin{aligned} \begin{aligned} \mathcal {I}^{p}f(x)=\sum \limits _{n=p}^{\infty }\left[ \sum \limits _{i=0}^{2p}b_{pi}(n-p+i)a_{n-p+i}\right] \phi _{n}(x)+\pi _{p-1}(x), \end{aligned} \end{aligned}$$
(46)

where \(\pi _{p-1}(x)\) is a polynomial of degree at most \((p - 1)\). Identifying (46) with (42) gives immediately

$$\begin{aligned} \begin{aligned} b^{(p)}_{n}=\sum \limits _{i=0}^{2p}b_{pi}(n-p+i)a_{n-p+i},\quad n\ge p. \end{aligned} \end{aligned}$$

Now, let us write

$$\begin{aligned} \begin{aligned} \frac{{\text {d}}}{{\text {d}}x}\left[ \sum \limits _{n=p}^{\infty }b^{(p)}_n\phi _n(x)+\pi _{p-1}(x)\right] =\sum \limits _{n=p-1}^{\infty }b^{(p-1)}_n\phi _n(x) +\pi _{p-2}(x), \end{aligned} \end{aligned}$$

then making use of identity (11) leads to the recurrence relation (44), which completes the proof of the theorem. \(\square \)

In view of Corollary 3.2, we obtain the following result:

Corollary 3

If the classical orthogonal polynomials \(\phi _n(x)\) satisfy a recurrence relation of the type (24), then

$$\begin{aligned} \begin{aligned} b^{(p)}_{n}=\sum \limits _{i=0}^{2p}b_{p,2i}(n-p+2i)a_{n-p+2i},\quad n\ge p. \end{aligned} \end{aligned}$$
(47)

In the following, we give explicit expressions that relate the expansion coefficients \(a^{(p)}_n\) and \(b^{(p)}_n\) with \(a_n\) for different expansion basis (Hermite, generalized Laguerre, Jacobi, Bessel and Bernstein):

Theorem 6

  1. (i)

    For Hermite polynomials [12, 29]

    $$\begin{aligned} \begin{aligned} a^{(p)}_{n}=2^p\frac{(n+p)!}{n!}a_{n+p}, \end{aligned} \end{aligned}$$
    (48)

    and

    $$\begin{aligned} \begin{aligned} b^{(p)}_{n}=2^{-p}\frac{(n-p)!}{n!}a_{n-p},\quad n\ge p. \end{aligned} \end{aligned}$$
    (49)
  2. (ii)

    For generalized Laguerre polynomials [11, 29]

    $$\begin{aligned} \begin{aligned} a^{(p)}_{n}=(-1)^p\sum \limits _{i=0}^{\infty }\left( {\begin{array}{c}p+i-1\\ p-1\end{array}}\right) a_{n+i+p}, \end{aligned} \end{aligned}$$
    (50)

    and

    $$\begin{aligned} \begin{aligned} b^{(p)}_{n}=\sum \limits _{i=0}^{\infty }(-1)^{p+i}\left( {\begin{array}{c}p\\ i\end{array}}\right) a_{n+i-p},\quad n\ge p. \end{aligned} \end{aligned}$$
    (51)
  3. (iii)

    For Jacobi polynomials [28]

    $$\begin{aligned} \begin{aligned} a^{(p)}_{n}&= 2^{-p}\sum \limits _{i=0}^{\infty }(n+i+p+\lambda )_pC_{n+1,n}(\alpha +p,\beta +p,\alpha ,\beta )a_{n+i+p}, \\&n,p\ge 0, \end{aligned} \end{aligned}$$
    (52)

    and

    $$\begin{aligned} \begin{aligned} b^{(p)}_{n}=\sum \limits _{i=0}^{2p}\frac{2^{p}}{(i+n-2p+\lambda )_p}C_{n+i,n}(\alpha -p,\beta -p,\alpha ,\beta )a_{n+i-p},\quad n\ge p. \end{aligned} \end{aligned}$$
    (53)
  4. (iv)

    For Bessel polynomials [13]

    $$\begin{aligned} \begin{aligned} a^{(p)}_{n}&= 2^{-p}\sum \limits _{i=0}^{\infty }(n+i+1)_p(n+p+i+\alpha +1)_p M_n(\alpha +2p, \alpha , n+i),\\&\quad n\ge 0,\ p\ge 1, \end{aligned} \end{aligned}$$
    (54)

    and

    $$\begin{aligned} \begin{aligned} b^{(p)}_{n}=\sum \limits _{i=0}^{2p}b_{p,i}(n - p + i)a_{n-p+i},\quad n\ge p. \end{aligned} \end{aligned}$$
    (55)

Remark 3

For Bernstein polynomials [14]

$$\begin{aligned} a_{i,n}^{(q)}=\displaystyle \sum _{k=-q}^qC_k(i,n,q)a_{i-k,n}, \end{aligned}$$

where

$$\begin{aligned} C_k(i,n,q)=q!\displaystyle \sum _{m=0}^{q}\left( {\begin{array}{c}q\\ m\end{array}}\right) \,\left( {\begin{array}{c}i\\ m+k\end{array}}\right) \,\left( {\begin{array}{c}n-i\\ q-m-k\end{array}}\right) . \end{aligned}$$

5 Products of Powers and Orthogonal Polynomials

For the evaluation of the expansion coefficients of \(x^{m}f^{(p)}(x)\) in a series of \(\phi _{n}(x)\), the following theorem is needed.

Theorem 7

([35], p. 163)

$$\begin{aligned} x^{m}\phi _j(x)=\sum _{n=0}^{m+j}a_{m,j+m-n}(j)\phi _{n}(x), \end{aligned}$$
(56)

where

$$\begin{aligned} \begin{aligned} a_{m,j+m-n}(j)&=\frac{(-1)^{n}B_{n}B_{j}m!}{h_{n}}\\&\quad \times \sum _{k=k-}^{k+}\left( \begin{array}{*{20}c} n \\ k\end{array}\right) \frac{A_{kj}}{(m-n+k)!}\\&\quad \times \int _{a'}^{b'}x^{m-n+k}\sigma ^{n-k}(x)D^{j-k}[\sigma ^j(x)\rho (x)]{\text {d}}x, \end{aligned} \end{aligned}$$
(57)

\(k_{-}=\max (0,n-m),k_{+}=\min (n,j).\)

The explicit expressions of (56) when \(\{\phi _{n}(x)\}\) is one of the classical families of Hermite, Laguerre, Jacobi and Bessel polynomials are given in [35] formulae (3.10), (3.17), (3.22) and (3.31), pp. 164–168.

Lemma 1

The expansion (56) may be written in the form

$$\begin{aligned} x^{m}\phi _{j}(x)=\sum _{n=0}^{2m}a_{m,n}(j)\phi _{j+m-n}(x). \end{aligned}$$
(58)

Proof

The expansion (56) can be written as

$$\begin{aligned} x^{m}\phi _{j}(x)=\sum _{n=0}^{m+j}a_{m,n}(j)\phi _{j+m-n}(x), \end{aligned}$$
(59)

then multiplying both sides by \(\rho (x)\phi _{j+m-k}(x)\), integrating between \(a'\) and \(b'\) and making use of relation (4), yield

$$\begin{aligned} h_{j+m-n}\ a_{m,n}(j)=\int _{a'}^{b'}\rho (x)x^{m}\phi _{j}(x)\phi _{j+m-n}(x){\text {d}}x,\quad n=0,\ 1,\ 2,\ \ldots ,\ j+m. \end{aligned}$$
(60)

Now, applying the orthogonality properties of \(\phi _{n}\) for \(n =2m+1,\ \ldots ,\ j + m\), we obtain

$$\begin{aligned} a_{m,n}(j)=0,\quad n =2m+1,\ \ldots ,\ j+m,\quad j > m, \end{aligned}$$

and by noting that \(\phi _{-r}(x)=0\) for \(r>0\), we get

$$\begin{aligned} \phi _{j+m-n}=0,\quad n =j+m+1,\ \ldots ,\ 2m,\quad j<m, \end{aligned}$$

and accordingly, Eq. (59) takes the form of (58), which completes the proof of Lemma 1. \(\square \)

Corollary 4

If the classical orthogonal polynomials \(\phi _{j}(x)\) satisfy a recurrence relation of the type

$$\begin{aligned} x\phi _{j}(x)=\alpha _{j}\phi _{j+1}(x)+\gamma _{j}\phi _{j-1}(x),\quad j=0,\ 1,\ 2,\ \ldots ,\ \phi _{-1}\equiv 0,\quad \phi _{0}\equiv 1, \end{aligned}$$
(61)

then

$$\begin{aligned} x^{m}\phi _{j}(x)=\sum _{n=0}^{m}a_{m,2n}(j)\phi _{j+m-2n}(x). \end{aligned}$$
(62)

Proof

Using recurrence relation (59) and putting \(a_{11}(j) = 0\), then it is not difficult to show that \(a_{m,n}(j)=0\), for n odd, and accordingly formula (58) takes the form (62). \(\square \)

The explicit expressions of (58) when \(\{\phi _{n}(x)\}\) is one of the classical orthogonal polynomials (Hermite, generalized Laguerre, Jacobi, Bessel) are given in the following theorem.

Theorem 8

  1. (i)

    For Hermite polynomials [12]

    $$\begin{aligned} x^{m}H_{j}(x)=\sum _{n=0}^{m}a_{m,2n}(j)H_{j+m-2n}(x),\quad m,\ n\ge 0, \end{aligned}$$
    (63)

    where

    $$\begin{aligned} a_{m,2n}(j)&= \frac{2^{j-m}m!j!}{(j+m-2n)!}\sum \limits _{k=\max (0,j-2n)}^{\min (j+m-2n,j)}\left( \begin{array}{*{20}c} j+m-2n \\ k\end{array}\right) \nonumber \\&\frac{1}{2^{k}(j-k)!(n+k-j)!}. \end{aligned}$$
    (64)
  2. (ii)

    For generalized Laguerre polynomials [11]

    $$\begin{aligned} x^{m}L_{j}^{\alpha }(x)=\sum _{n=0}^{2m}a_{m,n}(j)L_{j+m-n}^{\alpha }(x),\quad m,\ n\ge 0, \end{aligned}$$
    (65)

    where

    $$\begin{aligned} \begin{aligned} a_{m,n}(j)&=\frac{(-1)^{m-n}(m!)^{2}}{\Gamma (j+m-n+\alpha +1)}\\&\quad \times \sum _{k=\max (0,j-n)}^{\min (j+m-n,j)}\left( \begin{array}{*{20}c} j+m-n \\ k\end{array}\right) \frac{\Gamma (m+k+\alpha +1)}{(j-k)!(n-j+k)!(m-j+k)!}. \end{aligned} \end{aligned}$$
    (66)
  3. (iii)

    For Jacobi polynomials [10, 28]

    $$\begin{aligned} x^{m}P_{j}^{\alpha ,\beta }(x)=\sum _{n=0}^{2m}a_{m,n}(j)P_{j+m-n}^{\alpha ,\beta }(x), \end{aligned}$$
    (67)

    where

    $$\begin{aligned}&a_{m,n}(j)=\frac{(-1)^{n}2^{j+m-n}m!(2j+2m-2n+\lambda )(j+\lambda )_{m-n}}{(j+\alpha +1)_{m-n}(j+\beta +1)_{m-n}}\nonumber \\&\quad \times \sum _{k=\max (0,j-n)}^{\min (j+m-n,j)}\frac{\left( {\begin{array}{c}j+m-n\\ k\end{array}}\right) \Gamma (j+k+\lambda )}{2^{k}(n-j+k)!\Gamma (3j+2m-2n-k+\lambda +1)}\nonumber \\&\quad \times \sum _{\ell =0}^{j-k}\frac{(-1)^{\ell }\Gamma (2j+m-n-k-\ell +\alpha +1)\Gamma (j+m+\ell -n+\beta +1)}{\ell !(j-k-\ell )!\Gamma (j-\ell +\alpha +1)\Gamma (k+\ell +\beta +1)}\nonumber \\&\quad \times _{2}F_{1}\left[ \left. { \begin{array}{c} j-n-k,j+m-n+\beta +\ell +1\\ 3j+2m-2n-k+\lambda +1 \\ \end{array} } \right| 2 \right] ,\quad \lambda =\alpha +\beta +1. \end{aligned}$$
    (68)
  4. (iv)

    For Bessel polynomials [13]

    $$\begin{aligned} x^{m}Y_{j}^{(\alpha )}(x)=\sum _{n=0}^{2m}a_{m,n}(j)Y_{j+m-n}^{(\alpha )}(x),\quad m\ge 0, \ j\ge 0, \end{aligned}$$
    (69)

    where

    $$\begin{aligned} \begin{aligned} a_{m,n}(j)&=\frac{(-1)^{j-n}2^{m}m!j!(2j+2m-2n+\alpha +1)\Gamma (j+m-n+\alpha +1)}{(j+m-n)!(2m-n)!\Gamma (j+\alpha +1)\Gamma (2j+2m-n+\alpha +2)}\\&\quad \times \sum _{k=\max (0,j-n)}^{\min (j+m-n,j)}\left( \begin{array}{*{20}c} j+m-n \\ k\end{array}\right) \\&\quad \times \frac{(-1)^{k}\Gamma (j+k+\alpha +1)\Gamma (j+2m-n-k+1)}{(j-k)!(n+k-j)!}.\\ \end{aligned} \end{aligned}$$
    (70)

Note 2

Doha [11, 12, 28] and Doha and Ahmed [13] proved that the explicit expressions of (64), (66), (68) and (70), when \(\{\phi (x)\}\) is one of the classical orthogonal polynomials (Hermite, generalized Laguerre, Jacobi, Bessel), respectively, satisfy the recurrence relation

$$\begin{aligned} \begin{aligned} a_{m,n}(j)=&\alpha _{j+m-n-1}a_{m-1,n}(j)+\beta _{j+m-n}a_{m-1,n-1}(j)+\gamma _{j+m-n+1}a_{m-1,n-2}(j),\\&\quad n=0,\ 1,\ \ldots ,2m, \end{aligned} \end{aligned}$$
(71)

with \(a_{m-1,-\ell }(j)=0,\)       \(\forall \ell >0,\)      \(a_{0,0}(j)=1\),       \(a_{m-1,r}(j)=0,\)      \(r=2m-1,\ 2m.\)

6 The Expansion Coefficients of the Moments of a General-Order Derivative of an Infinitely Differentiable Function

In this section, we state and prove a theorem which relates the expansion coefficients of \(x^{\ell }f^{(p)}\) in terms of \(a_{i}^{(p)}\).

Theorem 9

Assume that f(x), \(f^{(p)}(x)\) and \(x^\ell \phi _{j}(x)\) have the expansions (36), (37) and (58), respectively, and assume also that

$$\begin{aligned} x^{\ell }\left( \sum _{i=0}^{\infty }a_{i}^{(p)}\phi _{i}(x)\right) =\sum _{i=0}^{\infty }b_{i}^{p,\ell }\phi _{i}(x)=I^{p,\ell }, \end{aligned}$$
(72)

then the expansion coefficients \(b_{i}^{p,\ell }\) are given by

$$\begin{aligned} \begin{aligned}&\sum \limits _{k=0}^{\ell -1}a_{\ell ,k+\ell -i}(k)a_{k}^{(p)}+\sum \limits _{k=0}^{i}a_{\ell ,k+2\ell -i}(k+\ell )a_{k+\ell }^{(p)},\quad \quad 0\le i\le \ell ,\\&\sum \limits _{k=i-\ell }^{\ell -1}a_{\ell ,k+\ell -i}(k)a_{k}^{(p)}+\sum \limits _{k=0}^{i}a_{\ell ,k+2\ell -i}(k+\ell )a_{k+\ell }^{(p)},\quad \ell +1\le i\le 2\ell -1,\\&\sum \limits _{k=i-2\ell }^{i}a_{\ell ,k+2\ell -i}(k+\ell )a_{k+\ell }^{(p)},\quad \quad \quad \quad \quad \quad i\ge 2\ell .\\ \end{aligned} \end{aligned}$$
(73)

Proof

Equations (58) and (72) give

$$\begin{aligned} I^{p,\ell }=\sum \limits _{k=0}^{\infty }a_{k}^{(p)}\sum \limits _{j=0}^{2\ell }a_{\ell ,j}(k)\phi _{k+\ell -j}(x). \end{aligned}$$
(74)

By letting \(i=k+\ell -j\), then (74) may be written in the form

$$\begin{aligned} \begin{aligned} I^{p,\ell }&=\sum \limits _{k=0}^{\ell -1}a_{k}^{(p)}\sum \limits _{i=k-\ell }^{k+\ell }a_{\ell ,k+\ell -i}(k)\phi _{i}(x) +\sum \limits _{k=\ell }^{\infty }a_{k}^{(p)}\sum \limits _{i=k-\ell }^{k+\ell }a_{\ell ,k+\ell -i}(k)\phi _{i}(x)\\&=\sum \limits _{1}+\sum \limits _{2}, \end{aligned} \end{aligned}$$
(75)

where

$$\begin{aligned} \sum \limits _{1}= & {} \sum \limits _{k=0}^{\ell -1}a_{k}^{(p)}\sum \limits _{i=k-\ell }^{k+\ell }a_{\ell ,k+\ell -i}(k)\phi _{i}(x),\\ \sum \limits _{2}= & {} \sum \limits _{k=\ell }^{\infty }a_{k}^{(p)}\sum \limits _{i=k-\ell }^{k+\ell }a_{\ell ,k+\ell -i}(k)\phi _{i}(x). \end{aligned}$$

By noting that \(\phi _{-i}(x)=0\), for \(i\ge 1\), then it can be easily shown that

$$\begin{aligned} \begin{aligned} \sum \limits _{1}&=\sum \limits _{k=0}^{\ell -1}a_{k}^{(p)}\sum \limits _{i=0}^{k+\ell }a_{\ell ,k+\ell -i}(k)\phi _{i}(x)\\&=\sum \limits _{i=0}^{\ell }\sum \limits _{k=0}^{\ell -1}a_{k}^{(p)}a_{\ell ,k+\ell -i}(k) \phi _{i}(x)+\sum \limits _{i=\ell +1}^{2\ell -1}\sum \limits _{k=i-\ell }^{\ell -1}a_{k}^{(p)}a_{\ell ,k+\ell -i}(k)\phi _{i}(x), \end{aligned} \end{aligned}$$

hence

$$\begin{aligned} \sum \limits _{1}=\sum \limits _{i=0}^{2\ell -1}\sum \limits _{k=\max (0,i-\ell )}^{\ell -1}a_{k}^{(p)}\ a_{\ell ,k+\ell -i}(k)\phi _{i}(x). \end{aligned}$$
(76)

If when considering \(\sum \limits _{2}\), one takes \(k+\ell \) instead of k, then it is not difficult to show that

$$\begin{aligned} \sum \limits _{2}=\sum \limits _{i=0}^{\infty }\sum \limits _{k=\max (0,i-2\ell )}^{i}a_{k+\ell }^{(p)}\ a_{\ell ,k+2\ell -i}(k+\ell )\phi _{i}(x). \end{aligned}$$
(77)

Substitution of (76) and (77) into (75) gives the required results of (73) and completes the proof of the theorem. \(\square \)

7 Connection Coefficients Between Different Classical Orthogonal Polynomial Systems

In this section, we consider the problem of determining the connection coefficients between different orthogonal polynomial systems. An interesting question is how to transform the Fourier coefficients of a given polynomial corresponding to an assigned orthogonal basis, into the coefficients of another basis orthogonal with respect to a different weight function. The aim is to determine the so-called connection coefficients of the expansion of any element of the first basis in terms of the elements of the second basis.

Suppose V is a vector space of all polynomials over the real or complex numbers and \(V_m\) is the subspace of polynomials of degree less or equal to m. Suppose \(p_0(x), p_1(x), p_2(x),\ldots \) is a sequence of polynomials such that \(p_n(x)\) is of exact degree n; let \(q_0(x), q_1(x), q_2(x),\ldots \) be another such sequence. Clearly, these sequences form a basis for V. It is also evident that \(p_0(x), p_1(x), \ldots , p_m(x)\) and \(q_0(x), q_1(x),\ldots , q_m(x)\) give two bases for \(V_m\). While working with finite-dimensional vector spaces, it is often necessary to find the matrix that transforms a basis of a given space to another basis. This means that one is interested in the connection coefficients \(a_i(n)\) that satisfy

$$\begin{aligned} \begin{aligned} \psi _n({\bar{a}}x+{\bar{b}})=\sum \limits _{i=0}^{n}a_i(n)\phi _i(x), \end{aligned} \end{aligned}$$
(78)

where \({\bar{a}}\) and \({\bar{b}}\) are constants.

The connection coefficients between many of the classical orthogonal polynomial systems have been determined by different kinds of methods, see e.g., [36,37,38]. The aim of this section is to describe a simple procedure (based on the results of Theorem 9) to find recurrence relations between the coefficients \(a_i(n)\) when \(p_i(x)\) and \(q_i(x)\) belong to the class of classical orthogonal polynomials. This gives an alternative and different way to be compared to the approaches of Askey and Gasper [39], Ronveaux et al. [40, 41], Area et al. [16], Koepf and Schmersau [34], Lewanowicz [19, 20, 42], Lewanowicz et al. [17], and S\(\acute{a}\)nchez-Ruiz and Dehesa [35].

The differential equation satisfied by \(\psi _n({\bar{a}}x+{\bar{b}})\) for the cases of Hermite, generalized Laguerre, Jacobi and Bessel polynomials has the form

$$\begin{aligned}{}[\sigma ({\bar{a}}x+{\bar{b}})D^2+{\bar{a}}\tau ({\bar{a}}x+{\bar{b}})D+{\bar{a}}^2\lambda _n]y(x)=0, \end{aligned}$$
(79)

which may be written in the form

$$\begin{aligned}{}[(b_2 x^2 + b_1x + b_0)D^2+ (c_1x + c_0)D+\mu ]y(x)=0, \end{aligned}$$
(80)

where \(b_2 = a\ {\bar{a}}^2,\ b_1 = 2a {\bar{a}}{\bar{b}}+{\bar{a}}b,\ b_0 = a{\bar{b}}^2+b {\bar{b}}+c,\ c_1 = d{\bar{a}},\ c_0 ={\bar{a}}(d{\bar{b}}+e)\) and \(\mu = {\bar{a}}^2\lambda _n\).

By substituting (78) and by virtue of formulae (72), Eq. (79) takes the form

$$\begin{aligned} \begin{aligned} b_2b^{2,2}_i + b_1b^{2,1}_i + b_0b^{2,0}_i + c_1b^{1,1}_i + c_0b^{1,0}_i +\mu b^{0,0}_i = 0, \end{aligned} \end{aligned}$$

and by making use of (71) and (73), we obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{m=0}^{2}\sum \limits _{k=-m}^{m}\gamma ^{(m)}_k(i)a^{(m)}_{i+k}=0, \end{aligned}\quad i\ge 0, \end{aligned}$$
(81)

which is of order 4, where

$$\begin{aligned} \begin{aligned}&\gamma ^{(0)}_0 (i) = \lambda ,\ \gamma ^{(1)}_ {-1}(i) = c_1\alpha _{i-1},\ \gamma ^{(1)}_0(i) = c_0 + c_1\beta _i,\ \gamma ^{(1)}_1(i) = c_1\gamma _{i+1},\\&\gamma ^{(2)}_{-2}(i) = b_2\alpha _{i-2}\alpha _{i-1},\\&\gamma ^{(2)}_{-1}(i) = \alpha _{i-1}[b_1 + b_2(\beta _{i-1} + \beta _i)],\\&\gamma ^{(2)}_0(i) = b_0 + b_1\beta _i + b_2(\beta ^2_i + \alpha _{i-1}\gamma _i + \alpha _i\gamma _{i+1}),\\&\gamma ^{(2)}_1 (i) = \gamma _{i+1}[b_1 + b_2(\beta _i + \beta _{i+1})],\ \gamma ^{(2)}_2(i) = b_2\gamma _{i+1}\gamma _{i+2}. \end{aligned} \end{aligned}$$

Following the same procedure as in Example 1 of Sect. 8.1, we get recurrence relations satisfied by \(a_i(n)\) when \(\{\phi _i(x)\}\) is one of the classical families of Hermite, generalized Laguerre, Jacobi and Bessel.

7.1 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-Hermite Connection Problem

In this problem

$$\begin{aligned} \begin{aligned} \psi _n({\bar{a}}x+{\bar{b}})=\sum \limits _{i=0}^{n}a_i(n)H_i(x), \end{aligned} \end{aligned}$$
(82)

the coefficients \(a_i(n)\) satisfy the recurrence relation

$$\begin{aligned} \begin{aligned}&\delta _{i0} a_i(n) + \delta _{i1} a_{i+1}(n) + \delta _{i2} a_{i+2}(n) + \delta _{i3}a_{i+3}(n) + \delta _{i4} a_{i+4}(n) = 0,\\&\quad i = n-1, n-2,\ldots , 0, \end{aligned} \end{aligned}$$
(83)

which is of order 4, where

$$\begin{aligned} \delta _{i0}&= (\mu + b_2 i(i - 1) + c_1 i),\ \delta _{i1} = 2(i + 1)(b_1i + c_0),\\ \delta _{i2}&= 2(i + 1)_2(2b_0 + b_2(2i + 1) + c_1),\\ \delta _{i3}&= 4b_1(i + 1)_3,\ \delta _{i4} = 4b_2(i + 1)_4. \end{aligned}$$

It is to be noted here that the fourth-order recurrence relation (83) generates the coefficients \(a_i(n)\) by recurring backwards with the initial conditions given by \(a_{n+s}(n)=0,\ s = 1, 2, 3,\) and \(a_n(n) = 2^{-n} \times \) Leading coefficient of \(\psi _n({\bar{a}}x+{\bar{b}})\). Table 1 summarizes the \(\psi _n({\bar{a}}x+{\bar{b}})\)-Hermite connection coefficients.

Table 1 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-Hermite connection coefficients

7.2 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-Generalized Laguerre Connection Problem

In this problem

$$\begin{aligned} \begin{aligned} \psi _n({\bar{a}}x+{\bar{b}})=\sum \limits _{i=0}^{n}a_i(n)L^{(\alpha )}_i(x), \end{aligned} \end{aligned}$$
(84)

the coefficients \(a_i(n)\) satisfy the recurrence relation

$$\begin{aligned} \begin{aligned} \delta _{i0} a_i(n)&+ \delta _{i1} a_{i+1}(n) + \delta _{i2} a_{i+2}(n) + \delta _{i3}a_{i+3}(n) + \delta _{i4} a_{i+4}(n) = 0,\\&\quad i = n-1, n-2,\ldots , 0, \end{aligned} \end{aligned}$$
(85)

where

$$\begin{aligned} \delta _{i0}= & {} (\mu + b_2 i(i - 1) + c_1 i),\ \delta _{i1} = -(b_1i + 2b_2 (2i + \alpha + 2)i \\&\quad +c_1(3i + \alpha + 3) - 2\mu + c_0),\\ \delta _{i2}= & {} b_1(3 + 2i + \alpha ) \\&\quad +b_2(6(i + 1)_2 + (6 i + \alpha + 7)\alpha ) + c_1(3i + 2\alpha + 6) + b_0 + c_0 + \mu ,\\ \delta _{i3}= & {} ( 2b_2(2i + \alpha + 4) + b_1 + c_1)(i + \alpha + 3),\ \delta _{i4} = b_2 (i + \alpha + 3)_2. \end{aligned}$$

with \(a_{n+s}(n)=0,\ s = 1, 2, 3,\) and \(a_n(n) = (-1)^nn! \times \) Leading coefficient of \(\psi _n({\bar{a}}x+{\bar{b}})\). Table 2 summarizes the \(\psi _n({\bar{a}}x+{\bar{b}})\)-generalized Laguerre connection coefficients.

Table 2 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-generalized Laguerre connection coefficients

7.3 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-Jacobi Connection Problem

In this problem

$$\begin{aligned} \begin{aligned} \psi _n({\bar{a}}x+{\bar{b}})=\sum \limits _{i=0}^{n}a_i(n)P^{(\alpha ,\beta )}_i(x), \end{aligned} \end{aligned}$$
(86)

the coefficients \(a_i(n)\) satisfy the recurrence relation

$$\begin{aligned} \begin{aligned}&\delta _{i0} a_i(n) + \delta _{i1} a_{i+1}(n) + \delta _{i2} a_{i+2}(n) + \delta _{i3}a_{i+3}(n) + \delta _{i4} a_{i+4}(n) = 0,\\&\quad i = n-1, n-2,\ldots , 0, \end{aligned} \end{aligned}$$
(87)

where

$$\begin{aligned} \delta _{i0}= & {} [(2i + \lambda )_4]^{-1}(i + \lambda )_4(\mu + b_2(i - 1)i + c_1i),\\ \delta _{i1}= & {} [2(2i + \lambda + 1)_3(2i + \lambda + 5)]^{-1}(i + \lambda + 1)_3 \\&\quad \times [(\alpha - \beta )(4\mu - 2b_2 (\lambda + 3)i + c_1(2i - \lambda - 1)) \\&\quad + (b_1 i + c_0)(2i + \lambda + 1)(2i + \lambda + 5)], \\ \delta _{i2}= & {} \frac{1}{4}(i + \lambda + 1)_3\{b_0 + [(2i + \lambda + 2)_3(2i + \lambda + 5)_2]^{-1}\\&\quad \times [(-4\mu + 2c_1(\lambda + 2))(2(i + 2)(i + \lambda + 2) + \alpha (1 - \alpha ) + \beta (1 - \beta ) + 4\alpha \beta )\\&\quad + b_2 (8i^3(i + 2(\lambda + 4)) + (\lambda + 2)_2(6 + (\alpha + \beta ) + (\alpha - \beta )^2)\\&\quad + 4i(\lambda + 4)(6\beta + 2\alpha (\beta + 3) + 15) + 4i^2(65 + 2\alpha ^2 + 2\beta (\beta + 13) \\&\quad + \alpha (26 + 6\beta ))) \\&\quad + (\alpha - \beta )((2i + \lambda + 2)(2i + \lambda + 5)(2c_0 - b_1(\lambda + 3))\},\\ \delta _{i3}= & {} [2(2i + \lambda + 3)(2i + \lambda + 5)_3]^{-1}(i + \alpha + 3)(i + \beta + 3)(i + \lambda + 3) \\&\quad \times [b_1 (i + \lambda + 4)(2i + \lambda + 3)(2i + \lambda + 7) - c_0(2i + \lambda + 5)^2 \\&\quad + 4(c_0 + (\beta - \alpha )\mu ) \\&\quad + (\alpha - \beta )(c_1 (2i + 3(\lambda + 3)) - 2b_2 (\lambda + 3)(i + \lambda + 4))],\\ \delta _{i4}= & {} (i+\alpha +3)_2(i+\beta +3)_2((i+\lambda +4)(b_2(i+\lambda +5)-c_1)+\mu ) \\&\quad \times [(2i+\lambda +5)_4]^{-1},\\ \lambda= & {} \alpha +\beta +1, \end{aligned}$$

with \(a_{n+s}(n)=0,\ s = 1, 2, 3,\) and \(a_n(n) = \frac{2^nn!}{(n+\lambda )_n} \times \) Leading coefficient of \(\psi _n({\bar{a}}x+{\bar{b}})\). Table 3 summarizes the \(\psi _n({\bar{a}}x+{\bar{b}})\)-Jacobi connection coefficients.

Table 3 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-Jacobi connection coefficients

7.4 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-Bessel Connection Problem

In this problem

$$\begin{aligned} \begin{aligned} \psi _n({\bar{a}}x+{\bar{b}})=\sum \limits _{i=0}^{n}a_i(n)Y^{(\alpha )}_i(x), \end{aligned} \end{aligned}$$
(88)

the coefficients \(a_i(n)\) satisfy the recurrence relation

$$\begin{aligned} \begin{aligned}&\delta _{i0} a_i(n) + \delta _{i1} a_{i+1}(n) + \delta _{i2} a_{i+2}(n) + \delta _{i3}a_{i+3}(n) + \delta _{i4} a_{i+4}(n) = 0,\\&\quad i = n-1, n-2,\ldots , 0, \end{aligned} \end{aligned}$$
(89)

where

$$\begin{aligned} \delta _{i0}= & {} [(2i + \alpha + 1)_4]^{-1}(i + \alpha + 1)_4(\mu + b_2(i - 1)i + c_1i),\\ \delta _{i1}= & {} [2(2i + \alpha + 2)_3(2i + \alpha + 6)]^{-1}(i + \alpha + 2)_3(i + 1)\\&\quad \times [8\mu - 4b_2 i(\alpha + 4) + 2c_1(2i - \alpha - 2) \\&\quad + (b_1 i + c_0)(2i + \alpha + 2)(2i + \alpha + 6)], \\ \delta _{i2}= & {} \frac{1}{4}(i + \alpha + 3)_2(i + 1)_2\{b_0 - 2[(2i + \alpha + 3)_3(2i + \alpha + 6)_2]^{-1} \\&\quad \times [-12\mu + ((\alpha + 4)b_1 - 2c_0)(2i + \alpha + 3)(2i + \alpha + 7) + 6(\alpha + 3)c_1 \\&\quad + 2(2i^2 - (\alpha + 3)_2 + 2i(\alpha + 5))b_2]\},\\ \delta _{i3}= & {} -[2(2i + \alpha + 4)(2i + \alpha + 6)_3]^{-1}(i + \alpha + 4)(i + 1)_3 \\&\quad \times [b_1 (i + \alpha + 5)(2i + \alpha + 4)(2i + \alpha + 8) - c_0(2i + \alpha + 4)(2i + \alpha + 8)\\&\quad - 8(\mu - 3c_1) + 2c_1 (2i + 3\alpha ) - 4b_2 (\alpha + 4)(i + \alpha + 5)],\\ \delta _{i4}= & {} [(2i + \alpha + 6)_4]^{-1}[(i + \alpha + 5)(b_2(i + \alpha + 6) - c_1) + \mu ], \end{aligned}$$

with \(a_{n+s}(n)=0,\ s = 1, 2, 3,\) and \(a_n(n) = \frac{2^n}{(n+\alpha +1)_n} \times \) Leading coefficient of \(\psi _n({\bar{a}}x+{\bar{b}})\). Table 4 summarizes the \(\psi _n({\bar{a}}x+{\bar{b}})\)-Bessel connection coefficients.

Table 4 The \(\psi _n({\bar{a}}x+{\bar{b}})\)-Bessel connection coefficients

8 Applications

8.1 Ordinary Differential Equations with Varying Coefficients

Let f(x) has the expansion (36), and assume that it satisfies the linear nonhomogeneous differential equation of order m

$$\begin{aligned} \sum \limits _{i=0}^{m}p_i(x)f^{(i)}(x)=p(x), \end{aligned}$$
(90)

where \(p_0,p_1,\ldots ,(p_m \ne 0)\) are polynomials in x, and the expansion coefficients of the function p(x) in terms of \(\phi _n(x)\) are known, then formulae (38), (58) and (73), enable us to construct in view of Eq. (90) the linear recurrence relation of order r,

$$\begin{aligned} \sum \limits _{j=0}^{r}\alpha _j(k)a_{k+j}=\beta (k),\quad k\ge 0, \end{aligned}$$

where \(\alpha _0,\alpha _1,\ldots ,\alpha _r\ (\alpha _0 \ne 0, \alpha _r \ne 0)\) are polynomials of the variable k.

An example dealing with nonhomogeneous differential equation is considered to clarify application of the results obtained.

Example 1

Consider the nonhomogeneous differential equation

$$\begin{aligned} \begin{aligned} 2xf''(x)+(1 + 4x)f'(x)+(1 + 2x)f(x) = e^{-x},\quad f(0)=0,\ f'(0)=1. \end{aligned} \end{aligned}$$
(91)

If f(x) and \(e^{-x}\) are expanded in terms of Hermite polynomials, \(H_i(x)\), in the forms

$$\begin{aligned} f(x)\sum \limits _{i=0}^{\infty }a_iH_i(x), \end{aligned}$$

and

$$\begin{aligned} e^{-x}=\sum \limits _{i=0}^{\infty }\frac{e^{\frac{1}{4}}(-1)^i}{2^ii!}H_i(x), \end{aligned}$$

then by virtue of formulae (72), Eq. (91) takes the form

$$\begin{aligned} 2b^{2,1}_i + 4 b^{1,1}_i + b^{1,0}_i + 2 b^{0,1}_i + b^{0,0}_i =\frac{e^{\frac{1}{4}}(-1)^i}{2^ii!},\quad i\ge 0. \end{aligned}$$

By making use of (63) and (73) for the Hermite case, we obtain

$$\begin{aligned} \begin{aligned}&a_{i-1} + a_i + 2(1 + i) a_{i+1} + 2a^{(1)}_i-1 + a^{(1)}_i + 4(i + 1)a^{(1)}_{i+1}\\&\quad +a^{(2)}_{i-1} + 2(i + 1)a^{(2)}_{i+1} = \frac{e^{\frac{1}{4}}(-1)^{i}}{2^{i}i!}, \quad i\ge 0. \end{aligned} \end{aligned}$$
(92)

Using formula (48) with (92) yields

$$\begin{aligned} \begin{aligned}&a_i + (4 i + 5) a_{i+1}+4(2 + i)^2 a_{i+2} + 8(2 + i)(3 + i) a_{i+3}\\&\quad +8(2 + i)(3 + i) (4 + i)a_{i+4} = \frac{e^{\frac{1}{4}}(-1)^{i+1}}{2^{i+1}(i+1)!}, \quad i\ge 0. \end{aligned} \end{aligned}$$
(93)

The complete solution for Example 1 may be obtained by solving the recurrence relation (93). What is worthy noting that the analytical solution for this recurrence relation is given explicitly by

$$\begin{aligned} \begin{aligned} a_i=\frac{e^{\frac{1}{4}}(-1)^{i+1}}{2^{i+1}(i)!}(2i+1),\quad i\ge 0. \end{aligned} \end{aligned}$$
(94)

Analytical solution like (94), is not generally easy to obtain. The alternative approach for solving (93) can be obtained using the modification of Miller’s recurrence algorithm, see [43, 44].

8.2 The Integrated System of Ordinary Differential Equations with Polynomial Coefficients

Let f(x) has the expansion (36), and assume that it satisfies the linear nonhomogeneous differential equation (90). The integration of Eq. (90) m times with respect to x, gives

$$\begin{aligned} \begin{aligned} \sum \limits _{i=0}^{m}D^{-m}[p_i(x)f^{(i)}(x)]=D^{-m}p(x)+\sum \limits _{i=0}^{m-1}e_i\phi _i(x), \end{aligned} \end{aligned}$$
(95)

where \(e_0, \ e_1,\ \ldots , \ e_{m-1}\) are constants of integration. It can be easily shown that

$$\begin{aligned} \begin{aligned} D^{-m}[p_i(x)f^{(i)}(x)]=\sum \limits _{j=0}^{i}(-1)^i\left( {\begin{array}{c}i\\ j\end{array}}\right) D^{-(j+m-i)}[p^{(j)}_if(x)], \end{aligned}\quad i=0,1,\ldots ,m. \end{aligned}$$
(96)

Substitution of (96) into (95) and collecting similar terms containing the same number of repeated integrations yield

$$\begin{aligned} \begin{aligned} \sum \limits _{i=0}^{m}\sum \limits _{j=i}^{m}(-1)^{j-i}\left( {\begin{array}{c}j\\ i\end{array}}\right) D^{-(m-i)}[p^{(j-i)}_jf(x)] =D^{-m}p(x)+\sum \limits _{i=0}^{m-1}e_i\phi _i(x). \end{aligned} \end{aligned}$$
(97)

Equation (97) may be written in the form

$$\begin{aligned} \begin{aligned} \sum \limits _{i=0}^{m}D^{-(m-i)}[Q_i(x)f(x)] =D^{-m}p(x)+\sum \limits _{i=0}^{m-1}e_i\phi _i(x), \end{aligned} \end{aligned}$$
(98)

where

$$\begin{aligned} \begin{aligned} Q_i(x)=\sum \limits _{j=i}^{m}(-1)^{j-i}\left( {\begin{array}{c}j\\ i\end{array}}\right) p^{(j-i)}_j, \end{aligned}\quad i\ge 0. \end{aligned}$$

If the expansion (36) is substituted into (98), and a linearization of \(Q_i(x)\ \phi _n(x)\) as a linear combination of suitable \(\phi _n(x)\) is made, and if \(D^{-m}p(x)\) is expanded into a series of \(\phi _n(x)\), then making use of (20) enables us to obtain a recurrence relation for the expansion coefficients \(a_n\) of the form

$$\begin{aligned} \begin{aligned} \sum \limits _{j=0}^{s}{\tilde{\alpha }}_j(k)a_{k+j}={\tilde{\beta }}(k), \end{aligned} \quad k\ge 0. \end{aligned}$$
(99)

where \({\tilde{\alpha }}_0,{\tilde{\alpha }}_1,\ldots ,{\tilde{\alpha }}_r \ ({\tilde{\alpha }}_0 \ne 0, {\tilde{\alpha }}_s \ne 0)\) are polynomials of the variable k.