You use solve_rec like this: maxima.load('solve_rec') maxima('solve_rec(f[n+2]-3*f[n+1]+2*f[n]=2^n,f[n],f[0]=1,f[1]=0)')
I think that solve_rec can in fact solve a larger class of difference equations than linear equations with constant coefficients, but my use doesn't involve anything more that this. -Alasdair On May 31, 11:22 am, Jason Grout <jason-s...@creativetrax.com> wrote: > Alasdair wrote: > > I can solve a difference equation using the Maxima interface, and the > > "solve_rec" package included with Maxima. Apparently SymPy can also > > solve difference equations, but I can't find any documentation or > > examples to show how this is done. So, two questions: > > > 1) How can difference equations be solved using SymPy, from within > > Sage? > > 2) Is it possible to write a little bit of code which will provide a > > difference equation solver for Sage, using Maxima's solve_rec package > > to perform the actual calculation? > > Can you give an example in maxima of using the solve_rec command? > > Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---