1 Introduction

In a companion paper (see [4]), we give new tractable sufficient conditions for the monotonicity with respect to a real parameter of zeros of classical orthogonal polynomials (COP) on linear, quadratic, q-linear and q-quadratic grids (see, e.g., [2, 3]). In particular, we analyze in a simple and unified way the monotonicity of the zeros of Hahn, Charlier, Krawtchouk, Meixner, Racah, dual Hahn, q-Meixner, quantum q-Krawtchouk, q-Krawtchouk, affine q-Krawtchouk, q-Charlier, Al-Salam-Carlitz, q-Hahn, little q-Jacobi, little q-Laguerre/Wall, q-Bessel, q-Racah and dual q-Hahn polynomials. However, these results do not allow us to compare the zeros of the elements of two different sequences of COP. For this purpose we need a “comparison theorem” of Sturm type for difference equations. In [12, Corollary 1], Lun and Rafaeli used a comparison theorem of Sturm type to obtain inequalities between the zeros of solutions of two differential equations. As we will see, this result can be extended to difference equations and be used to obtain relations between the generalized zeros of two COP.

For the linear grid, there is a wide variety of results for a Sturm type comparison theorem, e.g., [1, 6, 8, 18]. In [7], Gishe and Toókos prove a Sturm type comparison theorem for q-difference equations and study the convexity of the zeros of some q-orthogonal polynomials. However, as far as we know, [12, Corollary 1] has not yet been considered for the linear grid nor the general case. The fundamental purpose of this note is to establish the first results in this direction. To achieve this objective, as in [4], our starting point is the hypergeometric-type difference equation introduced by Nikiforov and Uvarov in [14, (5)] (see also [15, p. 127] and [13, p. 71]):

$$\begin{aligned}&\widetilde{a}(x(s))\dfrac{\Delta }{\Delta x(s-1/2)}\left( \frac{\nabla y(x(s))}{\nabla x(s)}\right) +\dfrac{\widetilde{b}(x(s))}{2}\left( \frac{\Delta y(x(s))}{\Delta x(s)}+\frac{\nabla y(x(s))}{\nabla x(s)}\right) \\&\quad +c\,y(x(s))=0 \end{aligned}$$

or, equivalently,

$$\begin{aligned} a(s)\frac{\Delta }{\Delta x(s-1/2)}\left( \frac{\nabla y(x(s))}{\nabla x(s)}\right) +b(s)\frac{\Delta y(x(s))}{\Delta x(s)}+c\,y(x(s))=0, \end{aligned}$$
(1.1)

where

$$\begin{aligned} a(s)=\widetilde{a}(x(s))-\frac{1}{2}\widetilde{b}(x(s))\Delta x(s-1/2),\qquad b(s)=\widetilde{b}(x(s)), \end{aligned}$$

x(s) defines a class of grids with, generally nonuniform, step \(\Delta x(s)=x(s+1)-x(s)\), \(\nabla x(s)=x(s)-x(s-1)\), \(\widetilde{a}(x(s))\) and \(\widetilde{b}(x(s))\) are polynomials of degree at most 2 and 1 in x, respectively, and c is a constant. In what follows, we assume that x is a real-valued function defined on an interval of the real line. For similar purposes, in [4, (2.1)], we rewrite (1.1) in the following useful way:

$$\begin{aligned} A(s)y(x(s-1))+B(s)y(x(s+1))+C(s)y(x(s))=0, \end{aligned}$$
(1.2)

where

$$\begin{aligned} A(s)= & {} \frac{a(s)}{\nabla x(s)\Delta x(s-1/2)},\nonumber \\ B(s)= & {} \frac{a(s)+b(s)\Delta x(s-1/2)}{\Delta x(s)\Delta x(s-1/2)},\nonumber \\ C(s)= & {} c-B(s)-A(s). \end{aligned}$$
(1.3)

For our purposes, we use another difference equation obtained from (1.2), as done by Porter in [16]. Fix \(\textrm{a} \in \mathbb {R}\) and \(N\in \{3,4,\dots \}\). Denote \(s_i=\textrm{a}+i\) \((i=0,1,\dots ,N-1)\), \(S=\{s_0,s_1,\dots ,s_{N-1}\}\) and \(S'=S\setminus \{s_0,s_{N-1}\}\). Assume \(A(s)B(s)\ne 0\) for each \(s\in S'\). Set \(y=u\, v\) on S, v being the new unknown function and u so that v satisfy a difference equation of the form

$$\begin{aligned} \Delta \nabla v(x(s))+\lambda (s)\, v(x(s))=0 \end{aligned}$$
(1.4)

on S. One can check that this can be obtained by the recurrence relation

$$\begin{aligned} A(s)u(x(s-1))=B(s)u(x(s+1)), \end{aligned}$$
(1.5)

which in turn leads to

$$\begin{aligned} u(x(s_k))={\left\{ \begin{array}{ll} \quad \quad u(x({a}))\displaystyle \prod \limits _{j=1}^{k/2}\frac{A(s_{2j-1})}{B(s_{2j-1})}, \ \ \ \ \ \ \qquad k \text{ even },\\ u(x({a}+1))\displaystyle \prod \limits _{j=1}^{(k-1)/2}\frac{A(s_{2j})}{B(s_{2j})}, \ \ \ \ \ \ \qquad k \text{ odd }, \end{array}\right. } \end{aligned}$$
(1.6)

with arbitrary initial condition \(u(x(\textrm{a}))u(x(\textrm{a}+1))\ne 0\). Hence, from (1.2), we obtain the difference equation

$$\begin{aligned} v(x(s+1))+v(x(s-1))+G(s)v(x(s))=0, \end{aligned}$$
(1.7)

where

$$\begin{aligned} G(s_k)={\left\{ \begin{array}{ll} \displaystyle \frac{u(x(\textrm{a}))}{u(x(\textrm{a}+1))}\frac{C(s_k)}{B(s_k)}\prod \limits _{j=1}^{k/2}\frac{A(s_{2j-1})B(s_{2j})}{A(s_{2j})B(s_{2j-1})}, \ \ \ \ \ \ \qquad k \text{ even },\\ \displaystyle \frac{u(x(\textrm{a}+1))}{u(x(\textrm{a}))}\frac{C(s_k)}{A(s_k)}\prod \limits _{j=1}^{(k-1)/2}\frac{A(s_{2j})B(s_{2j-1})}{A(s_{2j-1})B(s_{2j})},\qquad \quad k \text{ odd },\end{array}\right. } \end{aligned}$$
(1.8)

with the initial conditions that \(v(x(\textrm{a}))\ne 0\) is arbitrarily chosen and

$$\begin{aligned} v(x(\textrm{a}+1))=-\frac{C(\textrm{a})}{B(\textrm{a})}\frac{u(x(\textrm{a}))}{u(x(\textrm{a}+1))}v(x(\textrm{a})),\qquad B(\textrm{a})\ne 0. \end{aligned}$$

(Note that (1.7) can be transformed into (1.4) taking \(G(s)=\lambda (s)-2\).)

In [17, Sect. 1.8], a similar procedure is done for differential equations of the form

$$\begin{aligned} K(x)y''(x)+M(x)y'(x)+N(x)y(x)=0. \end{aligned}$$
(1.9)

By setting \(y(x)=u(x)v(x)\), v(x) being the new unknown function and u(x) can be determined so that

$$\begin{aligned} v''(x)+\lambda (x)v(x)=0, \end{aligned}$$
(1.10)

it is possible to show that, under certain conditions, y and v have the same zeros. In other words, to obtain information on the zeros of y, one can use (1.10) instead of (1.9). For difference equations, since we only know what happens on the discrete set of points S, we cannot readily conclude the same, i.e., that the zeros of a solution of (1.1) and (1.7) coincide. However, we will see in Sect. 2 that, under certain conditions, their generalized zeros coincide and, consequently, in Sect. 3, we use (1.7) to obtain information about the generalized zeros of a solution of (1.1). Finally, in Sect. 4, we use these results to compare the zeros of elements of two different sequences of COP.

2 Nodes and Generalized Zeros

From now on, we assume that x is a continuous strictly increasing function on an interval of the real line containing the discrete set of points S. To prove some preliminary results, the familiar notion of “node” used by Porter [16] (see also [6, p. 131]) will be very useful:

Definition 2.1

(Node of a function). Let v be a real function defined on S. Assume that v changes its sign on the interval \((x(s'-1),x(s')]\) \((s'\in S\setminus \{s_0\})\). The point of intersection of the x-axis with the line segment with endpoints \((x(s'-1),v(x(s'-1)))\) and \((x(s'),v(x(s')))\) is called a node of v (see Fig. 1).

Fig. 1
figure 1

The node (white point) between \(x(s'-1)\) and \(x(s')\)

We can relate the nodes of solutions of (1.1) and (1.7) in the following way:

Lemma 2.1

Let y be a solution of (1.1). Set \(y=uv\) for \(s\in S\), where u is given by (1.6). Assume that \(u(x(\textrm{a}))u(x(\textrm{a}+1))>0\) and \(A(s)B(s)>0\) on \(S'\). Then, y has a node on \((x(s'-1),x(s'))\) \((s'\in S\setminus \{s_0\})\) if and only v has a node on that interval. Moreover, \(y(x(s'))=0\) if and only if \(v(x(s'))=0\).

Proof

Follows immediately from (1.6). \(\square \)

We can also relate the zeros of a solution of (1.1) and the nodes of a solution of (1.7):

Proposition 2.1

Assume the hypotheses and notation of Lemma 2.1. Assume that there is at most one zero of y on \((x(s-1)),x(s))\) for each \(s\in S\setminus \{s_0\}\). Then, y has a zero on \((x(s'-1),x(s'))\) \((s'\in S\setminus \{s_0\})\) if and only v has a node on that interval. Moreover, \(y(x(s'))=0\) if and only if \(v(x(s'))=0\).

Proof

Clearly, if v has a node on \((x(s'-1),x(s'))\) for some \(s'\in S\setminus \{s_0\}\), then y has a zero on that interval. Now, assume that y has exactly one zero on \((x(s'-1),x(s'))\) for some \(s'\in S\setminus \{s_0\}\). Then, \(y(x(s'-1))y(x(s'))<0\), i.e., y has a node on \((x(s'-1),x(s'))\), and the result follows from Lemma 2.1. \(\square \)

To deal with a discrete analogue of Sturm’s separation theorem, Hartman (see [9]) introduced the notion of generalized zeros: either an actual zero or where the solution changes its sign (see also [5, Definition 7.8]):

Definition 2.2

(Generalized zero of a function). We say that a function f has a generalized zero at \(x(s')\) \((s'\in S\setminus \{s_0\})\) if either \(f(x(s'))=0\) or \(f(x(s'-1))f(x(s'))<0\).

Therefore, under the hypotheses of Proposition 2.1, the generalized zeros of a solution of (1.1) and (1.7) coincide.

Remark 2.1

Note that a generalized zero \(x(s')\) (\(s'\in S\)) and a zero \(x(z')\in (x(s'-1),x(s')]\) of a function satisfy the relation .

3 Comparison Theorem for Difference Equations

In this section, we consider equations of the form (1.7). The next result was proved by Porter (see [16]) for the linear grid \(x(s)=s\). Denote \(S_k=\{\textrm{a},\textrm{a}+1,\dots ,\textrm{a}+k-1\}\) for \(k\in \{2,3,\dots ,N\}\) and \(S_k'=S\setminus \{\textrm{a}\}\).

Lemma 3.1

Let \(k\in \{2,3,\dots ,N\}\). For each \(s\in S_k'\), let G(st) be a strictly decreasing function of a real parameter t varying in a nondegenerate interval of the real line. Assume that \(v(\cdot ; t)\) is a nonzero continuous function of t for each \(s\in S_k\) and satisfies

$$\begin{aligned} v(x(s+1);t)+v(x(s-1);t)+G(s;t)v(x(s);t)=0. \end{aligned}$$
(3.11)

Suppose also that \(v(x(\textrm{a}+1);t)/v(x(\textrm{a});t)\) is a strictly increasing function of t and \(v(x(\textrm{a});t)\ne 0\) for all t. Then the nodes of \(v(\cdot ;t)\) on \((x(\textrm{a}),x(\textrm{a}+k))\) are strictly increasing functions of t.

Proof

Define \(v_\epsilon (x(s);t)=v(x(s);t+\epsilon )\) for \(\epsilon >0\) sufficiently small. Hence,

$$\begin{aligned} v_\epsilon (x(s+1);t)+v_\epsilon (x(s-1);t)+G(s;t+\epsilon )v_\epsilon (x(s);t)=0. \end{aligned}$$
(3.12)

Multiplying (3.11) and (3.12) by \(v_\epsilon (x(s);t)\) and v(x(s); t), respectively, and subtracting the results, we get

$$\begin{aligned}&v(x(s);t)v_\epsilon (x(s+1);t)-v_\epsilon (x(s);t)v(x(s+1);t)\nonumber \\&\quad =(G(s;t)-G(s;t+\epsilon ))v(x(s);t)v_\epsilon (x(s);t)\nonumber \\&\qquad +v(x(s-1);t)v_\epsilon (x(s);t)-v_\epsilon (x(s-1);t)v(x(s);t). \end{aligned}$$
(3.13)

Applying recursively (3.13), we have

$$\begin{aligned}&v(x(s_j);t)v_\epsilon (x(s_j+1);t)-v_\epsilon (x(s_j);t)v(x(s_j+1);t)\nonumber \\&\quad =\sum \limits _{i=1}^{j}(G(s_i;t)-G(s_i;t+\epsilon ))v(x(s_i);t)v_\epsilon (x(s_i);t)\nonumber \\&\qquad +v(x(\textrm{a});t)v_\epsilon (x(\textrm{a});t)\left( \frac{v_\epsilon (x(\textrm{a}+1);t)}{v_\epsilon (x(\textrm{a});t)}-\frac{v(x(\textrm{a}+1);t)}{v(x(\textrm{a});t)}\right) , \end{aligned}$$
(3.14)

for each \(s_j\in S_k\). For sufficiently small \(\epsilon \), we have \(v(x(s);t)v_\epsilon (x(s);t)>0\). Thus, under our assumptions, the right-hand side of (3.14) is positive and, consequently,

$$\begin{aligned} v(x(s);t) v_\epsilon (x(s+1);t)-v_\epsilon (x(s);t)v(x(s+1);t)>0 \end{aligned}$$
(3.15)

on \(S_k\). Assume that \(v(\cdot ;t)\) has a node on \((x(s'),(x(s'+1))\) \((s'\in S_k)\). Hence \(\text {sgn}\, v(x(s');t)=-\text {sgn}\, v(x(s'+1);t)\). We leave it to the reader to verify that from (3.15), and making use of our assumptions, we can conclude that \(v(x(s'+1);t)/v(x(s');t)\) is a strictly increasing function of t. Now we consider the line segment with endpoints \((x(s'),v(x(s');t))\) and \((x(s'+1),v(x(s'+1);t))\), i.e.,

$$\begin{aligned} V(X)-v(x(s');t)=\frac{v(x(s'+1);t)-v(x(s');t)}{x(s'+1)-x(s')}(X-x(s')). \end{aligned}$$

If \(V(X')=0\), then

$$\begin{aligned} X'=\frac{x(s'+1)-x(s')}{1-\displaystyle \frac{v(x(s'+1);t)}{v(x(s');t)}}+x(s'). \end{aligned}$$

From (3.15), the function \(v(x(s'+1);t)/v(x(s');t)<0\) is strictly increasing of t. Hence, \(X'\) moves to the right when t increases. We reach the same conclusion easily if \(v(x(s');t)=0\) for some t, which concludes the proof. \(\square \)

Now, we prove a Sturm type comparison theorem for difference equations of the form (1.7). In [6, p.153], the author proves it for the linear grid \(x(s)=s\).

Theorem 3.1

(Sturm type comparison theorem for difference equations). Let \(v_1\) and \(v_2\) be nontrivial solutions on \(S_k\) (\(k\in \{2,\dots ,N\}\)) of

$$\begin{aligned} v_1(x(s+1))+v_1(x(s-1))+G_1(s)v_1(x(s))&=0,\end{aligned}$$
(3.16)
$$\begin{aligned} v_2(x(s+1))+v_2(x(s-1))+G_2(s)v_2(x(s))&=0, \end{aligned}$$
(3.17)

respectively. If \(G_2(s)<G_1(s)\) for all \(s\in S_k'\), \(v_1(x(\textrm{a}))v_2(x(\textrm{a}))>0\) and

$$\begin{aligned} v_1(x(\textrm{a}))v_2(x(\textrm{a}+1))-v_1(x(\textrm{a}+1))v_2(x(\textrm{a}))> 0, \end{aligned}$$
(3.18)

then \(v_1\) has at least the same number of nodes as \(v_2\) on \((x(\textrm{a}),x(\textrm{a}+k)]\).

Proof

Note that multiplying a solution of (3.16) or (3.17) by a positive constant does not affect its nodes nor (3.16)–(3.18). Hence, we may assume \(v_1(x(\textrm{a}))=v_2(x(\textrm{a}))=1\). Let \(t\in [0,1]\). Consider the difference equation on \(S_k\):

$$\begin{aligned} v(x(s+1);t)+v(x(s-1);t)+G(s;t)v(x(s);t)=0, \end{aligned}$$
(3.19)

where \(G(s;t)=t\;G_2(s)+(1-t)G_1(s)\), with initial conditions \(v(x(\textrm{a});t)=1\) for all \(t\in [0,1]\) and \(v(x(\textrm{a}+1))\) is such that it increases from \(v_1(x(\textrm{a}+1))\) to \(v_2(x(\textrm{a}+1))\) as t increases from 0 to 1. By (3.18) and these initial conditions for (3.19), we have that \(v(x(\textrm{a}+1);t)/v(x(\textrm{a});t)\) is an increasing function of \(t\in [0,1]\). Since \(G_2(s)<G_1(s)\) for each \(s\in S_k'\), we conclude that G(st) is a decreasing function of \(t\in [0,1]\) for each \(s\in S_k'\). By Lemma 3.1, since \(v(x(\textrm{a}))\ne 0\) for all \(t\in [0,1]\) (i.e., no node of \(v(\cdot ;t)\) passes through \(x(\textrm{a})\) as t increases), we conclude that a node of \(v(\cdot ;t)\) increases from a node of \(v_1\) to the a node of \(v_2\) as t increases from 0 to 1 on \((x(\textrm{a}),x(\textrm{a}+k)]\) and the result follows. \(\square \)

Using similar arguments, one can also prove the following two results:

Lemma 3.2

Let \(k\in \{2,\dots ,N\}\). For each \(s\in S\setminus S_k\), let G(st) be a strictly decreasing function of a real parameter t varying in a nondegenerate interval of the real line. Assume that \(v(\cdot , t)\) is a nonzero continuous function of t for each \(s\in S_N\setminus S_{k-1}\) and satisfies

$$\begin{aligned} v(x(s+1);t)+v(x(s-1);t)+G(s;t)v(x(s);t)=0. \end{aligned}$$

Suppose also that \(v(x(\textrm{a}+N-1);t)/v(x(\textrm{a}+N);t)\) is a strictly increasing function of t and \(v(x(\textrm{a}+N);t)\ne 0\) for all t. Then the nodes of \(v(\cdot ;t)\) on \((x(a+k-1),x(\textrm{a}+N))\) are strictly decreasing functions of t.

Theorem 3.2

Let \(v_1\) and \(v_2\) be nontrivial solutions on \(S_N\setminus S_k\) (\(k\in \{2,\dots ,N\}\)) of

$$\begin{aligned} v_1(x(s+1))+v_1(x(s-1))+G_1(s)v_1(x(s))&=0,\\ v_2(x(s+1))+v_2(x(s-1))+G_2(s)v_2(x(s))&=0, \end{aligned}$$

respectively. If \(G_1(s)<G_2(s)\) for all \(s\in S_N\setminus S_k\), \(v_1(x(\textrm{a}+N))v_2(x(\textrm{a}+N))>0\) and

$$\begin{aligned} v_1(x(\textrm{a}+N-1))v_2(x(\textrm{a}+N))-v_1(x(\textrm{a}+N))v_2(x(\textrm{a}+N-1))> 0, \end{aligned}$$

then \(v_2\) has at least the same number of nodes as \(v_1\) on \((x(\textrm{a}+k-1),x(\textrm{a}+N))\).

The next result is an extension of [12, Corollary 1] for difference equations.

Corollary 3.1

Let \(v_1\) and \(v_2\) be nontrivial solutions of (3.16) and (3.17) on S, with n and m nodes on \((x(\textrm{a}),x(\textrm{a}+N))\), respectively. Denote the generalized zeros of \(v_1\) and \(v_2\) by \(x_1<\cdots <x_n\) and \(X_1<\cdots <X_m\), respectively. If \(m\le n\) and there exists \(j\in \{2,\dots ,N\}\) such that \(G_2(s)<G_1(s)\) for each \(s\in S_j'\) and \(G_1(s)<G_2(s)\) for each \(s\in S\setminus S_j\), and

$$\begin{aligned}&v_1(x(\textrm{a}))v_2(x(\textrm{a}))>0,\\ {}&v_1(x(\textrm{a}+N))v_2(x(\textrm{a}+N))>0,\\ {}&v_1(x(\textrm{a}))v_2(x(\textrm{a}+1))-v_1(x(\textrm{a}+1))v_2(x(\textrm{a}))> 0,\\ {}&v_1(x(\textrm{a}+N-1))v_2(x(\textrm{a}+N))-v_1(x(\textrm{a}+N))v_2(x(\textrm{a}+N-1))> 0, \end{aligned}$$

then \(x_k\le X_k\) for each \(k=1,\dots ,m\).

Proof

Assume that \(v_2\) has i nodes on \((x(\textrm{a}),x(\textrm{a}+j-1)]\) and \(m-i\) nodes on \((x(\textrm{a}+j-1),x(\textrm{a}+N))\). By Theorem 3.1, there is at least one node of \(v_1\) on \((x(\textrm{a}),X_1]\), at least two nodes of \(v_1\) on \((x(\textrm{a}),X_2]\), and so on, until \(X_i\). Hence, \(x_k\le X_k\) for each \(k=1,\dots ,i\).

We may set \(x_1=x(z_1)\), \(\dots \), \(x_n=x(z_n)\), \(X_1=x(Z_1)\), \(\dots \), \(X_m=x(Z_m)\), where \(z_1,\dots ,z_n,Z_1,\dots ,Z_m\in S\). By Theorem 3.2, there is at least one node of \(v_2\) on \((x(z_n-1),x(\textrm{a}+N))\), at least two nodes of \(v_2\) on \((x(z_{n-1}-1),x(\textrm{a}+N))\), and so on. Since \(m\le n\), we have

$$\begin{aligned} X_m=x(Z_m)&\ge x(z_n)\ge x(z_m)=x_m,\\ X_{m-1}=x(Z_{m-1})&\ge x(z_{n-1})\ge x(z_{m-1})=x_{m-1},\\&\vdots \\ X_{i+1}=x(Z_{i+1})&\ge x(z_{n-m+i+1})\ge x(z_{i+1})=x_{i+1}, \end{aligned}$$

and hence \(X_k\ge x(z_k)=x_k\) for each \(k=i+1,\dots ,m\). Therefore, \(x_k\le X_k\) for each \(k=1,\dots ,m\). \(\square \)

Remark 3.1

In order to use Corollary 3.1 to compare all the zeros of two COP, we may choose any \(N\in \{3,4,\dots \}\) such that all these zeros are on \((x(\textrm{a}),x(\textrm{a}+N))\) to verify if the conditions are satisfied.

4 Applications

Here we present some examples comparing zeros of two COP. It is known that (1.1) has polynomial solutions in x, whose difference derivatives satisfy equations of the same kind if and only if, for \(q\ne 1\) fixed, x is a linear, quadratic, q-linear, or q-quadratic grid of the form

$$\begin{aligned} x(s)={\left\{ \begin{array}{ll} C_1s^2+C_2s,\\ C_3q^{-s}+C_4q^s, \end{array}\right. } \end{aligned}$$

where \((C_1,C_2)\ne (0,0)\) and \((C_3,C_4)\ne (0,0)\). The grids that depend on “q” are called q-linear if \(C_3\) or \(C_4\) is zero; otherwise, it is q-quadratic. By using transformations, we can reduce the expressions for the grids to simpler forms. In what follows, we assume that the grid x takes on the following canonical forms:

$$\begin{aligned} x(s)= \left\{ \begin{array}{lll} s &{} \\ s(s+1) &{} \\ q^{s} \qquad \quad \quad \ \ \ \ \ \ \ (q>1) &{} \\ \displaystyle \frac{1}{2}(q^s-q^{-s}) \qquad (q>1) &{} \\ \displaystyle \frac{1}{2}(q^s+q^{-s}) \qquad (q>1) &{} \\ \displaystyle \frac{1}{2}(q^s+q^{-s}) \qquad \, (q=e^{2i\theta },\, 0<\theta <\pi /2). &{} \end{array} \right. \end{aligned}$$
(4.20)

Definition 4.1

Fix \(\textrm{a}\in \mathbb {R}\cup \{-\infty \}\) and \(M\in \mathbb {N}\cup \{\infty \}\) and set \(\textrm{b}=\textrm{a}+M\). Fix q and let x(s) be a real-valued function given by (4.20), where the variable s ranges over the finite interval \([\textrm{a},\textrm{b}]\) or the infinity interval \([\textrm{a},\infty )\). A sequence of polynomials, \((P_n(x(s)))_{n=0}^{M-1}\), is said to be a sequence of classical discrete orthogonal polynomials on the set \(\{x(\textrm{a}),x(\textrm{a}+1),\dots ,x(\textrm{b}-1)\}\) or, simply, COP if:

  1. i)

    \(P_n\) satisfy (1.1), with x being a strictly monotone function on \([\textrm{a},\textrm{b}]\) or \([\textrm{a},\infty )\) given, up to a linear transformation, by (4.20);

  2. ii)

    there exists a positive weight function \(\omega \) satisfying the boundary conditions

    $$\begin{aligned} \omega (s)a(s)x^k\left( s-\dfrac{1}{2}\right) \biggr |_{\textrm{a},\textrm{b}}=0\qquad (k=0,1,\dots ); \end{aligned}$$
    (4.21)
  3. iii)

    the difference equation

    $$\begin{aligned} \dfrac{\Delta }{\Delta x\left( x-\frac{1}{2}\right) }(\omega (s)a(s))=\omega (s) b(s) \end{aligned}$$
    (4.22)

    holds.

Definition 4.2

Let y be a solution of (1.2) on S. The function F defined by

$$\begin{aligned} F(s_k)={\left\{ \begin{array}{ll} \displaystyle \frac{C(s_k)}{B(s_k)}\prod \limits _{j=1}^{k/2}\frac{A(s_{2j-1})B(s_{2j})}{A(s_{2j})B(s_{2j-1})}, \ \ \ \qquad k \text{ even },\\ \displaystyle \frac{C(s_k)}{A(s_k)}\prod \limits _{j=1}^{(k-1)/2}\frac{A(s_{2j})B(s_{2j-1})}{A(s_{2j-1})B(s_{2j})},\qquad k \text{ odd }, \end{array}\right. } \end{aligned}$$
(4.23)

is called the comparison function of y.

Remark 4.1

For convenience, we defined the comparison function of a solution of (1.2) by setting \(u(x(\textrm{a}))=u(x(\textrm{a}+1))=1\) in (1.8). However, we could have chosen any other initial conditions such that \(u(x(\textrm{a}))u(x(\textrm{a}+1))>0\).

Remark 4.2

Using (4.22), one may also write the comparison function (4.23) for a COP as

$$\begin{aligned} F(s_k)=\dfrac{\omega (s_k)C(s_k)\Delta x(s_k-1/2)}{\omega (\textrm{a})B(\textrm{a})\nabla x(1/2)}\times {\left\{ \begin{array}{ll} \left( \prod \limits _{j=1}^{k/2}\dfrac{A(s_{2j-1})}{B(s_{2j-1})}\right) ^2,\qquad k \text{ even, }\\ \left( \prod \limits _{j=1}^{(k-1)/2}\dfrac{A(s_{2j})}{B(s_{2j})}\right) ^2,\qquad k \text{ odd. }\end{array}\right. } \end{aligned}$$
(4.24)

Next, we present an example of application of Corollary 3.1 on the linear grid. By [4, Lemma 2.1], the additional condition on Proposition 2.1 is satisfied for COP and, consequently, we just have to check if the conditions of Lemma 2.1 are satisfied, i.e., if \(A(s)B(s)>0\) for each \(s\in S'\), in order to use (1.7) instead of (1.2).

4.1 The Meixner and Charlier Polynomials

We consider two COP on the linear grid \(x(s)=s\).

The Meixner polynomials (see [10, Sect. 9.10]),

\((n=1,2,\dots ; 0<\mu <1, \gamma >0)\), satisfy the difference equation (1.2) with \(A(s)=s\), \(B(s;\gamma ,\mu )=\mu (s+\gamma )\) and \(C(s;\gamma ,\mu )=n(1-\mu )-s-(s+\gamma )\mu \). Note that \(A(s)B(s;\gamma ,\mu )>0\) for each \(s\in \{1,2,\dots \}\).

The Charlier polynomials (see [10, Sect. 9.14]),

\((n=1,2,\dots ; \alpha >0)\), satisfy the difference equation (1.2) with \(A(s)=s\), \(B(s;\alpha )=\alpha \) and \(C(s;\alpha )=n-s-\alpha \). Note that \(A(s)B(s;\alpha )>0\) for each \(s\in \{1,2,\dots \}\).

Denote the comparison functions of \(M_n^{(\gamma ,\mu )}(s)\) and \(C_n^{(\alpha )}(s)\) by \(F_M\) and \(F_C\), respectively. As an example, consider \(n=10\) (the reader may check that something similar also happens for other values of n). Set \(\alpha =10\), \(\gamma =100\) and \(\mu =1/10\). In this case,

$$\begin{aligned}&C_{10}^{(10)}(0)M_{10}^{(100,1/10)}(1)-M_{10}^{(100,1/10)}(0)C_{10}^{(10)}(1)>0,\\&C_{10}^{(10)}(0)M_{10}^{(100,1/10)}(0)>0, \end{aligned}$$

and \(F_C(s)>F_M(s)\) for \(s=1,2,\dots ,29\) and \(F_C(s)<F_M(s)\) for \(s=30,31,\dots ,38\). Since all the zeros of \(M_{10}^{(100,1/10)}(s)\) are on (0, 40) (see [11, Theorem 7]), we only need to verify what happens on that interval. Moreover,

$$\begin{aligned}&C_{10}^{(10)}(39)M_{10}^{(100,1/10)}(40)-M_{10}^{(100,1/10)}(39)C_{10}^{(10)}(40)>0,\\&M_{10}^{(100,1/10)}(40)C_{10}^{(10)}(40)>0. \end{aligned}$$

Therefore, by Corollary 3.1, we have for each \(k=1,\dots ,10\), where \(x_1<\cdots <x_{10}\) are the zeros of \(C_{10}^{(10)}(s)\) and \(X_1<\cdots <X_{10}\) are the zeros of \(M_{10}^{(100,1/10)}(s)\) (see Fig. 2).

Fig. 2
figure 2

Zeros of \(C_{10}^{(10)}(s)\) and \(M_{10}^{(100,1/10)}(s)\) (\(\blacksquare \) and \(\bullet \), respectively)

Remark 4.3

Corollary 3.1 gives sufficient conditions for inequalities between the generalized zeros of solutions of difference equations. Consequently, these inequalities might be true even if the conditions needed to apply Corollary 3.1 are not satisfied. For example, consider \(M_8^{(1,1/2)}(s)\) and \(C_8^{(50)}(s)\). In this case, (\(k=1,\dots ,8\)), where \(x_k\) are the zeros of \(M_8^{(1,1/2)}(s)\) and \(X_k\) are the zeros of \(C_8^{(50)}(s)\) (see Fig. 3). However, the comparison functions are such that \(F_M(s)>F_C(s)\) for \(s=1,2,3,5,7,\dots ,83,85\) and \(F_M(s)<F_C(s)\) for \(s=4,6,8,\dots ,84,86\), i.e., the inequality changes more than once.

Fig. 3
figure 3

Zeros of \(C_8^{(50)}(s)\) and \(M_8^{(1,1/2)}(s)\) (\(\blacksquare \) and \(\bullet \), respectively)