# Solution of the difference equation $c(x+h)-c(x)=f(x)$

Consider the difference equation $c(x+h)-c(x)=f(x)$, where $f(x)=\sum_{i=1}^{s}f_sx^s$ is a polynomial. What is the solution of this equation?

-

If $f$ has degree $s$, there exists a unique polynomial $g$ of degree $s+1$ and with no constant term, such that $f(x)=g(x+h)-g(x)$ identically.
Thus, $c(x+h)-c(x)=f(x)$ if and only if $c(x+h)-c(x)=g(x+h)-g(x)$ if and only if the function $c-g$ is periodic with period $h$.
To find $g$, write $f(x)=\sum\limits_{k=0}^sf_kx^k$ with $f_s\ne 0$ and look for $g(x)=\sum\limits_{k=0}^{s}g_kx^{k+1}$ solving the equation $f(x)=g(x+h)-g(x)$. One gets, for every $0\leqslant k\leqslant s$, $$f_k=\sum\limits_{i=k}^{s}{i+1\choose k}h^{i+1-k}g_i.$$ This is a triangular linear system of size $s+1$ giving $(f_k)_{0\leqslant k\leqslant s}$ as a function of $(g_k)_{0\leqslant k\leqslant s}$. If $h\ne0$, the diagonal coefficients are nonzero, hence this Cramer system has a unique solution $(g_k)_{0\leqslant k\leqslant s}$, which yields $g$.