Mathematica FullSimplify [Sqrt [5 + 2 Sqrt [6]]] gives Sqrt [2] + Sqrt [3], but FullSimplify [-Sqrt [5 + 2 Sqrt [6]]] is not simplified, why?

I played with the (beautiful) polynomial x^4 - 10x^2 + 1 . See 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 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?

+7
source share
2 answers

Indeed, Solve does not simplify all roots to max:

enter image description here

A FullSimplify post-processing step simplifies two roots and leaves the other two untouched:

enter image description here

The same thing happens with Roots :

enter image description here

Strange, now FullSimplify simplifies all the roots:

enter image description here

The reason for this is, I believe, for the standard ComplexityFunction some of the solutions written above in nested radicals are, in a sense, simpler than others.

BTW FunctionExpand knows how to deal with these radicals:

enter image description here

enter image description here

+9
source
 FullSimplify[ Solve[x^4-10x^2+1==0,x] , ComplexityFunction -> (StringLength[ToString[ InputForm[#1]]] & )] 

gives

 {{x -> Sqrt[2] - Sqrt[3]}, {x -> -Sqrt[2] + Sqrt[3]}, {x -> -Sqrt[2] - Sqrt[3]}, {x -> Sqrt[2] + Sqrt[3]}} 
+7
source

All Articles