考虑这个输入到 WolframAlpha,
求解 [ 0 = x^4 - 6*x^2 - 8*x*cos( (2*pi )/5 ) -2*cos( (4*pi)/5) - 1 ]
它给出的解决方案是,
{x == (1 - sqrt[5])/2 || x == (3 + sqrt[5])/2 || x == (-2 - sqrt[2 (5 - sqrt[5])])/2 || x == (-2 + sqrt[2(5 - sqrt[5])])/2}
但是关于鼠尾草的相同方程给出了根源,
h(x) = x^4 - 6*x^2 - 8*x*cos( (2*pi )/5 ) -2*cos( (4*pi)/5) - 1
h(x).solve(x)
[x == -1/2*sqrt(-2*sqrt(5)+ 10) - 1, x == 1/2*sqrt(-2*sqrt(5) + 10) -1
, x == -1/2*sqrt(2*sqrt(5) + 6) + 1, x == 1/2*sqrt(2*sqrt(5) + 6) + 1]似乎 WolframAlpha 给出的前两个根与 Sage 给出的最后两个根不同。
为什么?
它们没有什么不同;它们完全相同,只是以不同的顺序列出。
sage: h(x) = x^4 - 6*x^2 - 8*x*cos( (2*pi )/5 ) - 2*cos( (4*pi)/5) - 1
sage: sols = h(x).solve(x, solution_dict=True)
sage: [CC(d[x]) for d in sols]
[-2.17557050458495, 0.175570504584946, -0.618033988749895, 2.61803398874989]
sage: wa = [ (1 - sqrt(5))/2 , (3 + sqrt(5))/2 , (-2 - sqrt(2* (5 - sqrt(5))))/2 , (-2 + sqrt(2* (5 - sqrt(5))))/2 ]
sage: [CC(v) for v in wa]
[-0.618033988749895, 2.61803398874989, -2.17557050458495, 0.175570504584946]