Solution of "borderline" eqs. in Mathematica, Maple, and Maxima (was "linsolve")



>        Solver([x=1,x=2],[x]) => [[]]
>        Solver([x=x+1],[x]) => [[[-1]]]
>        Solver([x=y,y=x+1],[x,y]) => internal error
>        Solver([x=y,y=x+1],[x,y]) => internal error
>
> From the user's point of view, shouldn't these all give the same kind of answer?

These should all give internal errors. You can set MsgLevel to SHORT
and Solver prints out the inconsistent equation before triggering an
error.

> > > Solver([a*x=x], [x,a]) => [[x=0]]   ??? what happened to a=1?
> >
> > After a*x=x is solved for x there are no equations left to solve for a
> > so no solution for a is returned.
>
> That is an explanation of *why* it doesn't solve this system correctly
> in terms of its internal operations.  But it is still missing a whole
> family of solutions, which doesn't seem acceptable as black-box
> behavior, especially since both x and a are explicitly given as
> variables (not parameters).

Yes, but is also suggests to interpret the result as x=0 and all
values of a. Similarly
Solver([a*x=x], [a,x]) => [[a=1]] could be interpreted as a=1 and all
values of x.

> > > Solver([x=x+1],[x]); =>     [[[- 1]]]      ??? what does this mean?
> >
> > After lhs(eq)-rhs(eq)=-1. Since this equation does not contain x no
> > solutions are returned. But since you still have the -1=0 equation, it
> > is returned.
>
> Can't Solver detect that this is an inconsistency, and that therefore
> *no* values of x will satisfy the equation?

Yes it should be able to do that. I have commited a short fix to cvs
which fixes this.

-- 
Andrej