FAQS/follow-up on solving a set of symbolic equations



Dear Richard,
Dear Martin,

I have been able to work with the subst and ev commands in systems
of symbolic equations as you suggested and shown below, but I have
some difficulties with globalsolve:true$. Moreover, globalsolve:true$ 
seems to behave in a different way with the solve and linsolve com-
mands and I do not understand why (examples in (C20), (C21) and 
(C31), (C32) below). More explicitly, I failed to use globalsolve:true$
with the solve command even in the case of the trivial equation y1=1.
(I doubt whether I can use globalsolve together with solve contrary
to what is mentioned in both Maxima manuals.)

Incidentally, the output of Maxima in (D31) and (D32) is in capital
letters, whereas in (D20) and (D21) in lower-case letters. The "bug"
reported by Richard? In any case, I do not like the output (D40);
I prefer lower case letters in both y1 and z1 in the simple list there.
Perhaps, Ray's suggestion on a distinction between Maxima and
Maxima-User packages would help to avoid the (D40) output
(even under (C41)).

To be sincere, I am somewhat confused with (C41) too.

The conclusion for me is that I am somewhat confused. Probably,
I must get more experience in using Maxima.

Many thanks for your kind help and support,

Nikos

Part of the Maxima session:

(C1) a+b*c=1$
(C2) b-a*c=0$
(C3) a+b=5$
(C4) display2d : false$
(C5) solve([d1,d2,d3], [a,b,c]);
(D5) [[a = (25*SQRT(79)*%I+25)/(6*SQRT(79)*%I-34),
       b = (5*SQRT(79)*%I+5)/(SQRT(79)*%I+11),C = (SQRT(79)*%I+1)/10],
      [a = (25*SQRT(79)*%I-25)/(6*SQRT(79)*%I+34),
       b = (5*SQRT(79)*%I-5)/(SQRT(79)*%I-11),C = -(SQRT(79)*%I-1)/10]]
(C7) subst(d5[1],a);
(D7) (25*SQRT(79)*%I+25)/(6*SQRT(79)*%I-34)

(C8) ev(a,d5);
(D8) (25*SQRT(79)*%I+25)/(6*SQRT(79)*%I-34)
(C16) a,d5[1];
(D16) (25*SQRT(79)*%I+25)/(6*SQRT(79)*%I-34)
(C17) a,d5[2];
(D17) (25*SQRT(79)*%I-25)/(6*SQRT(79)*%I+34)

(C10) globalsolve:true$
(C11) solve([d1,d2,d3], [a,b,c]);
(D11) [[a = (25*SQRT(79)*%I+25)/(6*SQRT(79)*%I-34),
 b = (5*SQRT(79)*%I+5)/(SQRT(79)*%I+11),C = (SQRT(79)*%I+1)/10],
       [a = (25*SQRT(79)*%I-25)/(6*SQRT(79)*%I+34),
 b = (5*SQRT(79)*%I-5)/(SQRT(79)*%I-11),C = -(SQRT(79)*%I-1)/10]]

(C19) globalsolve:true$
(C20) solve(a*x=b,x);
(D20) [x = b/a]
(C21) linsolve(a*x=b,x);
(D21) [x:b/a]
(C31) solve(y1=1,y1);
(D31) [Y1 = 1]
(C32) linsolve(y1=1,y1);
(D32) [Y1:1]

(C39) kill(y1,z1);
(D39) DONE
(C40) [y1, z1];
(D40) [Y1,z1]

(C41) describe(y1);

 0: APPLY1 :(maxima.info)Definitions for Rules and Patterns.

Info from file C:/MAXIMA/MAXIMA/info/maxima.info:
 - Function: APPLY1 (exp, rule1, ..., rulen)
     repeatedly applies the first rule to exp until it fails, then
     repeatedly applies the same rule to all subexpressions of exp,
     left-to-right, until the first rule has failed on all
     subexpressions.  Call the result of transforming exp in this
     manner exp'.  Then the second rule is applied in the same fashion
     starting at the top of exp'.  When the final rule fails on the
     final subexpression, the application is finished.
(D41) FALSE
(C42) describe(z1);
(D42) FALSE

> ---  "Richard Fateman" <fateman@cs.berkeley.edu> wrote:

> There are two "standard" ways of doing what you want,
> namely accessing the result of solve.
> 
> One is to do  ev(a,d5);
> or just a,d5;
> or the subst given by Martin.
> 
> the other way is by setting some flag
> globalsolve:true;
> 
> which SETS a to its value.