In the notebook you note that the results returned by sympy "do not check".
I suspect this is because sympy's solve function is being called with
check=False under the hood:

In [43]: x = symbols('x')

In [44]: eq = sqrt(x) + cbrt(x) + 2

In [45]: print(solve([eq], [x]))
[]

In [46]: print(solve([eq], [x], check=False))
[((1 + (3*sqrt(87) + 28)**(1/3) + (3*sqrt(87) +
28)**(2/3))**6/(729*(3*sqrt(87) + 28)**2),), ((-4 + (1 - sqrt(3)*I)*(2 - (1
- sqrt(3)*I)*(3*sqrt(87) + 28)**(1/3))*(3*sqrt(87) +
28)**(1/3))**6/(46656*(1 - sqrt(3)*I)**6*(3*sqrt(87) + 28)**2),), ((-4 + (1
+ sqrt(3)*I)*(2 - (1 + sqrt(3)*I)*(3*sqrt(87) + 28)**(1/3))*(3*sqrt(87) +
28)**(1/3))**6/(46656*(1 + sqrt(3)*I)**6*(3*sqrt(87) + 28)**2),)]

With radical equations like this sympy's solve will transform them to
polynomial equations and compute all solutions to the polynomial equations.
Transforming to polynomials introduces spurious solutions so solve then
checks to see which of the solutions satisfy the original radical
equations. Passing check=False means that the checking is disabled and so
you get all solutions to the polynomial equation which may or may not be
solutions to the radical equation.

--
Oscar


On Sat, 6 May 2023 at 10:28, Emmanuel Charpentier <
emanuel.charpent...@gmail.com> wrote:

> *Typo* in the preceding message : The polynomial system is of course |x2^2-x1,
> x3^3-x1, x2+x3+2]
>
> Sorry for the noise !
> ​
> Le samedi 6 mai 2023 à 11:25:07 UTC+2, Emmanuel Charpentier a écrit :
>
>> TLDR : Sage easily gets the roots of the polynomial system |x2^2-x1,
>> x3^4-x1, x2+x3+2] but interprets [image: \sqrt[3]{x}+\sqrt{x}+2]
>> inconsistently : this expression is *not* zero for the above roots.
>>
>> Details : see the enclosed Jupyter Lab sheet.
>>
>> This seems to be little discussed in Sage documentation. Is it worth to
>> discuss it ?
>> ​
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/dc5d995c-e76c-4e5b-89f9-beb640a1b9e8n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-devel/dc5d995c-e76c-4e5b-89f9-beb640a1b9e8n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAHVvXxSQUc5J%2B1eVAWYmNWdf4mg_NTeL%2BBWZ7L%3DRKCOLMOJTrQ%40mail.gmail.com.

Reply via email to