Solution of "borderline" eqs. in Mathematica, Maple, and Maxima (was "linsolve")
Subject: Solution of "borderline" eqs. in Mathematica, Maple, and Maxima (was "linsolve")
From: Richard Fateman
Date: Wed, 4 Apr 2007 07:34:30 -0700
I don't know what you mean by "internal error" but that is, to me, an
unacceptable result.
An internal error is like "out of memory" or a lisp bug.
Here's a different suggestion.
Solving x=1,x=2 could perhaps give
solver_result([],Inconsistent_Equations[1,2]).
Solving x=1,y=2 for [x,y] could give solver_result([x=1,y=2],Valid_Exact).
You could also use this result-plus-flag to indicate things like
Solver_result( [a=1 or (x=0 and a=arbitrary)], Reduced_Logical_Equation[2])
Etc.
Or you could do what Mathematica does for its programs. So far as I can
tell, this is not especially likely to do what some user wants, compared to
the existing solve, and having a 150 page manual explaining it is not a
solution for a user who does not read anything!
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Andrej Vodopivec
> Sent: Wednesday, April 04, 2007 1:51 AM
> To: Stavros Macrakis
> Cc: Maxima
> Subject: Re: [Maxima] 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
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>