Maxima Function
solve_rec_rat (eqn, var, [init])
Solves for rational solutions to linear recurrences. See solve_rec for description of arguments.
To use this function first load the solve_rec
package with
load(solve_rec);
.
Example:
(%i1) (x+4)*a[x+3] + (x+3)*a[x+2] - x*a[x+1] + (x^2-1)*a[x]; (%o1) (x + 4) a + (x + 3) a - x a x + 3 x + 2 x + 1 2 + (x - 1) a x (%i2) solve_rec_rat(% = (x+2)/(x+1), a[x]); 1 (%o2) a = --------------- x (x - 1) (x + 1)