# [Maxima] Why I can't use "differ.mac"?

Andrej Vodopivec andrej.vodopivec
Sun Nov 12 02:25:42 CST 2006

```Hi,

I think the differ package was removed after the solve_rec package was added.

(%i2) deq2: h[n+2]=h[n + 1]*2 + 3*h[n];
(%o2) h[n+2]=2*h[n+1]+3*h[n]
(%i3) solve_rec(deq2, h[n]);
(%o3) h[n]=%k[1]*3^n+%k[2]*(-1)^n

To get a solution which looks more like the one returned by differ try

(%i4) solve_rec(deq2, h[n], h[0]=h0, h[1]=h1);
(%o4) h[n]=((h1+h0)*3^n)/4+((3*h0-h1)*(-1)^n)/4

Andrej

On 11/12/06, Wang Yuheng <yhwang at itp.ac.cn> wrote:
> I'm a beginner. Now I'm learning to use maxima from
> http://maxima.sourceforge.net/docs/tutorial/en/gaertner-tutorial-revision/Contents.htm
> And I face a problem at
> http://maxima.sourceforge.net/docs/tutorial/en/gaertner-tutorial-revision/Pages/DiffEq0001.htm
> It is said that "to solve difference equations, you have to load the
> package differ.mac. You do this which the following command:
> batch(differ);" I followed these words, but was reported with error:
>
> (%i30) batch(differ);Could not find `differ' using paths in
> file_search_maxima (combined values:
> [/home/pihou/.maxima/###.{mac,mc},/usr/local/share/maxima/5.10.0/share/###.{mac,mc},/usr/local/share/maxima/5.10.0/share/{affine,algebra,algebra/charsets,algebra/solver,calculus,combinatorics,contrib,contrib/boolsimp,contrib/descriptive,contrib/diffequations,contrib/diffequations/tests,contrib/distrib,contrib/ezunits,contrib/format,contrib/gentran,contrib/gentran/test,contrib/Grobner,contrib/lurkmathml,contrib/maximaMathML,contrib/mcclim,contrib/numericalio,contrib/pdiff,contrib/prim,contrib/rand,contrib/sarag,contrib/simplex,contrib/simplex/Tests,contrib/solve_rec,contrib/state,contrib/stringproc,contrib/unit,contrib/Zeilberger,diffequations,lbfgs,linearalgebra,integequations,integration,macro,matrix,misc,numeric,orthopoly,physics,simplification,sym,tensor,tensor/tests,trigonometry,utils,vector}/###.{mac,mc}]
> ) -- an error.  Quitting.  To debug this try debugmode(true);
>
> Why? Can someboy help me?
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>

```