Classical orthogonal polynomials are solutions of a second order differential, difference, or q-difference equation for continuous, discrete, or q-discrete variables, respectively. Furthermore, all such systems satisfy a three-term recurrence equation of the form: pn+1(x) = (An x + Bn)pn(x) − Cn pn−1(x), for n ≥ 0 with p−1 = 0, p0 = 1. Given a holonomic three-term recurrence equation, we implement in Maxima and Maple an algorithm which detects its classical orthogonal polynomial solutions for the continuous, discrete, and q-discrete variables when they exist. With our implementations, the results obtained using the Maple implementations by Koepf and Schmersau (Appl Math Comput 128:303–327, 2002) and Koorwinder and Swarttouw (Priv Commun, 1998) are easily recovered. In addition, we obtain new relations that extend beyond those previously established in the literature.
Nwoku et al. (Tue,) studied this question.