Question: convert recurrence relation into matrix form

Having a recurrence relation of the form:

f(n)*c_{n+1} + g(n)*c_n + h(n)*c_{n-1}=0

with coefficient functions f,g,h is it possible to convert this into a matrix of dimension N+1

thus if the sequences c_n are the coefficients of a series sum_{n=0}^{infinity} c_n x^n I'm only interested up to order N of the series

e.g. N=2

n=0: f(0)*c_{1} + g(0)*c_0 =0

n=1: f(1)*c_{2} + g(1)*c_1 + h(1)*c_{0}=0

n=2: g(2)*c_2 + h(2)*c_{1}=0

so here the matrix would consist of the f(0),g(0),f(1),g(1),h(1),g(2),h(2) acting on the coefficient vector c_0, c_1, c_2

Please Wait...