What are the polynomial solutions of the difference equation $W(x+h)=\frac{c(x+h)}{d(x+h)}W(x)$ for $W(x)$?

Let $d(x)=\prod_{s=1}^{n}(x-a_s)$ and $c(x)=\prod_{s=1}^{n}(x-a_s+b_s h)$ be polynomials, where $a_s, b_s$ are some complex numbers. What are the polynomial solutions of the difference equation $W(x+h)=\frac{c(x+h)}{d(x+h)}W(x)$ for $W(x)$? Thank you very much.

Edit: $b_s$ are positive integers.

-

It is instructive to look at this from the stand-point of general solution, which is $$W(x) =\kappa \cdot \prod_{s=1}^n \frac{\Gamma\left(\frac{x-a_s}{h} + b_s + 1 \right)}{\Gamma\left(\frac{x-a_s}{h} +1 \right)}$$

Using the recurrence equation for $\Gamma(z)$, i.e. $G(z+n) = (z+n-1) \cdots (z+1)z \Gamma(z)$, we get that $W(x)$ is polynomial iff if $b_s$ are non-negative integers.

The necessary condition is that there exists a permutation of the tuple $\left[ b_1 +1 - \frac{a_1}{h}, \ldots, b_n +1 - \frac{a_n}{h}\right]$ so that it equals to $\left[m_1 + 1 - \frac{a_1}{h}, \ldots, m_n + 1 - \frac{a_n}{h}\right]$ for non-negative integers $m_1,\ldots,m_n$.

A non-trivial example was provided by @DidierPiau, with $n=2$, $h=1$, $[a_1,a_2] = [1,1/2]$, $[b_1,b_2] = [1/2,1/2]$. Then $[b_1+1-a_1/h,b_2+1-a_2/h] = [1/2,1]$, and $[1-a_1/h,1-a_2/h] = [0,1/2]$. The ratio of $\Gamma$-function, thus simplifies to $x$, and $W(x) = \kappa x$.

-
That the $b_s$ must be nonnegative integers for $W$ to be a polynomial function is not so clear. Consider the case $n=2$, $h=a_1=1$, $a_2=b_1=b_2=\frac12$, then $W(x)=\kappa x$ hence $W$ is a polynomial function. –  Did Nov 23 '11 at 17:11
@Didier, thank you for your comment. –  LJR Nov 23 '11 at 17:14
@user9791, Ahhh, post podified without notification. (As a result, the $b_s$ are complex numbers and, on the next line, positive integers...) –  Did Nov 23 '11 at 17:26
@DidierPiau Thanks for the counterexample. I have expanded my answer to covert the case when $\Gamma$-s in numerator are shifts of those in the denominator up to a permutation. –  Sasha Nov 23 '11 at 17:37
@Sasha, is the solution unique? –  LJR Nov 23 '11 at 19:26

When the $b_s$ are nonnegative integers, the general solution is $$W(x)=V(x)\cdot\prod\limits_{s=1}^n\,\prod\limits_{k=1}^{b_s}\,(x-a_s+kh),$$ where $V$ has period $h$. Thus $W$ is a polynomial function if and only if $V$ is constant.

Edit The proof is direct: call $V(x)$ the ratio of $W(x)$ by the product over $(s,k)$ on the RHS. Check that the functional equation $d(x+h)W(x+h)=c(x+h)W(x)$ (which is not a difference equation) is equivalent to $V(x)=V(x+h)$. Then the condition that $W$ is a polynomial implies that $V$ is a rational function. The only periodic rational functions are constant hence the proof is complete.

-
can $V(x)$ be a polynomial? –  LJR Nov 26 '11 at 22:53
Polynomial and periodic? This does not leave a lot of choice, don't you think? –  Did Nov 27 '11 at 6:58
thank you very much. –  LJR Nov 27 '11 at 13:21
how do you get this formula? What is the ralation between $\Gamma(hz)$ and $\Gamma(z)$? –  LJR Nov 27 '11 at 14:19
See edit.   –  Did Nov 27 '11 at 16:07