Subject: Maxima: Assistance requested with solver.mac.
From: C. Frangos
Date: Wed, 20 Jul 2005 11:28:09 +0200
Hi all,
I am trying to use the Maxima solve() to obtain analytical solutions to
simultaneous nonlinear equations with respect to specified variables. There
are also many symbolic parameters in the equations. In some cases solve()
could not find the solution.
I located under the following directory the program solver.mac, together with
several other related programs.
/usr/local/share/maxima/5.9.1/share/algebra/solver/solver.mac
I copied the program solver.mac and the other programs to my home
directory. I wrote a short program mysolver.mac (see below) to read
these into Maxima.
I ran the following commands but solver.mac gives an error.
Any assistance would be much appreciated.
(%i1) batchload("mysolver.mac");
(%o1) /home/cfrangos/axiom/mysolver.mac
(%i2) mysolver();
(%o2) /home/cfrangos/axiom/solver.mac
(%i3) block([s:solver([x+y+x^2=a,x-y=b],[x,y],[a,b])],print(s));
MACSYMA was unable to evaluate the predicate:
ERREXP1
#0: SetupSolver(equations=[y+x^2+x = a,x-y = b],solverparams=[[x,y],[a,b]])
#1: SOLVER(equations=[y+x^2+x = a,x-y =
b],solverparams=[[x,y],[a,b]])(solver.mac line 451)
-- an error. Quitting. To debug this try DEBUGMODE(TRUE);
(%i4)
Regards,
C. Frangos.
mysolver() := block(
batchload("linsolve.mac"),
batchload("misc.mac"),
batchload("slvrmsgs.mac"),
batchload("slvrtbox.mac"),
batchload("solver.mac")
);