#12809: Solve does not give consistent results when a dummy variable is involved
---------------------------------+------------------------------------------
Reporter: afleckenstein | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-5.0
Component: symbolics | Resolution:
Keywords: solve | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by nbruin):
Replying to [comment:3 was]:
> This does suggest we may want to consider reseting Maxima's counter for
dummy variables before calling solve.
It would require care of the user to remember whether different
occurrences of the same variable name refer to independent parameters or
not, but to_poly has a convenience function to relabel the temporaries:
{{{
(%i1) load(to_poly_solver);
(%o1) ...
(%i2) display2d: false;
(%o2) false
(%i3) nicedummies(to_poly_solve([sin(x)=cos(x)],[x]));
(%o3) %union([x = (4*%pi*%z0+%pi)/4])
(%i4) nicedummies(to_poly_solve([sin(x)=cos(x)],[x]));
(%o4) %union([x = (4*%pi*%z0+%pi)/4])
}}}
I think the slight inconvenience of getting new names every time is
preferable to the ambiguity that is caused by reusing names among several
equation solves. Another issue is that the maxima-to-sage conversion maps
%z1 to z1 without checking. This can lead to further unintended name
collisions.
(but then again, if someone is willing to use the results returned by a
CAS solve routine without checking, they're asking for trouble anyway)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12809#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.