Inspired by an as.sagemath
question, I tried to solve a not-so-simple system, and found that Sagemath (8.1beta7) is currently unable to solve it :
sage: var("x,y,z,K")
(x, y, z, K)
sage: xi=3/4
sage: yi=0
sage: zi=0
sage: eq1=K==y^2*z/x^2
sage: eq2=xi+yi==x+y
sage: eq3=2*xi+yi+2*zi==2*x+y+2*z
sage: solve([eq1,eq2,eq3],[x,y,z])
[]However, this system *is* solvable : one ca solve [eq2,eq3] for y and z, substitute the (only) solution in eq1 and solve it for x, which turns out to give three solutions (looking suspiciously close to the solution of a cubic) ; substituting each of these solutions in the solutions for y and z gives three (not-so-light) solutions for the system.
Trying to solve it with maxima invoked from sage also fails :
sage: %%maxima
....: display2d:false;
....: xi:3/4$
....: yi:0$
....: zi:0$
....: eq1:K=y^2*z/x^2$
....: eq2:xi+yi=x+y$
....: eq3:2*xi+y+2*zi=2*x+y+2*z$
....: sys:[eq1,eq2,eq3];
....: sol:solve(sys,[x,y,z])$
....: l:length(sol)$
....: l;
....:
false
[K=(y^2*z)/x^2,3/4=y+x,y+3/2=2*z+y+2*x]
0Printing the value of sys shows that it is defined. Printing the length of the solution that this solution is indeed has length 0 (no solution) and that failing to print it is *not* an interprocess communication problem caused by a "too long" result.
However, when running the same Maxima program in the interpreter from the command line does give a solution (much more massive, by the way, that the one obtained manually). See enclosed source and output, obtained by :
cat ttstSolve.mac | sage --maxima > ttstSolve.outTherefore, the problem seems to exist in Sage's interface to maxima, not in Maxima itself.
Perusing the
list of symbolics tickets didn't allow me to recognize this bug. A cursory inspection of Maxima-related tickets gave no more results.
Questions :
1) Is this a new bug ?
2) Does it deserve a ticket ?
For what it's worth, Mathematica has no problem solving the system (in its native interface) and gives relatively lightweight solutions ; I failed to obtain solutions from fricas, giac and maple, as well as to get Mathematica's answer through its Sage interface.
HTH,
--
Emmanuel Charpentier