2008/9/8 Alexander El'bert <aee at imm.uran.ru>:
> How can I use globalsolve for solving single equation? I can manually add
> the second equation but it seems to be not a good idea.
It's likely that globalsolve is broken. My advice is just don't use it,
there are certainly other ways to solve the same problem.
Even if it weren't broken, assigning values to formal variables is likely
to cause unpleasant surprises. We should probably just get rid of it.
> for i:1 to 5 do (eqpr,
> op1(%),
> op2(%),
> )
> and so on... I can use a1:expr,a2:op1(a1),a3:op2(a2) but sometimes the
> result differs from
> (%i1) expr
> (%i2) op1(%)
> (%i3) op2(%)
Within (...) and block(...) the variable %% is the value of the last
expression evaluated. Probably you want for ... do (foo, op1(%%), op2(%%), ...).
> 3. I want the system automatically substitute known numerical values as
> ''%,numer. Which method is mostly correct?
I've sometimes used the following.
solutions : solve (equations, variables);
=> <some list of lists of x = ..., y = ...>
solutions[1];
=> <first list of x = ..., y = ...>
ev (foo, solutions[1]);
=> <value of foo w/ x, y, ... temporarily bound>
Maybe that has the effect you want.
best
Robert Dodier