Maxima Function
reduce_order (rec, sol, var)
Reduces the order of linear recurrence rec when a particular solution sol is known. The reduced reccurence can be used to get other solutions.
Example:
(%i3) rec: x[n+2] = x[n+1] + x[n]/n; x n (%o3) x = x + -- n + 2 n + 1 n (%i4) solve_rec(rec, x[n]); WARNING: found some hypergeometrical solutions! (%o4) x = %k n n 1 (%i5) reduce_order(rec, n, x[n]); (%t5) x = n %z n n n - 1 ==== \ (%t6) %z = > %u n / %j ==== %j = 0 (%o6) (- n - 2) %u - %u n + 1 n (%i6) solve_rec((n+2)*%u[n+1] + %u[n], %u[n]); n %k (- 1) 1 (%o6) %u = ---------- n (n + 1)! So the general solution is n - 1 ==== n \ (- 1) %k n > -------- + %k n 2 / (n + 1)! 1 ==== n = 0