math - 萨吉数学 : Is there a simple way to factor a polynomial over C & have the roots appear in radical instead of decimal form?

标签 math wolfram-mathematica sage

在 Mathematica 中,如果我执行以下操作

Roots[x^3 - 2 == 0, x]

我明白了

x=(-1)^(2/3) 2^(1/3) || x=(-2)^(1/3) || x = 2^(1/3)

我想在 Sagemath 中做类似的事情

sage: F1.<x> = PolynomialRing(CC)
sage: f=x^3 - 2
sage: f.roots()
[(1.25992104989487, 1),
 (-0.629960524947437 - 1.09112363597172*I, 1),
 (-0.629960524947437 + 1.09112363597172*I, 1)]

sagemath 中有没有办法将其视为部首或 ^(1/n) 或类似的东西?

最佳答案

您需要在复杂多项式环内进行此计算是否有原因?我不是计算机代数方面的专家,我确​​信我过于简单化了,但我相信这是这种行为的根源; Sage 将复数视为不精确字段,这意味着它将系数 ab 存储在 a+b*I 中(默认为 53) -bit) float 而不是作为符号常量。基本上,您要求的是类型错误,在ComplexField(或ComplexDoubleField,或者可能是任何不精确的字段)上定义的任何对象都将使用 float 作为其系数。另一方面,符号环(默认情况下标记 x 位于其中)中的相应行为似乎正是您正在寻找的;更具体地说,评估 var("t"); solve(t^3-2==0,t) 返回[t == 1/2*I*sqrt(3)*2^(1/3) - 1/2*2^ (1/3), t == -1/2*I*sqrt(3)*2^(1/3) - 1/2*2^(1/3), t == 2^(1/3) )]

关于math - 萨吉数学 : Is there a simple way to factor a polynomial over C & have the roots appear in radical instead of decimal form?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71967991/

相关文章:

math - 计算抛物线 : What am I doing wrong?

php - PHP 和 MySQL 中的数学

math - float 学有问题吗?

wolfram-mathematica - 原子晶格的邻域计算

Python 与 Sage 的导入错误

algorithm - 抛硬币 - 返回随机结果

wolfram-mathematica - 整数最小化技术

wolfram-mathematica - 与某些图案不同的匹配头

python - Sympy 中的尴尬替换