The following system of equations can be solved with version 5.38.1 but later versions return []. Reported by Stefano Milani to mailing list on 2017-07-25. Original report against solve, but the failure is within algsys.
eqs:[k1*x1*x3-j1*x2=0,k2*x2*x3-j2*x1=0,(mu*(x2+x1))/x3-c*x2-b*x1+a*u1=0];
algsys(eqs,[x2,x3,u1]);
(%o6) [[x2 = -sqrt((j2*k1)/(j1*k2))*x1,
x3 = -(j1*sqrt(j2)*sqrt(k2)-sqrt(j1)*j2*sqrt(k1))
/(sqrt(j1)*sqrt(k1)*k2-sqrt(j2)*k1*sqrt(k2)),
u1 = ((b*j1*j2*k2-j2*k1*k2*mu)*x1+sqrt(j1*j2*k1*k2)*(k2*mu-c*j2)*x1)
/(a*j1*j2*k2)],
[x2 = sqrt((j2*k1)/(j1*k2))*x1,
x3 = (j1*sqrt(j2)*sqrt(k2)+sqrt(j1)*j2*sqrt(k1))
/(sqrt(j1)*sqrt(k1)*k2+sqrt(j2)*k1*sqrt(k2)),
u1 = -((j2*k1*k2*mu-b*j1*j2*k2)*x1+sqrt(j1*j2*k1*k2)*(k2*mu-c*j2)*x1)
/(a*j1*j2*k2)]]
git bisect points to
commit 640ca759d4b7dc54de9fd0d15149bd4471867546
Author: David Billinghurst <dbmaxima@gmail.com>
Date: Tue Oct 4 14:14:59 2016 +1100
SF [bug:#1266][bug:#3208] Don't use $radcan when simplifying in algsys.
Inappropriate use of $radcan when simplifying expressions caused a
number of failures in algsys. This commit follows on from recent
work that removed one call to radcan and introduced use of sqrtdenest.
This addresses a number of long-standing solve/algsys failures.
The recent changes to ebaksubst simpified some expressions to zero
and allowed the solution to continue until it crashed in a call to
radcan from pfreeofmainvarsp.
* src/algsys.lisp:
New function simplify-after-subst that uses sqrtdenest, $rectform
and $ratsimp. This replaces uses of radcan to simplify expressions.
Call simplify-after-subst from ebaksubst1, pfreeofmainvarsp and
pfreeofmainvarsp.
Reduce the problem. Rename constants and variables, then remove constants while problem remains unsolvable with maxima 5.39.0
This is solvable in 5.38.1, with solution
Tracing this with
Looking quickly through the output I found an expression that is simplified to zero by $radcan but not by lisp function simplify-after-subst. If we restrict g and h to positive values then it can be simplified
If we assume all the constants in the original problem are positive then current maxima gives solutions that seem equivalent to 5.38.1.
I haven't tried to find the minimum assumptions necessary.
This isn't a bug. The solution from 5.38.1 is wrong for certain choices of constants.
Using the reduced test case above, then taking g=1 and h=-1, we see that the "solution" doesn't satisfy the original equations.
Not a bug. Test cases added to rtest_algsys.mac as commit [cd0fd4].
Related
Commit: [cd0fd4]
Last edit: David Billinghurst 2018-01-01
Not a bug. It is unfortunate that algsys returns [] with no message when a solution requires constraints on a constant.
Last edit: David Billinghurst 2018-01-01