|
From: Mark <zei...@ya...> - 2014-02-17 07:51:21
|
On 02/15/2014 11:36 PM, Mark wrote:
> On 02/15/2014 09:22 PM, Barton Willis wrote:
>>> Yet, I do not seem to have a package 'Solver'. If I do load(Solver)$
>> Try load(solver) instead of load(Solver). At least with Maxima on my droid, load(Solver) fails
>> and load(solver) works. Sorry for the bother.
>>
>> In share/algebra/solver there is German language documentation for solver.
> This 'Solver' is not bad at all!
> I've been playing around with it for the last hour or so and one can set
> up lots of non-trivial eqns. it will solve while 'solve' returns just
> []. Thanks again.
Well, at the end also Solver acts different from what one may
anticipate. Maybe I don't understand all of its internal switches yet.
In any case, e.g.:
eq:[-sin(x/2)*cos(sqrt(3)*y/2)-sin(x) = 0,
-sqrt(3)*cos(x/2)*sin(sqrt(3)*y/2) = 0];
This has one solution at [x,y]:[0,0] and one at [x,y]:[%pi,%pi/sqrt(3)]
with a six-fold rotational symmetry around [0,0] for the latter.
Solver(eq,[x,y]); returns only
(%i1) Solver(eq,[x,y]);
(%o1) [[x = %pi,y = %pi/sqrt(3)]]
I have no problem with loosing the six-fold repetition, but it seems
strange that [x,y]:[0,0] is not found - even if inverse angular
functions have to be invoked.
Another issue is Solver()'s 'behavior' on over determining the eqns.,
like in
(%i1) Solver([sin(x)=0,sin(y)=0,y=1],[x,y]);
(%o1) [[x = 0,y = 1]]
I.m.h.o. this is just wrong.
While
(%i1) Solver([x=0,y=0,y=1],[x,y]);
Solver terminated.
#0: TerminateSolver()(solver.mac line 549)
#1: ImmediateAssignments(solutions=[x = 0,y = 0],remainingeqs=[y =
1],variables=[],parameters=[])(solver.mac line 1010)
#2: Solver(equations=[x = 0,y = 0,y =
1],solverparams=[[x,y]])(solver.mac line 473)
-- an error. To debug this try: debugmode(true);
At least Solver() does not return a solution here, but I think returning
'[]' would seem more 'natural'.
-M
|