Mathematica FullSimplify[Sqrt[5+2 Sqrt[6]]] 产生 Sqrt[2]+Sqrt[3] 但 FullSimplify[-Sqrt[5+2 Sqrt[6]]] 未简化,为什么?
我正在玩(美丽的)多项式x^4 - 10x^2 + 1
。 看看会发生什么:
In[46]:= f[x_] := x^4 - 10x^2 + 1
a = Sqrt[2];
b = Sqrt[3];
Simplify[f[ a + b]]
Simplify[f[ a - b]]
Simplify[f[-a + b]]
Simplify[f[-a - b]]
Out[49]= 0
Out[50]= 0
Out[51]= 0
Out[52]= 0
In[53]:= Solve[f[x] == 0, x]
Out[53]= {{x->-Sqrt[5-2 Sqrt[6]]},{x->Sqrt[5-2 Sqrt[6]]},{x->-Sqrt[5+2 Sqrt[6]]},{x->Sqrt[5+2 Sqrt[6]]}}
In[54]:= Simplify[Solve[f[x] == 0, x]]
Out[54]= {{x->-Sqrt[5-2 Sqrt[6]]},{x->Sqrt[5-2 Sqrt[6]]},{x->-Sqrt[5+2 Sqrt[6]]},{x->Sqrt[5+2 Sqrt[6]]}}
In[55]:= FullSimplify[Solve[f[x] == 0, x]]
Out[55]= {{x->Sqrt[2]-Sqrt[3]},{x->Sqrt[5-2 Sqrt[6]]},{x->-Sqrt[5+2 Sqrt[6]]},{x->Sqrt[2]+Sqrt[3]}}
Sqrt[5-2 Sqrt[6]]
等于 Sqrt[3]-Sqrt[2]
。
但是,Mathematica 的 FullSimplify
不会简化 Sqrt[5-2 Sqrt[6]]
。
问题:我应该使用其他更专业的函数来代数求解方程吗?如果有,是哪一个?
I was playing with the (beautiful) polynomial x^4 - 10x^2 + 1
.
Look what happens:
In[46]:= f[x_] := x^4 - 10x^2 + 1
a = Sqrt[2];
b = Sqrt[3];
Simplify[f[ a + b]]
Simplify[f[ a - b]]
Simplify[f[-a + b]]
Simplify[f[-a - b]]
Out[49]= 0
Out[50]= 0
Out[51]= 0
Out[52]= 0
In[53]:= Solve[f[x] == 0, x]
Out[53]= {{x->-Sqrt[5-2 Sqrt[6]]},{x->Sqrt[5-2 Sqrt[6]]},{x->-Sqrt[5+2 Sqrt[6]]},{x->Sqrt[5+2 Sqrt[6]]}}
In[54]:= Simplify[Solve[f[x] == 0, x]]
Out[54]= {{x->-Sqrt[5-2 Sqrt[6]]},{x->Sqrt[5-2 Sqrt[6]]},{x->-Sqrt[5+2 Sqrt[6]]},{x->Sqrt[5+2 Sqrt[6]]}}
In[55]:= FullSimplify[Solve[f[x] == 0, x]]
Out[55]= {{x->Sqrt[2]-Sqrt[3]},{x->Sqrt[5-2 Sqrt[6]]},{x->-Sqrt[5+2 Sqrt[6]]},{x->Sqrt[2]+Sqrt[3]}}
Sqrt[5-2 Sqrt[6]]
is equal to Sqrt[3]-Sqrt[2]
.
However, Mathematica's FullSimplify
does not simplify Sqrt[5-2 Sqrt[6]]
.
Question: Should I use other more specialized functions to algebraically solve the equation? If so, which one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
事实上,
Solve
并没有最大限度地简化所有根:A < code>FullSimplify 后处理步骤简化了两个根并保持另外两个不变:
最初发生的情况与
Roots
:很奇怪,现在
FullSimplify
简化了所有根:我认为,这样做的原因是对于默认的
ComplexityFunction上面用嵌套部首写的一些解决方案在某种意义上比其他解决方案更简单。
顺便说一句
FunctionExpand
知道如何处理这些偏旁部首:Indeed,
Solve
doesn't simplify all roots to the max:A
FullSimplify
postprocessing step simplifies two roots and leaves two others untouched:Same initially happens with
Roots
:Strange enough, now
FullSimplify
simplifies all roots:The reason for this is, I assume, that for the default
ComplexityFunction
some of the solutions written above in nested radicals are in a sense simpler than the others.BTW
FunctionExpand
knows how to deal with those radicals:给出
gives