(%o7) [b*c+a^2-a,b*d+a*b-b,c*d+a*c-c,d^2-d+b*c]
(%i8) algsys(%,[a,b,c,d]);
Maxima encountered a Lisp error:
(%i9) algsys(%o7,[a,b,c,d]),algebraic : true;
(%o9) [[a=-(sqrt(1-4*%r7*%r8)-1)/2, ...]]
Would it be OK to have algsys (or maybe just resultant)
set algebraic to true?
Barton
Logged In: YES
user_id=895922
Proposed fix:
(defmfun $resultant (a b mainvar)
(prog (varlist formflag $ratfac res ans genvar $keepfloat
$algebraic)
(setq varlist (list mainvar) $ratfac t ans 1 $algebraic t)
It seems to fix the problem:
(%o9) [b*c+a^2-a,b*d+a*b-b,c*d+a*c-c,d^2-d+b*c]
(%i10) algsys(%,[a,b,c,d]);
(%o10) [[a=-(sqrt(1-4*%r7*%r8)-1)/2,b=%r7
Barton
Logged In: YES
user_id=501686
Observed in 5.9.3.99rc1.
This bug reported is related to the bug report SF[609466].
A check for a number zero in a call to punivarp has been checked in.
Maxima no longer gets a fatal Lisp error for the examples given in this bug report, but returns an error message:
`algsys' cannot solve - system too complicated.
-- an error. To debug this try debugmode(true);
Should we close the bug report too? The Lisp error has gone. The algorithm is not smart enough to find a solution for the problem, but that might be not a bug.
To improve algsys more general we can set the flag $algebraic in the routine $algsys. That is the point a lot of global variables are set.
Dieter Kaiser
The Lisp error has gone as written in the last posting.
The system is solveable with the option variable algebraic set to true:
(%i1) [b*c+a^2-a,b*d+a*b-b,c*d+a*c-c,d^2-d+b*c];
(%o1) [b*c+a^2-a,b*d+a*b-b,c*d+a*c-c,d^2-d+b*c]
(%i2) algsys(%,[a,b,c,d]),algebraic:true;
(%o2) [[a = -(sqrt(1-4*%r559*%r560)-1)/2,b = %r559,c = %r560,
d = (sqrt(1-4*%r559*%r560)+1)/2],
[a = (sqrt(1-4*%r561*%r562)+1)/2,b = %r561,c = %r562,
d = -(sqrt(1-4*%r561*%r562)-1)/2],[a = 0,b = %r563,c = 0,d = 1],
[a = 1,b = %r564,c = 0,d = 0],[a = 1,b = 0,c = 0,d = 1],
[a = 0,b = 0,c = 0,d = 0]]
I think we no longer have a bug. Setting the status to pending and the resolution to "works for me".
Dieter Kaiser
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).