rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

quotient by polynomial of higher degree #189

Closed rtoy closed 3 months ago

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:18:27 Created by bigfooted on 2017-01-12 17:14:29 Original: https://sourceforge.net/p/maxima/bugs/3273


A simple example that results in an error:

eqs:[(- a*n2) - a*n1 - 2*a, sqrt(a)*sqrt(- c)*(n2 - n1), b*n4 + n3 +
b*n2 + b*n1 + b + 1];
vars:[n1,n2,n3,n4];
solve(eqs,vars);

Quotient by a polynomial of higher degree
 -- an error. To debug this try: debugmode(true);

Comments by Robert Dodier:

Looks like the problem here is that the coefficient sqrt(a)*sqrt(-c) is being handled incorrectly. If I substitute symbols for those e.g.

subst ([sqrt(a) = sqrta, sqrt(-c) = sqrtmc], eqs);

I find solve finds the same result as to_poly_solve.

Maybe it is specifically the presence of sqrt that causes trouble -- if I change sqrt to foo, solve finds the solution.

Please open a bug report for this example and copy these notes into it, and, if you have time, cross-reference it in other bug reports. It's not clear if this is the same error as in other cases.

Richard Fateman wrote:

This is closing in on the bug -- we've been there before -- and it has to do with the interface between programs like ratrep and newvar and what is on the varlist -- the list of variables in the polynomial(s).
something intermediate to the general representation and polynomial CRE form notices that the variables c, and sqrt(c) are related, reduces sqrt(c) ^2 to c.. Find it and you fix umpteen bug reports.

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:18:29 Created by robert_dodier on 2023-03-14 04:16:25 Original: https://sourceforge.net/p/maxima/bugs/3273/#fbd9


rtoy commented 3 months ago

Imported from SourceForge on 2024-07-02 08:18:31 Created by robert_dodier on 2023-03-14 04:16:26 Original: https://sourceforge.net/p/maxima/bugs/3273/#a9bc


Fixed by commit b6dd08cd (dated 2017-01-13). It would be interesting to review related bugs to see if that commit fixes any other problems.