Hello, @arneovi! The variables of the form cN
, where N
is a natural number, are parameters. For example, one of the solutions you obtained is
[a_1 == 0, a_2 == 0, b_1 == c2439, b_2 == c2440]
This can be rewritten as $a_1=0$, $a_2=0$, $b_1=s$ and $b_2=t$, where $s,t\in\mathbb{R}$. On the other hand, one of the other solutions you obtained is
[a_1 == c2443, a_2 == c2443^2, b_1 == 0, b_2 == 0]
In this case, you should notice that, unlike the previous example, the two occurrences of the variables of the from cN
is the same one. Therefore, this can be rewritten as $a_1=t$, $a_2=t^2$, $b_1=0$ and $b_2=0$.
That should answer your question. However, I should also point out a potential problem that you might or might not find when using solve()
. The solve()
function accepts an algorithm
parameter, which can take the values maxima
(the default), sympy
, giac
and fricas
. This indicates the Computer Algebra System that you want to use to solve the equation(s). In the case of maxima
, giac
and fricas
, I obtained exactly the same results as you; however, sympy
caused me some trouble. Indeed, when calling
solve([eq1, eq2, eq3, eq4], a_1, a_2, b_1, b_2, algorithm='sympy')
I obtained some results tat are consistent with the ones you obtained. For example, here is part of the output for this case:
[{a_1: 0, a_2: 0},
{a_1: 0, a_2: 0},
{a_2: 0, a_1: 0},
{a_2: 0, b_2: 0},
...]
On the other hand, Sympy
also gave me this result:
{a_1: -1/6*2^(5/6)*sqrt(3*2^(2/3)*(3*I*sqrt(303) + 1499)^(1/3) + 48*2^(1/3) + 624/(3*I*sqrt(303) + 1499)^(1/3)),
b_1: 1/2*b_2,
a_2: 1/3*2^(1/3)*(3*I*sqrt(303) + 1499)^(1/3) + 104/3*2^(2/3)/(3*I*sqrt(303) + 1499)^(1/3) + 16/3}
After replacing in the original equations, it would seem that the whole system is satisfied, except for eq2
. (Here is a SageCell using this exact solution, just in case you feel curious. However, be warned: I had to use polynomial rings in order to obtain numerical approximations, because the mathematical expressions are too complicated for full_simplify()
.)
My suggestion: Although very useful, the solve()
function not always gives the right and/or complete answer. It is always a good idea to check with different algorithms. Even better, if you can solve the system by hand in a reasonable amount of time and with a reasonable amount of effort, it is best to do it so.
I hope this helps!
Maxima can't solve this system (checked in Maxima itself) :
[ Snip...]
Sympy gives a bizarre (and incompletely solved) answer ; Giac's result can't be backtranslated to Sage. The result you got may well come from Fricas :
Do you have Fricas installed ?
Hello, @Emmanuel Charpentier! I deleted my previous comment that indicated that I couldn't reproduce the error message you obtained. The problem was that I accidentally solved the system with Sage's
solve()
function directly instead of using Maxima.This made me wonder why Sage returns an answer when asked to solve with the
algorithm='maxima'
option instead of an error, so I took a look at the code. As it turns out, Sage'ssolve()
function first tries to use Maxima'ssolve
, and if that fails, it tries withto_poly_solve
. Indeed, the following Maxima code should return the same solutions as Sage:In Sage you can write
or the shorter version